> QueueConnectionFactory  queueConnectionFactory = null;
> QueueConnection         queueConnection = null;
> QueueSession            queueSession = null;
> Queue                   queue = null;
> QueueSender             queueSender = null;
>
> jndiContext = new InitialContext();
> queueName = new String("queue/A");
> queueConnectionFactory =
> (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
> queue = (Queue) jndiContext.lookup(queueName);

I face the same problem when I switched to JBoss3.0.0
My example below is for a topic connection but it would be quite the same for you.

The main difference is that you don't look QueueConnectionFactory or 
TopicConnectionFactory
anymore but ConnectionFactory (this hanldes both Queues and Topics)

If this doesn't work, you may not have deployed a service to create your own queue.

<snip>
   Context context = new InitialContext();
   TopicConnectionFactory topicFactory =
(TopicConnectionFactory)context.lookup("ConnectionFactory");

   if(topicConn == null)
    topicConn = topicFactory.createTopicConnection();

   if(topicSess == null)
    topicSess = topicConn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

   if(topic == null)
    topic = (Topic)context.lookup("topic/personneQueue");

   if(topicSub == null)
    topicSub = topicSess.createSubscriber(topic);

   topicSub.setMessageListener(this);

   topicConn.start();
</snip>


c u
ionel


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to