[
https://issues.jboss.org/browse/WFLY-5213?page=com.atlassian.jira.plugin....
]
Ondřej Kalman commented on WFLY-5213:
-------------------------------------
Hi, [~drzeyan] messaging subsystem should contain 2 things, remote connector and
pooled-connection-factories which will use it. You don't have to add any other
extension to the config.
Then you have to define external-context in naming subsystem pointing to the remote
artemis broker. You should keep in mind that standalone artemis uses different naming
conventions of queues and topics than EAP does. You can do workaround (if you want) in
naming subsystem to eliminate this problem, here is an example.
{code:java}
<subsystem xmlns="urn:jboss:domain:naming:2.0">
<bindings>
<external-context name="java:global/remoteContext"
module="org.apache.activemq.artemis"
class="javax.naming.InitialContext">
<environment>
<property name="java.naming.factory.initial"
value="org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory"/>
<property name="java.naming.provider.url"
value="tcp://127.0.0.1:61616"/>
<property name="queue.testQueue"
value="testQueue"/>
</environment>
<property name="queue.MDB_QUEUE"
value="MDB_QUEUE"/>
</external-context>
<lookup name="java:/MDB_QUEUE"
lookup="java:global/remoteContext/MDB_QUEUE"/>
</bindings>
</subsystem>
{code}
Injecting external context to Artemis fails
-------------------------------------------
Key: WFLY-5213
URL:
https://issues.jboss.org/browse/WFLY-5213
Project: WildFly
Issue Type: Bug
Components: JMS
Affects Versions: 10.0.0.Beta2
Reporter: Ondřej Kalman
Assignee: Jeff Mesnil
Fix For: 10.0.0.CR1
When external-context is defined in EAP and it's pointing to external Artemis broker,
it can't be injected in to MDB via @Resource(lookup =
"java:global/externalcontext"). Such injection results in null object.
Injecting destinations from external context results in
javax.ejb.EJBTransactionRolledbackException.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)