I'm writing unit tests for application that works under JBoss. In this
application there is MDB defined as follows:
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "jms/MonitoringQueue")
},
name = "ProcessMonitoring")
public class ProcessMonitoringBean implements MessageListener {
.........
}
The code which I test sends messages to ProcessMonitoringBean. It looks up
queue like this:
protected void bowl( MMonitoring theMessage ) {
Context context = new InitialContext();
Destination destination = (Destination)
context.lookup("jms/MonitoringQueue");
.......
}
This code works under JBoss AS 5, not under embedded openEJB. When I run my
unit test under openEJB, I get exception:
javax.naming.NameNotFoundException: Name "jms/MonitoringQueue" not found.
How can I make my test execute application code?
--
View this message in context: http://openejb.979440.n4.nabble.com/Locating-JMS-queue-problem-tp4312562p4312562.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
|