synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SYNAPSE-369) Multiple instances of Synapse instances cannot form a shared subscription group to Sonic MQ
Date Sat, 23 Aug 2008 20:57:44 GMT

     [ https://issues.apache.org/jira/browse/SYNAPSE-369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved SYNAPSE-369.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

The transport listener has been changed to create one JMSMessageReceiver instance per service.
The following pieces of code are therefore no longer necessary and have been eliminated:

* JMSConnectionFactory#serviceDestinationNameMapping 
* JMSConnectionFactory#getServiceNameForDestination (with the "hack to get around the crazy
Active MQ dynamic queue and topic issues")
* The physical destination name to service name translation in JMSMessageReceiver.Worker#run,
in particular the call to Message#getJMSDestination

Since the issue described here is caused by a mismatch between the return value of Message#getJMSDestination
and the physical name of the destination retrieved from JNDI, I believe that this change solves
the problem. Actually the JMS transport listener now no longer uses physical destination names
at all, except for logging purposes.

> Multiple instances of Synapse instances cannot form a shared subscription group to Sonic
MQ
> -------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-369
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-369
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 1.1.1, 1.2
>         Environment: Windows XP, JDK 1.6, Sonic MQ 7.5.1
>            Reporter: Tanmay saha
>            Assignee: Andreas Veithen
>             Fix For: 1.3
>
>         Attachments: mq_getstart.pdf, Readme.txt, SharedSubscriptions.java
>
>   Original Estimate: 1344h
>  Remaining Estimate: 1344h
>
> This is a new issue. I am running 2 instances of Synapse-1.1.1 or Synapse-1.2.  Deployed
a Proxy over JMS in both instances. Goal is to make sure that when a JNDI Topic Entry is created
in Sonic MQ with [[groupprefix]] in front of the actual topic (for example "[[grpsharedsubs]]TopicXA"
), at a time one Synapse instance will receive message from Sonic MQ. But Synapse throws some
error. I ran a similar test by uisng a plain java jms client, which works fine in shared subscription
mode. I have all the sonic required jars in Synapse\lib folder. The associated configurations
are attached here 
> 1)  JNDI Lookup name in Sonic MQ
> 2) JMSTransport config in axis2.xml
> 3) Proxy config in Synapse 
> 4) JMS Transport config in Synapse 
> 5) SynapseError log. 
> JNDI Lookup in Sonic MQ
> =====================================================================
> Lookup Name=TopicXA
> Type                 =Topic
> Destination Name=[[grpsharedsubs]]TopicXA
> JMS Transport configuration in axis2.xml 
> =====================================================================
> <transportReceiver name="jms" class="org.apache.synapse.transport.jms.JMSListener">

>         <parameter name="myTopicConnectionFactory"> 
>         <parameter name="java.naming.factory.initial">com.sonicsw.jndi.mfcontext.MFContextFactory</parameter>

>         <parameter name="java.naming.provider.url">tcp://localhost:2506</parameter>

>         <parameter name="com.sonicsw.jndi.mfcontext.domain">Domain1</parameter>

>         <parameter name="java.naming.security.principal">Administrator</parameter>

>         <parameter name="java.naming.security.credentials">Administrator</parameter>

>         <parameter name="transport.jms.ConnectionFactoryJNDIName">SonicTopicConnectionFactory</parameter>

>                 <parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>

>         </parameter> 
>         <parameter name="myQueueConnectionFactory"> 
>         <parameter name="java.naming.factory.initial">com.sonicsw.jndi.mfcontext.MFContextFactory</parameter>

>         <parameter name="java.naming.provider.url">tcp://localhost:2506</parameter>

>                 <parameter name="com.sonicsw.jndi.mfcontext.domain">Domain1</parameter>

>         <parameter name="java.naming.security.principal">Administrator</parameter>

>         <parameter name="java.naming.security.credentials">Administrator</parameter>
        
>         <parameter name="transport.jms.ConnectionFactoryJNDIName">SonicQueueConnectionFactory</parameter>

>                 <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>

>         </parameter> 
>     </transportReceiver>     
>     
>     <transportSender name="jms" class="org.apache.synapse.transport.jms.JMSSender"/>

> Proxy Service Configuration
> ===================================
>  <!--  Introduction to proxy services 
>   --> 
> - <definitions xmlns="http://ws.apache.org/ns/synapse">
> - <!--  define the request processing XSLT resource as a static URL source 
>   --> 
>   <localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/echo_transform.xslt"
/> 
> - <proxy name="echoProxy" transports="jms">
> - <target>
> - <endpoint>
>   <address uri="http://localhost:8082/EJBWebService/EchoBean" /> 
>   </endpoint>
> - <outSequence>
>   <log level="full" /> 
> - <out>
>   <xslt key="xslt-key-req" /> 
>   </out>
>   <send /> 
>   </outSequence>
>   </target>
>   <parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>

>   <parameter name="transport.jms.Destination">TopicXA</parameter> 
>   <parameter name="transport.jms.DestinationType">topic</parameter> 
>   <parameter name="transport.jms.ReplyDestination">ReplyTopic</parameter>

>   <parameter name="transport.jms.ReplyDestinationType">topic</parameter>

>   <publishWSDL uri="file:repository/conf/sample/resources/proxy/echo_proxy.wsdl" />

>   </proxy>
>   </definitions>
> Synapse Error Log
> ================================================================================
> 2008-06-17 13:06:23,933 [10.200.182.100-PS-TSAHA] [WrapperSimpleAppMain]  INFO ServerManager
Ready for processing 
> 2008-06-17 13:22:49,794 [10.200.182.100-PS-TSAHA] [JMS Session Delivery Thread] DEBUG
JMSMessageReceiver Received JMS message to destination : TopicXA 
> Message ID : ID:ffffffffcbed081a:2c060009:11A9831ACB2 
> Correlation ID : null 
> ReplyTo ID : null 
> 2008-06-17 13:22:49,810 [10.200.182.100-PS-TSAHA] [jms-Worker-1] DEBUG JMSListener Error
receiving message 
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR)

>         at org.apache.axis2.engine.DispatchPhase.validateTransport(DispatchPhase.java:216)

>         at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:93)

>         at org.apache.axis2.engine.Phase.invoke(Phase.java:308) 
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) 
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) 
>         at org.apache.synapse.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:210)

>         at org.apache.synapse.transport.jms.JMSMessageReceiver$Worker.run(JMSMessageReceiver.java:201)

>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
>         at java.lang.Thread.run(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message