I'm not a JMS guru, but it seems to me that the assumption that the
QueueConnectionFactory is bound in JNDI under the name of its class may
be faulty. Try using the JNDI Viewer MBean to look at the JNDI namespace
(point a browser at port 8082 on the server machine, go to the JNDIView
MBean and invoke the 'list' method - the docs at JBoss.org explain this)
Also, within an EJB there's no need to pass the properties argument to
the InitialContext constructor - use the no-args InitialContext
constructor for better portability.
-danch
Ng, Natalie wrote:
> In the java code, I use the jndi context to look up the
> QueueConnectionFactory and then use the factory to create the connection and
> session. The queue is created from the session. This seems to work fine in
> JRun. In JBoss, am I suppose to define the queue somewhere else or create
> the queue differently? Thanks.
>
> final QueueConnectionFactory factory =
> (QueueConnectionFactory) context.lookup
> (QueueConnectionFactory.class.getName());
> inconnection = factory.createQueueConnection();
> insession = inconnection.createQueueSession
> (false, Session.AUTO_ACKNOWLEDGE);
> receiver = insession.createReceiver(insession.createQueue("MyQueue"));
> receiver.setMessageListener(this);
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user