Hi
i have put up a simple message driven bean on AS 4.0.4rc2
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @ActivationConfigProperty(propertyName="destination", propertyValue="queue/PositioningRequests") }) public class PositioningListner implements MessageListener{ public void onMessage(Message message) { TextMessage textMessage = (TextMessage)message; System.out.println("Recived Positioning Request for:" +textMessage); } }
InitialContext ctx = new InitialContext(); Object obj = ctx.lookup("queue/PositioningRequests"); System.out.println(obj.getClass()); javax.jms.Queue queue = (javax.jms.Queue)obj;
solved it..
i had the MDB in another jar then the class doing the lookup(both in a EAR), when puting them in the same it worked =)