-
1. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
robert.panzer Jul 25, 2014 4:34 AM (in response to gopalakrishnan.a)Hi,
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"?>
<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>FSWatcherMDB</jee:ejb-name>
<mdb:resource-adapter-name>test.ear#fswatcher.rar</mdb:resource-adapter-name>
</mdb:resource-adapter-binding>
</jee:assembly-descriptor>
</jboss>
(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.
Kind regards,
Robert
-
2. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
gopalakrishnan.a Jul 25, 2014 8:50 AM (in response to robert.panzer)Hi Panzer,
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;
try
{
_log.debug("Inside the try block");
messageListener = (ASMessageListener) endpointFactory.createEndpoint(null);
Thanks in Advance.
-
3. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
robert.panzer Jul 28, 2014 1:52 AM (in response to gopalakrishnan.a)Hi,
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.
Kind regards,
Robert