RE: Using JMS with Orion

2000-12-08 Thread Smith, Jeff M (AZ75)

Jason,

Can you send the client code used to access this queue.  The information you
have given is very helpful

Thanks,

Jeff

 -Original Message-
 From: Jason Smith [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, December 07, 2000 1:47 PM
 To:   Orion-Interest
 Subject:  RE: Using JMS with Orion
 
  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-nameQueue Connection Factory/display-name
   resource-ref
   res-ref-namejms/QueueConnectionFactory/res-ref-name
   res-typejavax.jms.QueueConnectionFactory/res-type
   res-authContainer/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
 
 




Using JMS with Orion

2000-12-07 Thread Smith, Jeff M (AZ75)

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.  

I will include my class file that defines my queue.

 ServerQueue.java 

Thanks,

Jeff 

 ServerQueue.java


RE: Using JMS with Orion

2000-12-07 Thread Jason Smith

 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-nameQueue Connection Factory/display-name
resource-ref
res-ref-namejms/QueueConnectionFactory/res-ref-name
res-typejavax.jms.QueueConnectionFactory/res-type
res-authContainer/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