How to use @Resource annotation to inject Remote JMS Topic & ConnectionFactory

Solution Unverified - Updated -

Issue

  • How can we inject Resources which are deployed on Server-B using @Resource annotation in the applications which are deployed on Server-A.

Example: in EAP6 where "TestTopic" is deployed on Server-B and the below code is being used in Server-A

    @Resource(mappedName = "java:/jboss/exported/jms/topic/TestTopic")
    private Destination topic;

    @Resource(name = "java:/jboss/exported/jms/TestRemoteConnectionFactory")
    private ConnectionFactory connectionFactory;

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content