|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.arcsde.jndi.SharedSessionPool
public final class SharedSessionPool
A session pool
that is not closable and hence can be shared between
different applications/datastores when referenced by a JNDI context.
Constructor Summary | |
---|---|
protected |
SharedSessionPool(ISessionPool delegate)
|
Method Summary | |
---|---|
void |
close()
closes all connections in this pool. |
protected void |
finalize()
|
int |
getAvailableCount()
Returns the number of idle connections |
ArcSDEConnectionConfig |
getConfig()
|
static ISessionPool |
getInstance(ArcSDEConnectionConfig config,
ISessionPoolFactory factory)
|
int |
getInUseCount()
Number of active sessions. |
int |
getPoolSize()
returns the number of actual connections held by this connection pool. |
ISession |
getSession()
Shortcut for getSession(true) |
ISession |
getSession(boolean transactional)
Grab a session from the pool, this session is the responsibility of the calling code and must be closed after use. |
boolean |
isClosed()
Returns whether this pool is closed |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected SharedSessionPool(ISessionPool delegate) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public static ISessionPool getInstance(ArcSDEConnectionConfig config, ISessionPoolFactory factory) throws java.io.IOException
java.io.IOException
protected void finalize()
finalize
in class java.lang.Object
public void close()
ISessionPool
close
in interface ISessionPool
ISessionPool.close()
public int getAvailableCount()
ISessionPool
getAvailableCount
in interface ISessionPool
ISessionPool.getAvailableCount()
public ArcSDEConnectionConfig getConfig()
getConfig
in interface ISessionPool
ISessionPool.getConfig()
public int getInUseCount()
ISessionPool
getInUseCount
in interface ISessionPool
ISessionPool.getInUseCount()
public int getPoolSize()
ISessionPool
getPoolSize
in interface ISessionPool
ISessionPool.getPoolSize()
public ISession getSession() throws java.io.IOException, UnavailableConnectionException
ISessionPool
getSession(true)
getSession
in interface ISessionPool
java.io.IOException
UnavailableConnectionException
ISessionPool.getSession()
public ISession getSession(boolean transactional) throws java.io.IOException, UnavailableConnectionException
ISessionPool
getSession
in interface ISessionPool
transactional
- whether the session is intended to be used on a transaction, so the pool may
choose to reuse or not a connection.
java.io.IOException
- If we could not get a connection
UnavailableConnectionException
- If we are out of connectionsISessionPool.getSession(boolean)
public boolean isClosed()
ISessionPool
isClosed
in interface ISessionPool
ISessionPool.isClosed()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |