|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jms.AbstractConnectionFactoryBean com.atomikos.jms.QueueConnectionFactoryBean
public class QueueConnectionFactoryBean
Use this class to access JMS queues within your JTA transactions: rollback of the transaction will also cancel any messages sent or received. Instances of this class need a JMS vendor-specific instance of XAQueueConnectionFactory to work with. Check your JMS-vendor's documentation on how to do that. Instances can be set up in a GUI wizard tool and saved on disk or in JNDI. No explicit registration with the transaction engine is necessary: this class does everything automatically. As soon as an instance is created, it is fully capable of interacting with the Atomikos transaction manager, and will transparently take part in active transactions.
Note: for transactional message receival, we highly recommend that you use the Atomikos QueueReceiverSession class. This is because the JMS specification is rather ambiguous with respect to receiving messages in a (JTA) transaction. Many J2EE application servers solve this by offering message-driven bean support, but our QueueReceiverSession allows you to do the same with 'ordinary' MessageListener implementations.
Also note: any property changes made AFTER getting the first connection will NOT have any effect!
Field Summary |
---|
Fields inherited from class com.atomikos.jms.AbstractConnectionFactoryBean |
---|
resourceName_, xaFactoryJndiName_ |
Constructor Summary | |
---|---|
QueueConnectionFactoryBean()
|
Method Summary | |
---|---|
protected void |
checkSetup()
|
javax.jms.Connection |
createConnection()
Creates a default connection. |
javax.jms.Connection |
createConnection(String userName,
String password)
Creates a connection for a given user and password. |
javax.jms.QueueConnection |
createQueueConnection()
|
javax.jms.QueueConnection |
createQueueConnection(String user,
String pw)
Creates a connection for a given user and password. |
javax.jms.XAQueueConnectionFactory |
getXaQueueConnectionFactory()
Get the XAQueueConnectionFactory as previously set. |
void |
readExternal(ObjectInput objectInput)
|
void |
setXaQueueConnectionFactory(javax.jms.XAQueueConnectionFactory xaFactory)
Set the XAQueueConnectionFactory to use. |
void |
writeExternal(ObjectOutput objectOutput)
|
Methods inherited from class com.atomikos.jms.AbstractConnectionFactoryBean |
---|
getReference, getResourceName, getXaFactoryJndiName, init, setResourceName, setXaFactoryJndiName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueConnectionFactoryBean()
Method Detail |
---|
protected void checkSetup() throws javax.jms.JMSException
checkSetup
in class AbstractConnectionFactoryBean
javax.jms.JMSException
public javax.jms.XAQueueConnectionFactory getXaQueueConnectionFactory()
public void setXaQueueConnectionFactory(javax.jms.XAQueueConnectionFactory xaFactory)
xaFactory
- The object to use.public javax.jms.QueueConnection createQueueConnection() throws javax.jms.JMSException
createQueueConnection
in interface javax.jms.QueueConnectionFactory
javax.jms.JMSException
public javax.jms.QueueConnection createQueueConnection(String user, String pw) throws javax.jms.JMSException
createQueueConnection
in interface javax.jms.QueueConnectionFactory
user
- The user name.pw
- The password.
javax.jms.JMSException
public javax.jms.Connection createConnection() throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
javax.jms.JMSException
public javax.jms.Connection createConnection(String userName, String password) throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
userName
- The user name.password
- The password.
javax.jms.JMSException
public void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |