|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionResource
The ConnectionResource is the contract used to provide Connection
pools to the SJMS component. A user should use this to provide access to an
alternative pooled connection resource such as a Connection pool that
is managed by a J2EE container.
It is recommended though that for standard ConnectionFactory
providers you use the {@link ConnectionFactoryResource) implementation that
is provided with SJMS as it is optimized for this component.
| Method Summary | |
|---|---|
javax.jms.Connection |
borrowConnection()
Borrows a Connection from the connection pool. |
javax.jms.Connection |
borrowConnection(long timeout)
Borrows a Connection from the connection pool. |
void |
returnConnection(javax.jms.Connection connection)
Returns the Connection to the connection pool. |
| Method Detail |
|---|
javax.jms.Connection borrowConnection()
throws Exception
Connection from the connection pool. An exception
should be thrown if no resource is available.
Connection
Exception - when no resource is available
javax.jms.Connection borrowConnection(long timeout)
throws Exception
Connection from the connection pool.
timeout - the amount of time to wait before throwing an
Exception
Connection
Exception - when no resource is available
void returnConnection(javax.jms.Connection connection)
throws Exception
Connection to the connection pool.
connection - the borrowed Connection
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||