You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2008/10/03 20:06:44 UTC

[jira] Commented: (CXF-1832) Third step of Refactoring JMS Transport

    [ https://issues.apache.org/jira/browse/CXF-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636699#action_12636699 ] 

Christian Schneider commented on CXF-1832:
------------------------------------------

Added a second patch. The previous patch had a threading issue with QoS. I asked on the spring jira about this:
http://jira.springframework.org/browse/SPR-5183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Now I create a JmsTemplate for each message sent out. Accoding to Jürgen this should not affect performance too much.

Another issue was that the correlationId was added to the correlation map after the message was sent out. So if the receiver responds very fast it could happen that the message is received before the correlation map is filled. This would mean the message is lost.

The creation of JmsTemplates and DefaultMessageListenerContainers is now refactored into a JmsFactory. The same code is used for JmsCondduits and JmsDestinations.

All in all the lines of java code in the JMS Transport is now down to about 1800 lines from about 2700 lines in CXF 2.1.2. Like Fisheye shows
http://fisheye6.atlassian.com/chart/~charttype=Area,stacktype=None,extn=.java/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms

Still it should behave mostly like the old jms transport.

One urgent thing that is still to do is the encoding problem https://issues.apache.org/jira/browse/CXF-1749 but I am not sure how do to it exactly.

About the 2.0.x branch I am not sure. The changes are quite radical at least inside the module. As the 2.0.x branch should deliver mostly bug fixes I am not sure if it is a good idea to put this into the branch. I will ask on the dev list what to do.

> Third step of Refactoring JMS Transport
> ---------------------------------------
>
>                 Key: CXF-1832
>                 URL: https://issues.apache.org/jira/browse/CXF-1832
>             Project: CXF
>          Issue Type: Improvement
>          Components: Transports
>    Affects Versions: 2.1.2
>            Reporter: Christian Schneider
>             Fix For: 2.1.3
>
>
> I have completed the third step in the refactoring. This I have done the following things:
> - Rewritten JMSConfiguration. Removed JmsTemplate and MesssageListener. Added their config settings instead. I did this because I want the config to be reuseable over several services
> - Made JMSConduit asynchronous. Instead of doing a receive on the JmsTemplate I open one Spring DefaultMessageListenerContainer that waits for all replies. The sending threads then waits for the listener to receive the message. the communication happens over a synchronized map
> - Rewrite of JMSDestination to use JmsTemplate and DefaultMessageLIstener
> - First start of transactions. Support sessionTransacted and transactionManager
> - Removed JMSListenerThread, SessionFactory and PooledSession
> - Added documentation to most classes and methods
> Some things are not finished:
> - QoS settings do not work completely. I have implemented Qos that can be statically set using the config. Do we need different QoS settings per message?
> - QoS on the server is not thread safe. JmsTemplate does not support setting QoS when sending the message. You have to set things like priority in the properties. I think this should be improved in JmsTemplate
> - Several settings will probably not yet work
> - I have added TODO tasks to the code where I think some more work has to be done
> - Transactions will probably not yet work as we need to throw an exception when something happens. I guess when an exception occurs in the server code of the service we will not throw it up till the listener. Any ideas how to achieve this?
> I will try to do my first commit with my new account for this one
> Please feel free to give some feedback about the changes

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