Dear Gardais,
Thanks ,it helped me a little bit but again iam getting error when i am
looking the queue.this below is the error iam getting.actually iam looking
the queue/A ,which is already defined in the
server/default/deploy/jbossmq-destinations-service.xml.
do i need to change the look up?? or do i need to change any xml file???
javax.naming.NamingException: Invalid reference. Error:
org.jboss.mq.GenericCon
nectionFactory; Local class not compatible: stream classdesc
serialVersionUID=22
88420610006129296 local class serialVersionUID=-3631035586055025610
at
org.jboss.mq.referenceable.ObjectRefAddr.extractObjectRefFrom(ObjectR
efAddr.java:82)
at
org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjec
tInstance(SpyConnectionFactoryObjectFactory.java:45)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:437)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(Unknown Source)
>From: Ionel Gardais <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [JBoss-user] How to look up queue with jboss3.0
>Date: Fri, 14 Jun 2002 09:13:56 +0200
>
> > 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
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
_______________________________________________________________
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