Message-driven bean activation-config and JNDI
pedrolamarao Mar 7, 2013 1:25 PMI am trying to figure out how much flexibility I have while configuring a message-driven bean.
I have arrived at a configuration I was sure would work but it does not.
I am not sure if my assumptions are incorrect or if there is a bug involved.
All modules are contained in an EAR.
The application.xml contains:
<resource-ref>
<res-ref-name>messageQueue</res-ref-name>
<lookup-name>java:jboss/queue/sandbox</lookup-name>
</resource-ref>
One module inside this EAR contains a Session EJB class with the following method:
@Resource(name="messageQueue", lookup="java:app/env/messageQueue")
public void setQueue (Queue queue)
{
this.queue = queue;
}
Another module inside this EAR contains a Message Driven EJB class with the following fragment in ejb-jar.xml:
<message-driven>
<ejb-name>SandboxMessageListenerBean</ejb-name>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>java:app/env/messageQueue</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
After deploying the EAR, we determine the "queue" attribute is correctly injected in the Session EJB, and infer java:app/env/messageQueue is properly bound, but the Message Driven EJB is apparently not configured correctly.
JBoss continuously registers in the server.log these messages:
15:23:01,038 INFO [org.hornetq.ra.inflow.HornetQActivation] (default-threads - 1) Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@1b0a4ee3 destination=java:app/env/messageQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
15:23:01,043 INFO [org.hornetq.ra.inflow.HornetQActivation] (default-threads - 1) awaiting topic/queue creation java:app/env/messageQueue
My configuration is Windows 7 64 bits + system locale pt_BR + Oracle JDK 1.7.0 u17 + JBoss AS branch 7.1 snapshot from commit ID e395398 (current HEAD).
Please advise.