are u sure that the follwing is not a typo
QueueConnection connection = actory.createQueueConnection();
> --- Source codes ---
> QueueConnectionFactory factory =
> QueueConnection connection =
are you sure that you do not have actory.createQueueConnection instead of factory.createQueueCoonection?
Sorry, yes that's mis-spell, "factory." But my source code is fine (otherwise, it must be a compile error).
Try comparing yours with this.
I would think you want to use java:/JmsXA as this uses
an in VM connection with pooling and interacts
with the ejb transaction manager.
"ConnectionFactory" by default is OIL which is
designed for use by a client so it uses
a pair of sockets and the JMS notion of a
Thank you, Adrian,
Unfortunately, I still have a problem. I tried JVM Invocation Layer that has JNDIRef="java:/(XA)ConnectionFactory", but it keeps saying "QueueConnectionFactory not bound." I don't think I have JNDI ref like java:/JmsXA and I think you're talking about JVM Invocation Layer (actually I tried JmsXA, but a same problem). I checked both jmx-console and jbossmq-service.xml, and I'm sure it's java:/(XA)ConnectionFactory on my server.
I'm wondering why it keeps saying "QueueConnectionFactory." None of my ref or JNDI name uses "QueueConnectionFactory." Where does this come from? Is this javax.jms.QueueConnectionFactory?
Look at JNDIView for your bean is your
resource-ref appearing for the bean?
It is likely you have it in the incorrect place
in the xml.
Finally I made it. It turns out that <jndi-name> tag was missing in my session bean which has a res-ref to connection factory (in jboss.xml). I looked into JNDIView and figured it out. You saved my life! Thanks.