1 Reply Latest reply on Dec 16, 2008 10:23 AM by Adrian Brock

    JMS not Bound error in JBOSS server console

    Anil Kumar Newbie

      trying to create ejb3 MDB with standalone client. When deployed tar file server throwing jms not found error. It is from ejb3 in action book.

      My client

      public static void main(String[] args) {
      Destination destination;
      ConnectionFactory connectionFactory;

      long item = 10101;
      String address = "101 Easy Street";
      String method = "Snail mail";
      double amount = 101.00;

      try {
      Context context = new InitialContext();

      destination = (Destination) context
      .lookup("java:comp/env/jms/ShippingRequestQueue");

      connectionFactory = (ConnectionFactory) context
      .lookup("ConnectionFactory");

      Connection connection = connectionFactory.createConnection();
      connection.start();

      Session session = connection.createSession(false,
      Session.AUTO_ACKNOWLEDGE);

      MessageProducer producer = session.createProducer(destination);


      and my MDB

      @MessageDriven(name = "ShippingRequestProcessor", activationConfig = {
      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/ShippingRequestQueue") })
      public class ShippingRequestProcessorMDB implements MessageListener {
      private Connection connection;

      private DataSource dataSource;

      @Resource
      private MessageDrivenContext context;

      @Resource(name = "jdbc/TurtleDS", mappedName = "java:/DefaultDS")
      public void setDataSource(DataSource dataSource) {
      this.dataSource = dataSource;
      }

      @PostConstruct
      public void initialize() {
      try {
      connection = dataSource.getConnection();
      } catch (SQLException sqle) {
      sqle.printStackTrace();
      }


      Enev when i tried to run it it says same. JMS not bound..

      Any help please?