|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.component.sjms.jms.ObjectPool<javax.jms.Connection> org.apache.camel.component.sjms.jms.ConnectionFactoryResource
public class ConnectionFactoryResource
The default ConnectionResource
implementation for the SJMSComponent.
Field Summary |
---|
Fields inherited from class org.apache.camel.component.sjms.jms.ObjectPool |
---|
logger |
Constructor Summary | |
---|---|
ConnectionFactoryResource()
Default Constructor |
|
ConnectionFactoryResource(int poolSize,
javax.jms.ConnectionFactory connectionFactory)
TODO Add Constructor Javadoc |
|
ConnectionFactoryResource(int poolSize,
javax.jms.ConnectionFactory connectionFactory,
String username,
String password)
|
|
ConnectionFactoryResource(int poolSize,
javax.jms.ConnectionFactory connectionFactory,
String username,
String password,
String connectionId)
|
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. |
protected javax.jms.Connection |
createObject()
Implement to create new objects of type T when the pool is initialized empty. |
protected void |
destroyObject(javax.jms.Connection connection)
Clean up pool objects |
String |
getClientId()
|
javax.jms.ConnectionFactory |
getConnectionFactory()
|
String |
getPassword()
|
String |
getUsername()
|
void |
returnConnection(javax.jms.Connection connection)
Returns the Connection to the connection pool. |
void |
setClientId(String clientId)
|
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
|
void |
setPassword(String password)
|
void |
setUsername(String username)
|
Methods inherited from class org.apache.camel.component.sjms.jms.ObjectPool |
---|
borrowObject, borrowObject, drainPool, fillPool, getLock, getMaxSize, returnObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionFactoryResource()
public ConnectionFactoryResource(int poolSize, javax.jms.ConnectionFactory connectionFactory)
poolSize
- connectionFactory
- public ConnectionFactoryResource(int poolSize, javax.jms.ConnectionFactory connectionFactory, String username, String password)
poolSize
- connectionFactory
- username
- password
- public ConnectionFactoryResource(int poolSize, javax.jms.ConnectionFactory connectionFactory, String username, String password, String connectionId)
poolSize
- connectionFactory
- username
- password
- Method Detail |
---|
public javax.jms.Connection borrowConnection() throws Exception
ConnectionResource
Connection
from the connection pool. An exception
should be thrown if no resource is available.
borrowConnection
in interface ConnectionResource
Connection
Exception
- when no resource is availablepublic javax.jms.Connection borrowConnection(long timeout) throws Exception
ConnectionResource
Connection
from the connection pool.
borrowConnection
in interface ConnectionResource
timeout
- the amount of time to wait before throwing an
Exception
Connection
Exception
- when no resource is availablepublic void returnConnection(javax.jms.Connection connection) throws Exception
ConnectionResource
Connection
to the connection pool.
returnConnection
in interface ConnectionResource
connection
- the borrowed Connection
Exception
protected javax.jms.Connection createObject() throws Exception
ObjectPool
createObject
in class ObjectPool<javax.jms.Connection>
Exception
protected void destroyObject(javax.jms.Connection connection) throws Exception
ObjectPool
destroyObject
in class ObjectPool<javax.jms.Connection>
Exception
public javax.jms.ConnectionFactory getConnectionFactory()
public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getClientId()
public void setClientId(String clientId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |