Top Description Fields Constructors Methods
com.sun.jndi.ldap.pool

pack-priv final Class ConnectionsRef

extends Object
Class Inheritance

Is a reference to Connections that is stored in Pool. This is an intermediate object that is outside of the circular reference loop of com.sun.jndi.ldap.Connection <-> com.sun.jndi.ldap.LdapClient <-> com.sun.jndi.ldap.pool.Connections Because Connection is a daemon thread, it will keep LdapClient alive until LdapClient closes Connection. This will in turn keep Connections alive. So even when Connections is removed from (the WeakHashMap of) Pool, it won't be finalized. ConnectionsRef acts as Connections's finalizer. Without connection pooling, com.sun.jndi.ldap.LdapCtx's finalize() closes LdapClient, which in turn closes Connection. With connection pooling, ConnectionsRef's finalize() calls Connections.close(), which in turn will close all idle connections and mark Connections such that in-use connections will be closed when they are returned to the pool.

Field Summary

Modifier and TypeField and Description
private final Connections

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Connections
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connsback to summary
private final Connections conns

Constructor Detail

ConnectionsRefback to summary
pack-priv ConnectionsRef(Connections conns)

Method Detail

getConnectionsback to summary
pack-priv Connections getConnections()