You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jason Dwyer (JIRA)" <ji...@apache.org> on 2008/09/01 01:29:45 UTC

[jira] Commented: (CXF-1773) Refactor JMS transport for readability and simplicity (patch included)

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

Jason Dwyer commented on CXF-1773:
----------------------------------

hi,

i havent had a chance to dig into the patch, so apologies if this is already covered...

recently we were working witht he jms transport, and found a limitation that prevented us from parametizing our spring beans configuration with property placeholders, as it emerged the elements from the configuration were being passed to a jaxb parser rather than through spring, and rather than having the properties replaced, were being passed along to the jaxb deserialisation 

if the jms transport is to be refactored, would it be possible to also re-work the spring configuration ( and runtime interpretation ) such that any property placeholders are processed before instantiation of the transports?

from memory, this looked like a fairly big re-working, and our workaround was to write a few wrapper classes that _could_ be parametized, then have those set up the jms transport programatically, but this seemed very much a workaround rather than a permanent solution.



> Refactor JMS transport for readability and simplicity (patch included)
> ----------------------------------------------------------------------
>
>                 Key: CXF-1773
>                 URL: https://issues.apache.org/jira/browse/CXF-1773
>             Project: CXF
>          Issue Type: Improvement
>          Components: Transports
>    Affects Versions: 2.1.2
>            Reporter: Christian Schneider
>            Assignee: Willem Jiang
>             Fix For: 2.1.3
>
>         Attachments: cxf-1773-refactor-jms.patch
>
>
> In preparation for the planned improvements for JMS config like discussed on the mailing list the JMS transport should be refactored for readability.
> I have worked myself into the JMS code and at the start had some problems understanding what happened because of some structures in the code.
> The first thing was JMSTransportBase. Most of the class are methods that do not access any attributes. These methods could be made static and moved to the JMSUtil class. The method isDestinationStyleQueue is the only method that needs an attribute. I think it should have this attribute as a parameter and also be made static and moved to JMSUtils.
> The rest of JMSTransportBase are only holders for attributes that are then accessed from JMSConduit and JMSDestination directly (even without getters). So I think the whole class could be dumped and to attributes should be moved to the subclasses. The readability of JMSConduit and JMSDestination is much better afterwards as the class can be understood in itself.
> The next thing is JMSTransport which is used to feed JMSProviderHub. I think it should be cut down to the callback method connected and be renamed to JMSOnConnectCallBack. The other two methods can be added to the parameters of JMSProviderHub. The advantage is that it is much clearer what JMSProviderHub.connect needs and that connected is a callback that gets called at the end of connect.
> I have already done the refactorings and will attach a patch with them. Checkstyle, PMD and surefire show no problems.

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