DatabaseSessionConnectionHandler(DatabaseSessionImpl ownerSession, Login login) { this.ownerSession = ownerSession; this.login = login; accessor = login.buildAccessor(); }
DatabaseSessionConnectionHandler(DatabaseSessionImpl ownerSession, Login login) { this.ownerSession = ownerSession; this.login = login; accessor = login.buildAccessor(); }
DatabaseSessionConnectionHandler(DatabaseSessionImpl ownerSession, Login login) { this.ownerSession = ownerSession; this.login = login; accessor = login.buildAccessor(); }
/** * INTERNAL: * Create a new connection, accessors are used as connections. */ protected Accessor buildConnection() { Accessor connection = this.login.buildAccessor(); connection.setPool(this); connection.connect(this.login, this.owner); return connection; }
/** * INTERNAL: * Create a new connection, accessors are used as connections. */ protected Accessor buildConnection() { Accessor connection = this.login.buildAccessor(); connection.setPool(this); connection.connect(this.login, this.owner); return connection; }
/** * INTERNAL: * This should normally not be used, most sessions do not have specific accessors. * ServerSession has a set of connection pools. * ClientSession only has an accessor during a transaction. * SessionBroker has multiple accessors. * getAccessors() is used to support partitioning. * If the accessor is null, this lazy initializes one for backwardcompatibility with DatabaseSession. */ public Collection<Accessor> getAccessors() { if ((this.accessors == null) && (this.project != null) && (this.project.getDatasourceLogin() != null)) { synchronized (this) { if ((this.accessors == null) && (this.project != null) && (this.project.getDatasourceLogin() != null)) { // PERF: lazy init, not always required. List<Accessor> newAccessors = new ArrayList(1); newAccessors.add(this.project.getDatasourceLogin().buildAccessor()); this.accessors = newAccessors; } } } return this.accessors; }
/** * INTERNAL: * This should normally not be used, most sessions do not have specific accessors. * ServerSession has a set of connection pools. * ClientSession only has an accessor during a transaction. * SessionBroker has multiple accessors. * getAccessors() is used to support partitioning. * If the accessor is null, this lazy initializes one for backwardcompatibility with DatabaseSession. */ public Collection<Accessor> getAccessors() { if ((this.accessors == null) && (this.project != null) && (this.project.getDatasourceLogin() != null)) { synchronized (this) { if ((this.accessors == null) && (this.project != null) && (this.project.getDatasourceLogin() != null)) { // PERF: lazy init, not always required. List<Accessor> newAccessors = new ArrayList(1); newAccessors.add(this.project.getDatasourceLogin().buildAccessor()); this.accessors = newAccessors; } } } return this.accessors; }
/** * INTERNAL: * Return the lowlevel database accessor. * The database accessor is used for direct database access. */ public Accessor getAccessor() { if ((accessor == null) && (project != null) && (project.getDatasourceLogin() != null)) { synchronized (this) { if ((accessor == null) && (project != null) && (project.getDatasourceLogin() != null)) { // PERF: lazy init, not always required. accessor = project.getDatasourceLogin().buildAccessor(); } } } return accessor; }
/** * INTERNAL: * Create a new connection, accessors are used as connections. */ protected Accessor buildConnection() { Login localLogin = (Login)getLogin().clone(); Accessor connection = localLogin.buildAccessor(); connection.connect(localLogin, getOwner()); return connection; }