you might want to take a look at robertpanzer/filesystemwatch-connector · GitHub
It contains an example for an inbound ra and an MDB.
Basically the MDB has to reference the RA in the jboss-ejb3.xml:
<?xml version="1.0" encoding="UTF-8"?>
(Or add a JBoss specific annotation to your MDB, but then you have compile dependencies on JBoss libs what I personally don't like)
With JBoss EAP 6.1.0+ you specify the ID of the resource adapter in <mdb:resource-adapter-name>. That is the ID attribute of the <resource-adapter> tag if you define the resource adapter in your standalone-full.xml or the name <file name of ear>#<filename of rar> if you don't have it defined there.
An ironjacamar.xml is not needed for an inbound-only resource adapter.
Thanks for your reply.
In our application we have MDB but it is not getting deployed.
And also i have done the sample MDB. It's getting deployed and also i have implemented the same logic as per my applciation then it's not working and getting endpointFactory object value is getting null. How the
Do you have any code for MessageEndpointFactory and how to activate the MessageEndpointFactory. Any configurations needs done for activation EndpointFactory. How to set Activation Spec values. Any configuration needs to be done. How we will able to see the message driven bean(mdb) deployed in server log along with resource adapter(Any specific message from server).
The below one is my code:
MessageEndpointFactory endpointFactory = _inboundRA.getEndpointFactory();
ASMessageListener messageListener = null;
_log.debug("Inside the try block");
messageListener = (ASMessageListener) endpointFactory.createEndpoint(null);
Thanks in Advance.
When the MDB gets deployed successfully you should see a message like this:
07:44:03,430 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) JBAS014142: Started message driven bean 'FooListenerBean' with 'FooApplication.ear#FooResourceAdapter.rar' resource adapter
There is no example code for the MessageEndpointFactory! ResourceAdapter.endpointActivation(MessageEndpointFactory, ActivationSpec) will be called once for every deployed MDB.
The MessageEndpointFactory for that MDB will be passed by the Application Server.
You as a ResourceAdapter have to store it somewhere to make invocations of the MDB.
Activation configuration is either defined as part of the javax.ejb.MessageDriven annotation or in the ejb-jar.xml.