This content has been marked as final.
Show 2 replies
-
1. Re: How do I specify rar for MDB in jboss-ejb3.xml?
heyw Nov 20, 2012 4:02 PM (in response to raylite3)Hi,
the name of the resource adapter can be configured as follows in the jboss-ejb3.xml descriptor:
<?xml version="1.0" encoding="UTF-8"?> <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:jee="http://java.sun.com/xml/ns/javaee" xmlns:mdb="urn:resource-adapter-binding" xmlns:security="urn:security"> <jee:assembly-descriptor> <mdb:resource-adapter-binding> <jee:ejb-name>SOCKET_MDB</jee:ejb-name> <mdb:resource-adapter-name>sockets-rar-${project.version}.rar</mdb:resource-adapter-name> </mdb:resource-adapter-binding> </jee:assembly-descriptor> </jboss>
Alternatively, you can also configure the name of the resource adapter by the following annotation (but without property substitution):
@MessageDriven(name = "ExampleQueueMDB", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/queue/test") }) @org.jboss.ejb3.annotation.ResourceAdapter("name-ra.rar") public class ExampleQueueMDB implements MessageListener { @Override public void onMessage(Message message) { ... } }
Regards, Heinz
-
2. Re: How do I specify rar for MDB in jboss-ejb3.xml?
raylite3 Nov 20, 2012 9:01 PM (in response to heyw)Thank you!