:
public final class TypeFactory implements Serializable {
private static final Logger log = LoggerFactory.getLogger(TypeFactory.class);
private final TypeScopeImpl typeScope = new TypeScopeImpl();
public static interface TypeScope extends Serializable {
public SessionFactoryImplementor resolveFactory();
}
private static class TypeScopeImpl implements TypeFactory.TypeScope {
private SessionFactoryImplementor factory;
public void injectSessionFactory(SessionFactoryImplementor factory) {
if (this.factory != null) {
log.warn("Scoping types to session factory {} after already scoped {}", this.factory, factory);
}
else {
log.trace("Scoping types to session factory {}", factory);
}
this.factory = factory;
}
...
同じタイプを使用する複数のファクトリを定義していますか? – MahdeTo
実際、新しいエンティティをセッションに動的に追加します。 – Stephan