tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kazak777 <kazak...@gmail.com>
Subject Locating JMS queue problem
Date Fri, 20 Jan 2012 07:09:31 GMT
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.

Mime
View raw message