public BatcherFactory getBatcherFactory() { return settings.getBatcherFactory(); }
public BatcherFactory getBatcherFactory() { return settings.getBatcherFactory(); }
/** * Used during deserialization. * * @param ois The stream from which we are being read. * @throws IOException Indicates an I/O error reading the stream * @throws ClassNotFoundException Indicates resource class resolution. */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { factory = ( SessionFactoryImplementor ) ois.readObject(); ois.defaultReadObject(); this.batcher = factory.getSettings().getBatcherFactory().createBatcher( this ); }
/** * Used during deserialization. * * @param ois The stream from which we are being read. * @throws IOException Indicates an I/O error reading the stream * @throws ClassNotFoundException Indicates resource class resolution. */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { factory = (SessionFactoryImplementor) ois.readObject(); interceptor = (Interceptor) ois.readObject(); ois.defaultReadObject(); this.batcher = factory.getSettings().getBatcherFactory().createBatcher( this, interceptor ); }
/** * Private constructor used exclusively from custom serialization */ private ConnectionManager( SessionFactoryImplementor factory, Callback callback, ConnectionReleaseMode releaseMode, Interceptor interceptor, boolean wasConnectionSupplied, boolean isClosed) { this.factory = factory; this.callback = callback; this.interceptor = interceptor; this.batcher = factory.getSettings().getBatcherFactory().createBatcher( this, interceptor ); this.wasConnectionSupplied = wasConnectionSupplied; this.isClosed = isClosed; this.releaseMode = wasConnectionSupplied ? ConnectionReleaseMode.ON_CLOSE : releaseMode; }
/** * Constructs a ConnectionManager. * <p/> * This is the form used internally. * * @param factory The SessionFactory. * @param callback An observer for internal state change. * @param releaseMode The mode by which to release JDBC connections. * @param connection An externally supplied connection. */ public ConnectionManager( SessionFactoryImplementor factory, Callback callback, ConnectionReleaseMode releaseMode, Connection connection) { this.factory = factory; this.callback = callback; this.batcher = factory.getSettings().getBatcherFactory().createBatcher( this ); this.releaseMode = releaseMode; this.connection = connection; wasConnectionSupplied = ( connection != null ); shouldObtainConnection = !wasConnectionSupplied; }
/** * Constructs a ConnectionManager. * <p/> * This is the form used internally. * * @param factory The SessionFactory. * @param callback An observer for internal state change. * @param releaseMode The mode by which to release JDBC connections. * @param connection An externally supplied connection. */ public ConnectionManager( SessionFactoryImplementor factory, Callback callback, ConnectionReleaseMode releaseMode, Connection connection, Interceptor interceptor) { this.factory = factory; this.callback = callback; this.interceptor = interceptor; this.batcher = factory.getSettings().getBatcherFactory().createBatcher( this, interceptor ); this.connection = connection; wasConnectionSupplied = ( connection != null ); this.releaseMode = wasConnectionSupplied ? ConnectionReleaseMode.ON_CLOSE : releaseMode; }