1 Reply Latest reply on Jun 28, 2005 11:06 AM by cinimod

    Sending a simple message

    cinimod

      Hi,

      within my session bean i want to lookup a ConnectionFactory:

       jndi = new InitialContext();
       topicFactory = (TopicConnectionFactory) jndi.lookup("java:comp/env/topic/MailTopicFactory");
      


      but the following exception is thrown:

      15:13:25,932 INFO [STDOUT] javax.naming.NameNotFoundException: comp not bound


      the important entries in the ejb-jar.xml and jboss.xml are:

      ejb-jar.xml:
      <resource-ref>
       <res-ref-name>MailTopicFactory</res-ref-name>
       <res-type>javax.jms.TopicConnectionFactory</res-type>
       <res-auth>Container</res-auth>
      </resource-ref>
      


      jboss.xml:

       <res-ref-name>MailTopicFactory</res-ref-name>
       <jndi-name>java:/JmsXA</jndi-name>
       </resource-ref>
      


      I have no idea what´s the problem?

      Does anybody know how to solve this?

      Thanks a lot for any suggestions!