Oracle's Advanced Queueing functionality also includes JMS/XA drivers that can be used with Atomikos.

NOTE: this configuration procedure was last tested with Oracle version

Disclaimer: this is how we used OracleAQ in conjunction with TransactionsEssentials. For another approach, see (third party blog post).


We assume that the Oracle database (in which AQ stores the messages) is already enabled for XA. See on how to do that.

Create the Queues (optional)

If no queues exist then they need to be created first. The easiest way to get started is to create each queue of type AQ$_JMS_MESSAGE (see the DBMS_AQJMS PL/SQL package). Ask you DBA to do this for you…

Set the JMS user's privileges

JMS is just another way of accessing OracleAQ (or Oracle Streams, as it is also called). You need to enable the necessary priviliges for users to use JMS in Oracle. The following privileges are required:

  • EXECUTE rights on DBMS_AQJMS
  • EXECUTE rights on DBMS_AQIN
  • ENQUEUE rights on each queue to send to
  • DEQUEUE rights on each queue to receiver from

Note: some of the above database objects may need to be defined first - please contact your DBA for further assistance.

Create the Atomikos ConnectionFactory

Create a connection factory as follows:
//create and configure an oracle-specific XA connection factory
oracle.jdbc.xa.client.OracleXADataSource xads = new oracle.jdbc.xa.client.OracleXADataSource();
xads.setUser ( "..." );
XAQueueConnectionFactory xacf = AQjmsFactory.getXAQueueConnectionFactory (

AtomikosConnectionFactoryBean qcf = new AtomikosConnectionFactoryBean();
qcf.setUniqueResourceName ( "..." );
qcf.setXaConnectionFactory ( xacf );


Make sure to configure the Oracle XAConnectionFactory as outlined above, or you will get problems like these: Known Problems

You should now be able to send/receive JMS messages to and from OracleAQ.

More Information

Also see the following Oracle docs for more information:

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2018 Atomikos BVBA
This website is using cookies. More info. That's Fine