[jboss-user] [EJB 3.0] - Re: Help need to solve the jms not bound error

jaikiran do-not-reply at jboss.com
Wed Nov 5 01:50:30 EST 2008


I haven't completed read that tutorial - you could have posted the appropriate code here :-) 

But here's the code which i think is responsible for the exception:

public class PostMessage extends HttpServlet {
  |     @Resource(mappedName="jms/NewMessageFactory")
  |     private  ConnectionFactory connectionFactory;
  | 
  |     @Resource(mappedName="jms/NewMessage")
  |     private  Queue queue; 

1) As far as i know, the connection factory in JBoss is by default bound at "ConnectionFactory". So the first injection should look like:

    @Resource(mappedName="ConnectionFactory")
  |     private  ConnectionFactory connectionFactory;
  | 

or even

    @Resource
  |     private  ConnectionFactory connectionFactory;
  | 

2) For the injection of the "queue" to happen, you should have deployed the queue through configuration file to be bound at jms/NewMessage. Have you done that?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186899#4186899

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186899



More information about the jboss-user mailing list