|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.connector.IeConnectionManager
conneciton manager for the situation where the connector is used outside of a J2EE container ("non-managed application scenario") implements a simple connection pool. the free pool is checked every 30 seconds. idle connections are destroyed after they've been idle for 60 seconds.
Nested Class Summary | |
(package private) class |
IeConnectionManager.FreeCxKey
used as a key for connections in the free pool, marks the last time a connection was used. |
Field Summary | |
private Hashtable |
busyHandles
|
private static long |
EXPIRE_INTERVAL
|
private Hashtable |
freeHandles
|
private static long |
IDLE_TIME
|
private Log |
log
|
Constructor Summary | |
(package private) |
IeConnectionManager(Log l)
create a new connection manager |
Method Summary | |
Object |
allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
allocation a new CCI connection |
void |
connectionClosed(javax.resource.spi.ConnectionEvent event)
connection closed callback. |
void |
connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
connection error callback. |
private void |
expire()
used to remove idle connections from the free pool |
void |
localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
|
void |
localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
|
void |
localTransactionStarted(javax.resource.spi.ConnectionEvent event)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long EXPIRE_INTERVAL
private static final long IDLE_TIME
private Hashtable freeHandles
private Hashtable busyHandles
private Log log
Constructor Detail |
IeConnectionManager(Log l)
l
- LogMethod Detail |
public Object allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
allocateConnection
in interface javax.resource.spi.ConnectionManager
mcf
- the managed connection factory objectcxRequestInfo
- the connection request information
javax.resource.ResourceException
- if something bad happens...public void connectionClosed(javax.resource.spi.ConnectionEvent event)
connectionClosed
in interface javax.resource.spi.ConnectionEventListener
event
- the close connection eventpublic void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
connectionErrorOccurred
in interface javax.resource.spi.ConnectionEventListener
event
- the error eventpublic void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
localTransactionCommitted
in interface javax.resource.spi.ConnectionEventListener
public void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
localTransactionRolledback
in interface javax.resource.spi.ConnectionEventListener
public void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
localTransactionStarted
in interface javax.resource.spi.ConnectionEventListener
private void expire()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |