You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Asankha C. Perera" <as...@apache.org> on 2008/11/06 13:46:06 UTC

Synapse nightly build up! and builds binaries..

Hi All

The Synapse nightly build now builds the binaries off the latest code 
base, every 6 hours or on change detection.

The link for the latest successful binary would be:
http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/lastSuccessfulBuild/org.apache.synapse$synapse-distribution/artifact/org.apache.synapse/synapse-distribution/SNAPSHOT/synapse-SNAPSHOT-bin.zip

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


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


Re: Commons JMS transport diffs for JTA transactions

Posted by Irantha <ir...@wso2.com>.
Andreas,

1. Yes, at the moment. Pool is used to avoid creating a thread per 
destination and later we can change this to get more parallelism. We can 
easily get even greater level of parallelism if we use JTA features to 
detach transactions off the associated thread. What do you think about using 
transaction suspend and resume?

2. we can better structure the code.

3. JMS implementations allow users to specify a redelivery policy. Which 
include redelivery delay, limit and dead letter queue/topic. So I don't 
think we need to handle this in code.



-Irantha



----- Original Message ----- 
From: "Andreas Veithen" <an...@gmail.com>
To: <de...@synapse.apache.org>
Sent: Monday, November 10, 2008 7:00 PM
Subject: Re: Commons JMS transport diffs for JTA transactions


> Irantha,
>
> I have three comments here:
>
> 1. The solution is essentially single threaded: at any given moment
> there is at most one thread that is receiving or processing a message
> (for a given destination). Do we really want this? If yes, do we need
> a worker pool for this?
> 2. I think we are trying to pack too much different things into the
> same piece of code (JMSMessageReceiver and JMSMessageReceiver.Worker).
> If we use MessageConsumer#receive, then it doesn't make sense to
> instantiate a JMSMessageReceiver, which is an implementation of
> MessageListener. I think that in order to support
> MessageConsumer#receive, we should first refactor the existing code to
> better separate the part that is concerned with message
> reception/acknowledgement and transactions from the part that really
> processes the message.
> 3. If we rollback messages, this means that at some point they will be
> received again (retry). How does your solution behave with respect to
> this?
>
> Regards,
>
> Andreas
>
> On Mon, Nov 10, 2008 at 13:06, Irantha <ir...@wso2.com> wrote:
>> Attched  commons JMS transport diffs to support JTA User Transactions.
>> axis2.xml transport receiver configuration is as following,
>>
>> <transportReceiver name="jms"
>> class="org.apache.synapse.transport.jms.JMSListener">
>>     <parameter name="default">
>>        <parameter
>> name="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</parameter>
>>        <parameter 
>> name="java.naming.provider.url">localhost:1099</parameter>
>>        <parameter
>> name="transport.jms.ConnectionFactoryJNDIName">java:JmsXA</parameter>
>>         <parameter
>> name="transport.jms.UserTransactionJNDIName">UserTransaction</parameter
>>        <parameter name="transport.jms.AutoCommit">true</parameter>
>>       <parameter name="transport.jms.ConnectionFactoryType"
>> locked="false">queue</parameter>
>>    </parameter>
>> </transportReceiver>
>>
>> -Irantha
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
> 


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


Re: Commons JMS transport diffs for JTA transactions

Posted by Andreas Veithen <an...@gmail.com>.
Irantha,

I have three comments here:

1. The solution is essentially single threaded: at any given moment
there is at most one thread that is receiving or processing a message
(for a given destination). Do we really want this? If yes, do we need
a worker pool for this?
2. I think we are trying to pack too much different things into the
same piece of code (JMSMessageReceiver and JMSMessageReceiver.Worker).
If we use MessageConsumer#receive, then it doesn't make sense to
instantiate a JMSMessageReceiver, which is an implementation of
MessageListener. I think that in order to support
MessageConsumer#receive, we should first refactor the existing code to
better separate the part that is concerned with message
reception/acknowledgement and transactions from the part that really
processes the message.
3. If we rollback messages, this means that at some point they will be
received again (retry). How does your solution behave with respect to
this?

Regards,

Andreas

On Mon, Nov 10, 2008 at 13:06, Irantha <ir...@wso2.com> wrote:
> Attched  commons JMS transport diffs to support JTA User Transactions.
> axis2.xml transport receiver configuration is as following,
>
> <transportReceiver name="jms"
> class="org.apache.synapse.transport.jms.JMSListener">
>     <parameter name="default">
>        <parameter
> name="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</parameter>
>        <parameter name="java.naming.provider.url">localhost:1099</parameter>
>        <parameter
> name="transport.jms.ConnectionFactoryJNDIName">java:JmsXA</parameter>
>         <parameter
> name="transport.jms.UserTransactionJNDIName">UserTransaction</parameter
>        <parameter name="transport.jms.AutoCommit">true</parameter>
>       <parameter name="transport.jms.ConnectionFactoryType"
> locked="false">queue</parameter>
>    </parameter>
> </transportReceiver>
>
> -Irantha
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>

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


Commons JMS transport diffs for JTA transactions

Posted by Irantha <ir...@wso2.com>.
Attched  commons JMS transport diffs to support JTA User Transactions. 
axis2.xml transport receiver configuration is as following,

<transportReceiver name="jms" 
class="org.apache.synapse.transport.jms.JMSListener">
      <parameter name="default">
         <parameter 
name="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</parameter>
         <parameter 
name="java.naming.provider.url">localhost:1099</parameter>
         <parameter 
name="transport.jms.ConnectionFactoryJNDIName">java:JmsXA</parameter>
          <parameter 
name="transport.jms.UserTransactionJNDIName">UserTransaction</parameter
         <parameter name="transport.jms.AutoCommit">true</parameter>
        <parameter name="transport.jms.ConnectionFactoryType" 
locked="false">queue</parameter>
     </parameter>
</transportReceiver>

-Irantha


Re: Synapse wth JBoss JTA/JMS

Posted by Andreas Veithen <an...@gmail.com>.
I was not aware that the servlet specification actually recommends the
parent last policy. However, the reality is that (since this is only a
recommendation) different application servers behave differently. For
example WebSphere uses parent first by default.

Andreas

On Fri, Nov 7, 2008 at 05:34, Irantha <ir...@wso2.com> wrote:
> Doesn't this happen with other app servers Weblogic? WebSphere?...
>
>
>
> JBoss documentation says this,
>
>
>
> "web application class loader diverges from the default Java 2 delegation
> model (in accordance with the recommendations in the Servlet Specification,
> version 2.3, section 9.7.2 Web Application Classloader). When a request to
> load a class from the web application's WebappX class loader is processed,
> this class loader will look in the local repositories first, instead of
> delegating before looking."
>
>
>
> http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/2.1.0/class-loader-howto.html
>
>
>
> -Irantha
>
>
> ----- Original Message ----- From: "Andreas Veithen"
> <an...@gmail.com>
> To: <de...@synapse.apache.org>
> Sent: Friday, November 07, 2008 7:44 AM
> Subject: Re: Synapse wth JBoss JTA/JMS
>
>
>> On Fri, Nov 7, 2008 at 01:54, Irantha <ir...@wso2.com> wrote:
>>>
>>> Yes. Issue is isolated to WAR distribution and happens only when
>>> application
>>> server's JMS/JTA is used.
>>
>> ... and a non standard class loading policy (other than simple parent
>> first) is used.
>>
>> Andreas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

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


Re: Synapse wth JBoss JTA/JMS

Posted by Irantha <ir...@wso2.com>.
Doesn't this happen with other app servers Weblogic? WebSphere?...



JBoss documentation says this,



"web application class loader diverges from the default Java 2 delegation 
model (in accordance with the recommendations in the Servlet Specification, 
version 2.3, section 9.7.2 Web Application Classloader). When a request to 
load a class from the web application's WebappX class loader is processed, 
this class loader will look in the local repositories first, instead of 
delegating before looking."



http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/2.1.0/class-loader-howto.html



-Irantha


----- Original Message ----- 
From: "Andreas Veithen" <an...@gmail.com>
To: <de...@synapse.apache.org>
Sent: Friday, November 07, 2008 7:44 AM
Subject: Re: Synapse wth JBoss JTA/JMS


> On Fri, Nov 7, 2008 at 01:54, Irantha <ir...@wso2.com> wrote:
>> Yes. Issue is isolated to WAR distribution and happens only when 
>> application
>> server's JMS/JTA is used.
>
> ... and a non standard class loading policy (other than simple parent
> first) is used.
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
> 


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


Re: Synapse wth JBoss JTA/JMS

Posted by Andreas Veithen <an...@gmail.com>.
On Fri, Nov 7, 2008 at 01:54, Irantha <ir...@wso2.com> wrote:
> Yes. Issue is isolated to WAR distribution and happens only when application
> server's JMS/JTA is used.

... and a non standard class loading policy (other than simple parent
first) is used.

Andreas

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


Re: Synapse wth JBoss JTA/JMS

Posted by Irantha <ir...@wso2.com>.
Asankha,

Yes. Issue is isolated to WAR distribution and happens only when application 
server's JMS/JTA is used.

Thanks,
Irantha

----- Original Message ----- 
From: "Asankha C. Perera" <as...@apache.org>
To: <de...@synapse.apache.org>
Sent: Thursday, November 06, 2008 10:16 PM
Subject: Re: Synapse wth JBoss JTA/JMS


>
>> Is there a perticular reason to include geronimo-jms_1.1_spec-1.0.jar and 
>> geronimo-jta_1.1_spec-1.1.jar files in synapse war (WEB-INF/lib)  ?
>>
>> Classes included in user application are loaded by a different class 
>> loader that the one that load JBoss framework classes.
>> (JBoss framework classes are loaded by 
>> org.jboss.mx.loading.UnifiedClassLoader and classes included in a 
>> application are loaded by 
>> org.jboss.web.tomcat.service.WebAppClassLoader).
>>
>> Because of this JMS/JTA interfaces defined in synapse code becomes 
>> *uncomparable to ones lookup from JNDI.
>>
>> I guess the same for other application servers.
>>
>> Is it possible to not include those two jar files in the war?
> Is this problem only for the WAR distribution? Its rarely used by many.. 
> and I have no objection to removing it since a WAR is deployed on a J2EE 
> app server most of the time.. I assume you didn't have any problems with 
> the standalone distribution
>
> asankha
>
> -- 
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
> 


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


Re: Synapse wth JBoss JTA/JMS

Posted by "Asankha C. Perera" <as...@apache.org>.
> Is there a perticular reason to include geronimo-jms_1.1_spec-1.0.jar 
> and geronimo-jta_1.1_spec-1.1.jar files in synapse war (WEB-INF/lib)  ?
>
> Classes included in user application are loaded by a different class 
> loader that the one that load JBoss framework classes.
> (JBoss framework classes are loaded by 
> org.jboss.mx.loading.UnifiedClassLoader and classes included in a 
> application are loaded by 
> org.jboss.web.tomcat.service.WebAppClassLoader).
>
> Because of this JMS/JTA interfaces defined in synapse code becomes 
> *uncomparable to ones lookup from JNDI.
>
> I guess the same for other application servers.
>
> Is it possible to not include those two jar files in the war?
Is this problem only for the WAR distribution? Its rarely used by many.. 
and I have no objection to removing it since a WAR is deployed on a J2EE 
app server most of the time.. I assume you didn't have any problems with 
the standalone distribution

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


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


Synapse wth JBoss JTA/JMS

Posted by Irantha <ir...@wso2.com>.
 Is there a perticular reason to include geronimo-jms_1.1_spec-1.0.jar and 
geronimo-jta_1.1_spec-1.1.jar files in synapse war (WEB-INF/lib)  ?

Classes included in user application are loaded by a different class loader 
that the one that load JBoss framework classes.
(JBoss framework classes are loaded by 
org.jboss.mx.loading.UnifiedClassLoader and classes included in a 
application are loaded by org.jboss.web.tomcat.service.WebAppClassLoader).

Because of this JMS/JTA interfaces defined in synapse code becomes 
*uncomparable to ones lookup from JNDI.

I guess the same for other application servers.

Is it possible to not include those two jar files in the war? this should be 
better than asking users to remove them. Or is there a better solution?

Thanks,
Irantha 



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