what's the best way to use the jboss-client.jar in a Wildfly 10 application?

后端 未结 1 718
隐瞒了意图╮
隐瞒了意图╮ 2021-01-24 11:18

I have a Wildfly 10 ear application (runs in the server container) which needs to be able to publish to a remote queue hosted on another wildfly server. To accomplish that I cop

1条回答
  •  我在风中等你
    2021-01-24 12:02

    Once your JMS client is running within a WildFly application - you don't need for the the jboss-client.jar at all - WildFly modules by themselves contain all necessary dependencies for publishing to a remote queue on another WildFly instance.

    In our projects the best way for remote EJB and JMS connections is the following config in the standalone-full.xml:

    
                
                    
                
    ...
    

    This allows to lookup for a remote JMS connection on another server through the jms/RemoteConnectionFactory there, e.g. see this example.

    Additionally you need the ActiveMQ specific dependencies (e.g. ActiveMQJMSConnectionFactory) to publish to a remote queue.
    We did it by adding the corresponding module as a dependency in the jboss-deployment-structure.xml:

    
          
    
    

    see Class Loading in WildFly for more details.

    That's it.

    0 讨论(0)
提交回复
热议问题