0 Replies Latest reply on Apr 22, 2019 10:13 AM by Wojciech Zazdzyk

    MDB consumes WebLogic Queue

    Wojciech Zazdzyk Newbie

      I have to consumes messages from WebLogic 12c queue in EAP 6.4.


      I have working standalone client:


      Hashtable<String, String> env = new Hashtable<>();

      env.put(Context.PROVIDER_URL, WLS_ADDRESS);


      Context ct = new InitialContext(env);

      QueueConnectionFactory  qcf = (QueueConnectionFactory) ct.lookup(JMS_QUEUE_FACTORY);

      QueueConnection qc = qcf.createQueueConnection();

      QueueSession qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

      Queue queue = (javax.jms.Queue) ct.lookup(JMS_QUEUE_NAME);

      MessageConsumer consumer = qs.createConsumer(queue);


      Message message = consumer.receive(1000);


      How do you get the same configuration using MDB? How can I indicate the connection factory using MDB?