[jboss-user] [JBoss Messaging] - Re: Bridge cannot find session with QOS_ONCE_AND_ONLY_ONCE

julians37 do-not-reply at jboss.com
Sat Sep 22 00:47:14 EDT 2007


Hi Tim,

thanks again for sticking with me on this one.

I've started off with a new AS installation and ran the example as per your instructions, and it works fine.

However, it fails as soon as more than one server is involved.

Here are the steps to reproduce:

Start with a fresh JBoss AS 4.2.1 installation and create two messaging configurations:

  | cd util
  | ant -f release-admin.xml
  | ant -f release-admin.xml -Dmessaging.config.name=messaging2
  | 

In $JBOSS_HOME/server/messaging2/conf/jboss-service.xml, uncomment the ServiceBindingManager so that the messaging2 config uses a different set of ports:


  | --- messaging/conf/jboss-service.xml    2007-09-22 10:48:53.000000000 +1000
  | +++ messaging2/conf/jboss-service.xml   2007-09-22 14:12:27.000000000 +1000
  | @@ -187,6 +187,7 @@
  |        | during initialization that specifies how to connect to the bindings store.
  |        | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
  |        | implementation to create to obtain the ServicesStore instance.
  | +   -->
  | 
  |     <mbean code="org.jboss.services.binding.ServiceBindingManager"
  |       name="jboss.system:service=ServiceBindingManager">
  | @@ -196,7 +197,6 @@
  |         org.jboss.services.binding.XMLServicesStoreFactory
  |       </attribute>
  |     </mbean>
  | -   -->
  | 
  |     <!-- ==================================================================== -->
  |     <!-- Class Loading                                                        -->
  | 
Modify docs/examples/bridge/etc/test-bridge-service.xml as follows:

  | *  Add a new JMSProvider connecting to jnp://localhost:1199 (which is messaging2's JNDI port)
  | *  Change the TargetProviderLoader to use the remote provider
  | *  Set QOS to 2
  | 

  | Index: test-bridge-service.xml
  | ===================================================================
  | --- test-bridge-service.xml     (revision 3139)
  | +++ test-bridge-service.xml     (working copy)
  | @@ -8,6 +8,27 @@
  | 
  |  <server>
  | 
  | +  <!-- The JMS provider loader -->
  | +  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | +        name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">
  | +    <attribute name="ProviderName">RemoteJMSProvider</attribute>
  | +    <attribute name="ProviderAdapterClass">
  | +      org.jboss.jms.jndi.JNDIProviderAdapter
  | +    </attribute>
  | +    <!-- The combined connection factory -->
  | +    <attribute name="FactoryRef">/XAConnectionFactory</attribute>
  | +    <!-- The queue connection factory -->
  | +    <attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
  | +    <!-- The topic factory -->
  | +    <attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
  | +    <!-- Access JMS via HAJNDI -->
  | +    <attribute name="Properties">
  | +       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  | +       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
  | +       java.naming.provider.url=localhost:1199
  | +       jnp.disableDiscovery=true
  | +    </attribute>
  | +  </mbean>
  | 
  |     <mbean code="org.jboss.jms.server.bridge.BridgeService"
  |            name="jboss.messaging:service=Bridge,name=TestBridge"
  | @@ -17,7 +38,7 @@
  |        <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
  | 
  |        <!-- The JMS provider loader that is used to lookup the target destination -->
  | -      <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
  | +      <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider</depends>
  | 
  |        <!-- The JNDI lookup for the source destination -->
  |        <attribute name="SourceDestinationLookup">/queue/A</attribute>
  | @@ -45,7 +66,7 @@
  |             QOS_AT_MOST_ONCE = 0;
  |             QOS_DUPLICATES_OK = 1;
  |             QOS_ONCE_AND_ONLY_ONCE = 2; -->
  | -      <attribute name="QualityOfServiceMode">0</attribute>
  | +      <attribute name="QualityOfServiceMode">2</attribute>
  | 
  |        <!-- JMS selector to use for consuming messages from the source
  |        <attribute name="Selector">specify jms selector here</attribute>
  | 

Now bring up the two AS instances and run the bridge example. This should give you the "session id not found" error messages in messaging's log.

Can you reproduce this? If so, is this a bug or is my RemoteJMSProvider configuration wrong? Or is there anything else I need to configure in my second AS instance?

(Note that in my previous test setup, the two servers were running on different machines in different subnets between which there's no multicast routing, so I doubt that there's some problem with the ports or with the fact that both servers are running on the same host in this example. Also, my previous test setup was on Linux while this example was tested on Darwin, so it doesn't seem to be some kind of network quirk or OS hickup either)

Thanks again,

Julian



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087470#4087470

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087470



More information about the jboss-user mailing list