MDB annotation/queue creation problem
braduk Dec 8, 2009 12:17 PMHi,
I'm having problems getting a simple message driven bean to work in JBoss 5.1.
Bean annotation:
@MessageDriven(name = "TestMDB", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/TestQueue"), @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"), @ActivationConfigProperty(propertyName = "useLocalTx", propertyValue = "true") })
hornetq-jms.xml file (in the root of my .sar directory):
<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd"> <queue name="testQueue"> <entry name="/queue/testQueue"/> </queue> </configuration>
The error I'm seeing:
2009-12-08 17:02:39,872 ERROR [org.hornetq.core.server.impl.ServerSessionImpl](Thread-3 (group:HornetQ-server-threads4863382-274676)) Failed to create consumer HornetQException[errorCode=100 message=Binding jms.queue.TestQueue does not exist] at org.hornetq.core.server.impl.ServerSessionImpl.doHandleCreateConsumer(ServerSessionImpl.java:1268) at org.hornetq.core.server.impl.ServerSessionImpl.handleCreateConsumer(ServerSessionImpl.java:372) at org.hornetq.core.server.impl.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:117) at org.hornetq.core.remoting.impl.ChannelImpl.handlePacket(ChannelImpl.java:606) at org.hornetq.core.remoting.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:397) at org.hornetq.core.remoting.impl.RemotingConnectionImpl.access$000(RemotingConnectionImpl.java:41) at org.hornetq.core.remoting.impl.RemotingConnectionImpl$1.run(RemotingConnectionImpl.java:357) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:96) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) 2009-12-08 17:02:39,903 ERROR [org.hornetq.ra.inflow.HornetQActivation](WorkManager(2)-1) Unabler to start activation HornetQException[errorCode=100 message=Binding jms.queue.TestQueue does not exist] at org.hornetq.core.remoting.impl.wireformat.HornetQExceptionMessage.decodeBody(HornetQExceptionMessage.java:79) at org.hornetq.core.remoting.impl.wireformat.PacketImpl.decode(PacketImpl.java:214) at org.hornetq.core.remoting.impl.PacketDecoder.decode(PacketDecoder.java:435) at org.hornetq.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:343) at org.hornetq.core.client.impl.ConnectionManagerImpl$DelegatingBufferHandler.bufferReceived(ConnectionManagerImpl.java:1142) at org.hornetq.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:127) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:96) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
The queue definition for /queue/testQueue in the file above seems to be ignored as its no visible in the JNDI tree using the JNDI view MBean. this is puzzling as we have another service deployed with its own hornetq-jms.xml file which is creating queues and topics with no problem.
Also, I'm curious why its reporting "Binding jms.queue.TestQueue does not exist". That's not the queue name defined in the annotation.
Can someone point out where I've gone wrong please?
Thanks,
Brad.