Adding Resource adapter ActiveMQ-rar.rar with wildfly 11
n_nagraj321 Mar 4, 2018 5:51 AMI have tried added the ActiveMQ resource adapter with wildfly by using the following thread How to Use Out of Process ActiveMQ with WildFly
In our case we are not suppose to give the plain text in password so i have tried using the security subsystem but its throwing the following exception.
standalone.xml
<resource-adapter id="activemq-rar.rar">
<module slot="main" id="org.activemq"/>
<transaction-support>XATransaction</transaction-support>
<config-property name="ServerUrl">
ssl://localhost:61616
</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/ActivemqJms" enabled="true" pool-name="ActivemqJms">
<config-property name="KeyStorePassword">
KeyStorePassword
</config-property>
<config-property name="KeyStoreKeyPassword">
KeyStoreKeyPassword
</config-property>
<config-property name="TrustStore">
C:/ActiveMQ/conf/keystore.p12
</config-property>
<config-property name="TrustStorePassword">
TrustStorePassword
</config-property>
<config-property name="KeyStore">
C:/ActiveMQ/conf/keystore.p12
</config-property>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>150</max-pool-size>
<prefill>false</prefill>
<is-same-rm-override>false</is-same-rm-override>
</xa-pool>
<security>
<security-domain>ActivemqRealm</security-domain>
</security>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/testqueue" use-java-context="true" pool-name="testqueue">
<config-property name="PhysicalName">
testqueue
</config-property>
</admin-object>
<admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:/testtopic" use-java-context="true" pool-name="testtopic">
<config-property name="PhysicalName">
testtopic
</config-property>
</admin-object>
</resource-adapter>
<security-domain name="ActivemqRealm" cache-type="default">
<authentication>
<login-module name="ActivemqRealm-lm" code="com.test.EnctryptedLogin" flag="required" module="com.test.crypto">
<module-option name="userName" value="reportserver"/>
<module-option name="password" value="{AES}:SPiIQQAhcW0gDcS3e+1QjfExRCXj4ixA/EPC+bN7PMA="/>
<module-option name="managedConnectionFactoryName" value="jboss.jca:service=TxCM,name=ActivemqJms"/>
</login-module>
</authentication>
</security-domain>
16:19:58,462 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.ra.deployment."com.ca.pamsc.activemq:main_activemq-rar.rar": org.jboss.msc.service.StartException in service jboss.ra.deployment."com.ca.pamsc.activemq:main_activemq-rar.rar": WFLYJCA0046: Failed to start RA deployment [activemq-rar.rar]
at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$2.run(AbstractResourceAdapterDeploymentService.java:332)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/C:/Users/Administrator/Desktop/wildfly/wildfly-11.0.0.Final/modules/org/activemq/main/
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2064)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$WildFlyRaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:173)
at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:116)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException
at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$AbstractWildFlyRaDeployer.getSubjectFactory(AbstractResourceAdapterDeploymentService.java:635)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1666)
... 7 more
16:19:58,509 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]