|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jms.connection.SingleConnectionFactory org.springframework.jms.connection.SingleConnectionFactory102
public class SingleConnectionFactory102
A subclass of SingleConnectionFactory
for the JMS 1.0.2 specification,
not relying on JMS 1.1 methods like SingleConnectionFactory itself.
This class can be used for JMS 1.0.2 providers, offering the same API as
SingleConnectionFactory does for JMS 1.1 providers.
You need to set the "pubSubDomain" property
,
since this class will always explicitly differentiate between a
QueueConnection
and a TopicConnection
.
SingleConnectionFactory.setTargetConnectionFactory(javax.jms.ConnectionFactory)
,
setPubSubDomain(boolean)
Field Summary |
---|
Fields inherited from class org.springframework.jms.connection.SingleConnectionFactory |
---|
logger |
Constructor Summary | |
---|---|
SingleConnectionFactory102()
Create a new SingleConnectionFactory102 for bean-style usage. |
|
SingleConnectionFactory102(ConnectionFactory connectionFactory,
boolean pubSubDomain)
Create a new SingleConnectionFactory102 that always returns a single Connection that it will lazily create via the given target ConnectionFactory. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
In addition to checking whether the target ConnectionFactory is set, make sure that the supplied factory is of the appropriate type for the specified destination type: QueueConnectionFactory for queues, TopicConnectionFactory for topics. |
protected Connection |
doCreateConnection()
This implementation overrides the superclass method to use JMS 1.0.2 API. |
boolean |
isPubSubDomain()
Return whether the Publish/Subscribe domain (Topics) is used. |
void |
setPubSubDomain(boolean pubSubDomain)
Configure the factory with knowledge of the JMS domain used. |
Methods inherited from class org.springframework.jms.connection.SingleConnectionFactory |
---|
closeConnection, createConnection, createConnection, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, destroy, getClientId, getExceptionListener, getSharedConnectionProxy, getTargetConnectionFactory, initConnection, isReconnectOnException, onException, prepareConnection, resetConnection, setClientId, setExceptionListener, setReconnectOnException, setTargetConnectionFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleConnectionFactory102()
public SingleConnectionFactory102(ConnectionFactory connectionFactory, boolean pubSubDomain)
connectionFactory
- the target ConnectionFactorypubSubDomain
- whether the Publish/Subscribe domain (Topics) or
Point-to-Point domain (Queues) should be usedMethod Detail |
---|
public void setPubSubDomain(boolean pubSubDomain)
Default is Point-to-Point (Queues).
pubSubDomain
- true
for Publish/Subscribe domain (Topics),
false
for Point-to-Point domain (Queues)public boolean isPubSubDomain()
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class SingleConnectionFactory
protected Connection doCreateConnection() throws JMSException
doCreateConnection
in class SingleConnectionFactory
JMSException
- if thrown by JMS API methods
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |