Does somebody managed to deploy in WildFly (9.0.2 or 10.0) a MDB bean which listening for standalone JCA adapter?
I've just created an inbound JCA adapter (using ironjacamar-1.2.6) and deployed it on WildFly. Like this:
@Activation(messageListeners = { foo.TestMessageListener.class })
public class TestActivationSpec implements ActivationSpec
...
Next, I added a simple connection (using jboss-cli):
/profile=full-ha/subsystem=resource-adapters/resource-adapter=testRA:add(archive=test.rar,transaction-support=NoTransaction)
/profile=full-ha/subsystem=resource-adapters/resource-adapter=testRA/connection-definitions=TestManagedConnectionFactory:add(class-name=foo.TestManagedConnectionFactory,jndi-name=java:/eis/TestConnectionFactory_ha)
Pretty simple till now. After that, I created WAR application with a target consumer for the Adapter:
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName = "someProperty",
propertyValue = "Hi there")}
)
@Vetoed
public class TestServiceConsumer implements TestMessageListener{
...
Here I got my first trouble. This WAR doesn't see TestMessageListener class during deployment (lack of specification support from WildFly, btw). I found a solution by adding a special proprietary descriptor into my WAR archive:
META-INF/jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.test.rar" />
</dependencies>
</deployment>
</jboss-deployment-structure>
It solves problem with the class loading and my WAR classes became allowed to see RAR interfaces. But now I see other deployment problem:
java.lang.IllegalStateException: WFLYEJB0383: No message listener of type foo.TestMessageListener found in resource adapter activemq-ra
So, the question is why WildFly looks only into its own RA for the listener interface and not into my? Is there are any other specific descriptor to solve this?
Needs to say, that I've played with adding ra.xml descriptior into RAR archive, adding @ActivationConfigProperty to specify the exact RA connection factory (destinationLookup and connectionFactoryLookup). Nothing helps.
My adapter is also implemented an Outbound processing and it works as specified.
Thanks for any advice.