cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-1773) Refactor JMS transport for readability and simplicity (patch included)
Date Sat, 30 Aug 2008 00:17:44 GMT
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
             Fix For: 2.1.3


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.


Mime
View raw message