[jboss-user] [JBoss Messaging] - Re: problems connecting to a Queue
FrankTheTank
do-not-reply at jboss.com
Tue Mar 18 03:58:15 EDT 2008
Are you even using any AOP stuff?
Check your project settings. In eclipse the AOP stuff in the Context-Menu is dangerously close to other much needed functions and maybe you just hit the wrong one, as I have often done.
Can you see the queue 'queue/tnb/inbound' in the JNDI viewer?
Also and might not even really be a problem but I use this code:
| ctx = new InitialContext();
| Queue queue = (Queue) ctx.lookup("queue/MyQueue");
| QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
| QueueConnection connection = factory.createQueueConnection();
| QueueSession session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
|
I got it from somewhere else and it works.
Maybe the order is important or something.
Also the access code you have written uses those props that are only needed on the client side.
That might be a reason why it is not working. (really guessing here)
Remove the props from the new InitialContext() and try it.
HTH
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137287#4137287
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137287
More information about the jboss-user
mailing list