문제

I need some precise steps (with reference to glassfish docs) for the following scenario;

  • How to create JMS queues to support "store locally and forward remotely". The remote system is HornetQ.
  • The remote connectivity should support SSL and user/password authentication
  • It should support automatic retry and configuration of # of retry.
  • In case of any failure, it should be possible to select the jms messages are resend in bulk

I already went through some of the glassfish docs but needs to be further validated by the experts.

Simple Scenario but still not working "Send a JMS to sourceQueue and JMS bridge service to transfer to targetQueue". Here are the configurations;

A. domain.xml (extract)

<jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
    <jms-host host="localhost" name="default_JMS_host" lazy-init="false">
      <property name="imq.bridge.bridge1.type" value="jms"></property>
      <property name="imq.bridge.bridge1.xmlurl" value="file:///C:/TEMP/bridge.xml"></property>
      <property name="imq.bridge.bridge1.autostart" value="true"></property>
      <property name="imq.bridge.bridge1.logfile.limit" value="0"></property>
      <property name="imq.bridge.bridge1.logfile.count" value="1"></property>
      <property name="imq.bridge.enabled" value="true"></property>
      <property name="imq.bridge.admin.user" value="admin"></property>
      <property name="imq.bridge.admin.password" value="admin"></property>
      <property name="imq.bridge.activelist" value="bridge1"></property>
    </jms-host>
</jms-service>

B. bridge.xml (bridge configuration)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jmsbridge SYSTEM "sun_jmsbridge_1_0.dtd">
<jmsbridge name="bridge1">
    <link name="link1">
        <enabled ="true"></enabled>
           <source connection-factory-ref=”jms/__defaultConnectionFactory" destination-ref="sourceQueue"></source>
     <target connection-factory-ref="jms/__defaultConnectionFactory" destination-ref="targetQueue "></target>
    </link>
    <connection-factory ref-name="jms/__defaultConnectionFactory"/>
    <connection-factory ref-name="jms/__defaultConnectionFactory"/>
    <destination ref-name="sourceQueue" type="queue" lookup-name="sourceQueue"/>
    <destination ref-name="targetQueue" type="queue" lookup-name="targetQueue"/>
</jmsbridge>
도움이 되었습니까?

해결책

Glassfish deploys the Glassfish JMS server. If you want to talk to HornetQ you need to use HornetQ libraries and use the proper API (either core or JMS) to talk to the HornetQ server.

If you need XA integration through MDBs then you will need to deploy the Resource Adapter and do the proper recovery integration. Look at the glassFish on how to deploy an external resource adapter.. but that's an area that nobody at RedHat has tested yet and given the state of glassFish being discontinued I doubt that will happen any time soon.

Another way you could do is to deploy the JMS Bridge within JBoss / HornetQ, Where any message sent on GlassFish JMS would be consumed on HornetQ through the bridging process.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top