Method Summary |
|
public void | afterPropertiesSet() Make sure a Connection or ConnectionFactory has been set. |
protected void | closeConnection(Connection con) Close the given Connection. |
public Connection | createConnection() |
public Connection | createConnection(String username, String password) |
public QueueConnection | createQueueConnection() |
public QueueConnection | createQueueConnection(String username, String password) |
public TopicConnection | createTopicConnection() |
public TopicConnection | createTopicConnection(String username, String password) |
public void | destroy() Close the underlying shared connection. |
protected Connection | doCreateConnection() Create a JMS Connection via this template's ConnectionFactory. |
protected String | getClientId() Return a JMS client ID for the single Connection created and exposed
by this ConnectionFactory, if any. |
protected ExceptionListener | getExceptionListener() Return the JMS ExceptionListener implementation that should be registered
with with the single Connection created by this factory, if any. |
protected Connection | getSharedConnectionProxy(Connection target) Wrap the given Connection with a proxy that delegates every method call to it
but suppresses close calls. |
public ConnectionFactory | getTargetConnectionFactory() Return the target ConnectionFactory which will be used to lazily
create a single Connection, if any. |
public void | initConnection() Initialize the underlying shared Connection. |
protected boolean | isReconnectOnException() Return whether the single Connection should be renewed when
a JMSException is reported by the underlying Connection. |
public void | onException(JMSException ex) Exception listener callback that renews the underlying single Connection. |
protected void | prepareConnection(Connection con) Prepare the given Connection before it is exposed. |
public void | resetConnection() Reset the underlying shared Connection, to be reinitialized on next access. |
public void | setClientId(String clientId) Specify a JMS client ID for the single Connection created and exposed
by this ConnectionFactory.
Note that client IDs need to be unique among all active Connections
of the underlying JMS provider. |
public void | setExceptionListener(ExceptionListener exceptionListener) Specify an JMS ExceptionListener implementation that should be
registered with with the single Connection created by this factory. |
public void | setReconnectOnException(boolean reconnectOnException) Specify whether the single Connection should be reset (to be subsequently renewed)
when a JMSException is reported by the underlying Connection.
Default is "false". |
public void | setTargetConnectionFactory(ConnectionFactory targetConnectionFactory) Set the target ConnectionFactory which will be used to lazily
create a single Connection. |