> I'm trying to get my own JMS queue running under orion and I'm
> unable to get
> it deployed.  The queue I'm using currently is working under
> Weblogic Server.  I'm unable to see how to get the queue running
> and access
> it using JNDI.  If anyone has the jms.xml set file and the
> client-application.xml with JMS setup that would be helpful.

        First off it appears that your included class was not executing
QueueConnection.start() soon enough for one thing (I think you have to
start() before you create the queue).  Another thing is that it looks like
you are not implementing the Singleton pattern correctly unless you are
doing some interesting run time instantiation/execution of this class
elsewhere to make sure that 1) it runs in the same JVM and 2) Thread safety
is provided elsewhere.

You can find a good example of using Queues with Orion in
orion/demo/jms/coffeemaker/.  Anyhow, I was able to get your code to run by
doing the following:

1) First off change your JMS_FACTORY to "jms/QueueConnectionFactory".
2) move qcon.start() before qsession.createQueue();
3) Make your application-client.xml looks like:
<?xml version="1.0"?>
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">

<application-client>
        <display-name>Queue Connection Factory</display-name>
        <resource-ref>
                <res-ref-name>jms/QueueConnectionFactory</res-ref-name>
                <res-type>javax.jms.QueueConnectionFactory</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
</application-client>
4) Create appropriate jndi.properties file

Since you are creating your Queue dynamically, you don't have to mess with
jms.xml by declaring the queue there.  If you didn't want to have to run
this class to create the queue you could edit jms.xml and just add the
desired queue there so it would be "auto-created".  To do this just add the
following line to jms.xml:
<queue name="ACM Process Queue or whatever description you want"
location="ACMProcessQueue" />

-jason




Reply via email to