You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/01/06 20:46:52 UTC

svn commit: r366555 [3/4] - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/types/ adb/src/org/apache/axis2/databinding/utils/ codegen/src/org/apache/axis2/schema/ codegen/src/org/apache/axis2/schema/i18n/ codegen/src/org...

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSConnectorFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSConnectorFactory.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSConnectorFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSConnectorFactory.java Fri Jan  6 11:46:16 2006
@@ -1,221 +1,221 @@
-/*
-* Copyright 2001, 2002,2004 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-package org.apache.axis2.transport.jms;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.HashMap;
-
-/**
- * JMSConnectorFactory is a factory class for creating JMSConnectors. It can
- * create both client connectors and server connectors.  A server connector
- * is configured to allow asynchronous message receipt, while a client
- * connector is not.
- * <p/>
- * JMSConnectorFactory can also be used to select an appropriately configured
- * JMSConnector from an existing pool of connectors.
- */
-public abstract class JMSConnectorFactory {
-    protected static Log log = LogFactory.getLog(JMSConnectorFactory.class.getName());
-
-    /**
-     * Static method to create a client connector. Client connectors cannot
-     * accept incoming requests.
-     *
-     * @param connectorConfig
-     * @param cfConfig
-     * @param username
-     * @param password
-     * @return
-     * @throws Exception
-     */
-    public static JMSConnector createClientConnector(HashMap connectorConfig, HashMap cfConfig,
-                                                     String username, String password, JMSVendorAdapter adapter)
-            throws Exception {
-        return createConnector(connectorConfig, cfConfig, false, username, password, adapter);
-    }
-
-    private static JMSConnector createConnector(HashMap connectorConfig, HashMap cfConfig,
-                                                boolean allowReceive, String username, String password, JMSVendorAdapter adapter)
-            throws Exception {
-        if (connectorConfig != null) {
-            connectorConfig = (HashMap) connectorConfig.clone();
-        }
-
-        int numRetries = MapUtils.removeIntProperty(connectorConfig, JMSConstants.NUM_RETRIES,
-                JMSConstants.DEFAULT_NUM_RETRIES);
-        int numSessions = MapUtils.removeIntProperty(connectorConfig, JMSConstants.NUM_SESSIONS,
-                JMSConstants.DEFAULT_NUM_SESSIONS);
-        long connectRetryInterval = MapUtils.removeLongProperty(connectorConfig,
-                JMSConstants.CONNECT_RETRY_INTERVAL,
-                JMSConstants.DEFAULT_CONNECT_RETRY_INTERVAL);
-        long interactRetryInterval = MapUtils.removeLongProperty(connectorConfig,
-                JMSConstants.INTERACT_RETRY_INTERVAL,
-                JMSConstants.DEFAULT_INTERACT_RETRY_INTERVAL);
-        long timeoutTime = MapUtils.removeLongProperty(connectorConfig, JMSConstants.TIMEOUT_TIME,
-                JMSConstants.DEFAULT_TIMEOUT_TIME);
-        String clientID = MapUtils.removeStringProperty(connectorConfig, JMSConstants.CLIENT_ID,
-                null);
-        String domain = MapUtils.removeStringProperty(connectorConfig, JMSConstants.DOMAIN,
-                JMSConstants.DOMAIN_DEFAULT);
-
-        // this will be set if the target endpoint address was set on the Axis call
-        JMSURLHelper jmsurl = (JMSURLHelper) connectorConfig.get(JMSConstants.JMS_URL);
-
-        if (cfConfig == null) {
-            throw new IllegalArgumentException("noCfConfig");
-        }
-
-        if (domain.equals(JMSConstants.DOMAIN_QUEUE)) {
-            return new QueueConnector(adapter.getQueueConnectionFactory(cfConfig), numRetries,
-                    numSessions, connectRetryInterval, interactRetryInterval,
-                    timeoutTime, allowReceive, clientID, username, password,
-                    adapter, jmsurl);
-        } else    // domain is Topic
-        {
-            return new TopicConnector(adapter.getTopicConnectionFactory(cfConfig), numRetries,
-                    numSessions, connectRetryInterval, interactRetryInterval,
-                    timeoutTime, allowReceive, clientID, username, password,
-                    adapter, jmsurl);
-        }
-    }
-
-    /**
-     * Static method to create a server connector. Server connectors can
-     * accept incoming requests.
-     *
-     * @param connectorConfig
-     * @param cfConfig
-     * @param username
-     * @param password
-     * @return
-     * @throws Exception
-     */
-    public static JMSConnector createServerConnector(HashMap connectorConfig, HashMap cfConfig,
-                                                     String username, String password, JMSVendorAdapter adapter)
-            throws Exception {
-        return createConnector(connectorConfig, cfConfig, true, username, password, adapter);
-    }
-
-    /**
-     * Performs an initial check on the connector properties, and then defers
-     * to the vendor adapter for matching on the vendor-specific connection factory.
-     *
-     * @param connectors     the list of potential matches
-     * @param connectorProps the set of properties to be used for matching the connector
-     * @param cfProps        the set of properties to be used for matching the connection factory
-     * @param username       the user requesting the connector
-     * @param password       the password associated with the requesting user
-     * @param adapter        the vendor adapter specified in the JMS URL
-     * @return a JMSConnector that matches the specified properties
-     */
-    public static JMSConnector matchConnector(java.util.Set connectors, HashMap connectorProps,
-                                              HashMap cfProps, String username, String password, JMSVendorAdapter adapter) {
-        java.util.Iterator iter = connectors.iterator();
-
-        while (iter.hasNext()) {
-            JMSConnector conn = (JMSConnector) iter.next();
-
-            // username
-            String connectorUsername = conn.getUsername();
-
-            if (!(((connectorUsername == null) && (username == null))
-                    || ((connectorUsername != null) && (username != null)
-                    && (connectorUsername.equals(username))))) {
-                continue;
-            }
-
-            // password
-            String connectorPassword = conn.getPassword();
-
-            if (!(((connectorPassword == null) && (password == null))
-                    || ((connectorPassword != null) && (password != null)
-                    && (connectorPassword.equals(password))))) {
-                continue;
-            }
-
-            // num retries
-            int connectorNumRetries = conn.getNumRetries();
-            String propertyNumRetries = (String) connectorProps.get(JMSConstants.NUM_RETRIES);
-            int numRetries = JMSConstants.DEFAULT_NUM_RETRIES;
-
-            if (propertyNumRetries != null) {
-                numRetries = Integer.parseInt(propertyNumRetries);
-            }
-
-            if (connectorNumRetries != numRetries) {
-                continue;
-            }
-
-            // client id
-            String connectorClientID = conn.getClientID();
-            String clientID = (String) connectorProps.get(JMSConstants.CLIENT_ID);
-
-            if (!(((connectorClientID == null) && (clientID == null))
-                    || ((connectorClientID != null) && (clientID != null)
-                    && connectorClientID.equals(clientID)))) {
-                continue;
-            }
-
-            // domain
-            String connectorDomain = (conn instanceof QueueConnector)
-                    ? JMSConstants.DOMAIN_QUEUE
-                    : JMSConstants.DOMAIN_TOPIC;
-            String propertyDomain = (String) connectorProps.get(JMSConstants.DOMAIN);
-            String domain = JMSConstants.DOMAIN_DEFAULT;
-
-            if (propertyDomain != null) {
-                domain = propertyDomain;
-            }
-
-            if (!(((connectorDomain == null) && (domain == null))
-                    || ((connectorDomain != null) && (domain != null)
-                    && connectorDomain.equalsIgnoreCase(domain)))) {
-                continue;
-            }
-
-            // the connection factory must also match for the connector to be reused
-            JMSURLHelper jmsurl = conn.getJMSURL();
-
-            if (adapter.isMatchingConnectionFactory(conn.getConnectionFactory(), jmsurl, cfProps)) {
-
-                // attempt to reserve the connector
-                try {
-                    JMSConnectorManager.getInstance().reserve(conn);
-
-                    if (log.isDebugEnabled()) {
-                        log.debug("JMSConnectorFactory: Found matching connector");
-                    }
-                } catch (Exception e) {
-
-                    // ignore. the connector may be in the process of shutting down, so try the next element
-                    continue;
-                }
-
-                return conn;
-            }
-        }
-
-        if (log.isDebugEnabled()) {
-            log.debug("JMSConnectorFactory: No matching connectors found");
-        }
-
-        return null;
-    }
-}
+/*
+* Copyright 2001, 2002,2004 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.axis2.transport.jms;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.HashMap;
+
+/**
+ * JMSConnectorFactory is a factory class for creating JMSConnectors. It creates
+ * both client connectors and server connectors.  A server connector
+ * is configured to allow asynchronous message receipt, while a client
+ * connector is not.
+ * <p/>
+ * JMSConnectorFactory is also used to select an appropriately configured
+ * JMSConnector from an existing pool of connectors.
+ */
+public abstract class JMSConnectorFactory {
+    protected static Log log = LogFactory.getLog(JMSConnectorFactory.class.getName());
+
+    /**
+     * Static method to create a client connector. Client connectors cannot
+     * accept incoming requests.
+     *
+     * @param connectorConfig
+     * @param cfConfig
+     * @param username
+     * @param password
+     * @return Returns JMSConnector.
+     * @throws Exception
+     */
+    public static JMSConnector createClientConnector(HashMap connectorConfig, HashMap cfConfig,
+                                                     String username, String password, JMSVendorAdapter adapter)
+            throws Exception {
+        return createConnector(connectorConfig, cfConfig, false, username, password, adapter);
+    }
+
+    private static JMSConnector createConnector(HashMap connectorConfig, HashMap cfConfig,
+                                                boolean allowReceive, String username, String password, JMSVendorAdapter adapter)
+            throws Exception {
+        if (connectorConfig != null) {
+            connectorConfig = (HashMap) connectorConfig.clone();
+        }
+
+        int numRetries = MapUtils.removeIntProperty(connectorConfig, JMSConstants.NUM_RETRIES,
+                JMSConstants.DEFAULT_NUM_RETRIES);
+        int numSessions = MapUtils.removeIntProperty(connectorConfig, JMSConstants.NUM_SESSIONS,
+                JMSConstants.DEFAULT_NUM_SESSIONS);
+        long connectRetryInterval = MapUtils.removeLongProperty(connectorConfig,
+                JMSConstants.CONNECT_RETRY_INTERVAL,
+                JMSConstants.DEFAULT_CONNECT_RETRY_INTERVAL);
+        long interactRetryInterval = MapUtils.removeLongProperty(connectorConfig,
+                JMSConstants.INTERACT_RETRY_INTERVAL,
+                JMSConstants.DEFAULT_INTERACT_RETRY_INTERVAL);
+        long timeoutTime = MapUtils.removeLongProperty(connectorConfig, JMSConstants.TIMEOUT_TIME,
+                JMSConstants.DEFAULT_TIMEOUT_TIME);
+        String clientID = MapUtils.removeStringProperty(connectorConfig, JMSConstants.CLIENT_ID,
+                null);
+        String domain = MapUtils.removeStringProperty(connectorConfig, JMSConstants.DOMAIN,
+                JMSConstants.DOMAIN_DEFAULT);
+
+        // this will be set if the target endpoint address was set on the Axis call
+        JMSURLHelper jmsurl = (JMSURLHelper) connectorConfig.get(JMSConstants.JMS_URL);
+
+        if (cfConfig == null) {
+            throw new IllegalArgumentException("noCfConfig");
+        }
+
+        if (domain.equals(JMSConstants.DOMAIN_QUEUE)) {
+            return new QueueConnector(adapter.getQueueConnectionFactory(cfConfig), numRetries,
+                    numSessions, connectRetryInterval, interactRetryInterval,
+                    timeoutTime, allowReceive, clientID, username, password,
+                    adapter, jmsurl);
+        } else    // domain is Topic
+        {
+            return new TopicConnector(adapter.getTopicConnectionFactory(cfConfig), numRetries,
+                    numSessions, connectRetryInterval, interactRetryInterval,
+                    timeoutTime, allowReceive, clientID, username, password,
+                    adapter, jmsurl);
+        }
+    }
+
+    /**
+     * Static method to create a server connector. Server connectors can
+     * accept incoming requests.
+     *
+     * @param connectorConfig
+     * @param cfConfig
+     * @param username
+     * @param password
+     * @return Returns JMSConnector.
+     * @throws Exception
+     */
+    public static JMSConnector createServerConnector(HashMap connectorConfig, HashMap cfConfig,
+                                                     String username, String password, JMSVendorAdapter adapter)
+            throws Exception {
+        return createConnector(connectorConfig, cfConfig, true, username, password, adapter);
+    }
+
+    /**
+     * Performs an initial check on the connector properties, and then defers
+     * to the vendor adapter for matching on the vendor-specific connection factory.
+     *
+     * @param connectors     the list of potential matches
+     * @param connectorProps the set of properties to be used for matching the connector
+     * @param cfProps        the set of properties to be used for matching the connection factory
+     * @param username       the user requesting the connector
+     * @param password       the password associated with the requesting user
+     * @param adapter        the vendor adapter specified in the JMS URL
+     * @return Returns a JMSConnector that matches the specified properties.
+     */
+    public static JMSConnector matchConnector(java.util.Set connectors, HashMap connectorProps,
+                                              HashMap cfProps, String username, String password, JMSVendorAdapter adapter) {
+        java.util.Iterator iter = connectors.iterator();
+
+        while (iter.hasNext()) {
+            JMSConnector conn = (JMSConnector) iter.next();
+
+            // username
+            String connectorUsername = conn.getUsername();
+
+            if (!(((connectorUsername == null) && (username == null))
+                    || ((connectorUsername != null) && (username != null)
+                    && (connectorUsername.equals(username))))) {
+                continue;
+            }
+
+            // password
+            String connectorPassword = conn.getPassword();
+
+            if (!(((connectorPassword == null) && (password == null))
+                    || ((connectorPassword != null) && (password != null)
+                    && (connectorPassword.equals(password))))) {
+                continue;
+            }
+
+            // num retries
+            int connectorNumRetries = conn.getNumRetries();
+            String propertyNumRetries = (String) connectorProps.get(JMSConstants.NUM_RETRIES);
+            int numRetries = JMSConstants.DEFAULT_NUM_RETRIES;
+
+            if (propertyNumRetries != null) {
+                numRetries = Integer.parseInt(propertyNumRetries);
+            }
+
+            if (connectorNumRetries != numRetries) {
+                continue;
+            }
+
+            // client id
+            String connectorClientID = conn.getClientID();
+            String clientID = (String) connectorProps.get(JMSConstants.CLIENT_ID);
+
+            if (!(((connectorClientID == null) && (clientID == null))
+                    || ((connectorClientID != null) && (clientID != null)
+                    && connectorClientID.equals(clientID)))) {
+                continue;
+            }
+
+            // domain
+            String connectorDomain = (conn instanceof QueueConnector)
+                    ? JMSConstants.DOMAIN_QUEUE
+                    : JMSConstants.DOMAIN_TOPIC;
+            String propertyDomain = (String) connectorProps.get(JMSConstants.DOMAIN);
+            String domain = JMSConstants.DOMAIN_DEFAULT;
+
+            if (propertyDomain != null) {
+                domain = propertyDomain;
+            }
+
+            if (!(((connectorDomain == null) && (domain == null))
+                    || ((connectorDomain != null) && (domain != null)
+                    && connectorDomain.equalsIgnoreCase(domain)))) {
+                continue;
+            }
+
+            // the connection factory must also match for the connector to be reused
+            JMSURLHelper jmsurl = conn.getJMSURL();
+
+            if (adapter.isMatchingConnectionFactory(conn.getConnectionFactory(), jmsurl, cfProps)) {
+
+                // attempt to reserve the connector
+                try {
+                    JMSConnectorManager.getInstance().reserve(conn);
+
+                    if (log.isDebugEnabled()) {
+                        log.debug("JMSConnectorFactory: Found matching connector");
+                    }
+                } catch (Exception e) {
+
+                    // ignore. the connector may be in the process of shutting down, so try the next element
+                    continue;
+                }
+
+                return conn;
+            }
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("JMSConnectorFactory: No matching connectors found");
+        }
+
+        return null;
+    }
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSEndpoint.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSEndpoint.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSEndpoint.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/JMSEndpoint.java Fri Jan  6 11:46:16 2006
@@ -1,154 +1,154 @@
-/*
-* Copyright 2001, 2002,2004 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-package org.apache.axis2.transport.jms;
-
-import javax.jms.Destination;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import java.util.HashMap;
-
-/**
- * JMSEndpoint encapsulates interactions w/ a JMS destination.
- */
-public abstract class JMSEndpoint {
-    private JMSConnector m_connector;
-
-    protected JMSEndpoint(JMSConnector connector) {
-        m_connector = connector;
-    }
-
-    /**
-     * Send a message and wait for a response.
-     *
-     * @param message
-     * @param timeout
-     * @return
-     * @throws javax.jms.JMSException
-     */
-    public byte[] call(byte[] message, long timeout) throws Exception {
-        return m_connector.getSendConnection().call(this, message, timeout, null);
-    }
-
-    /**
-     * Send a message and wait for a response.
-     *
-     * @param message
-     * @param timeout
-     * @param properties
-     * @return
-     * @throws javax.jms.JMSException
-     */
-    public byte[] call(byte[] message, long timeout, HashMap properties) throws Exception {
-        if (properties != null) {
-            properties = (HashMap) properties.clone();
-        }
-
-        return m_connector.getSendConnection().call(this, message, timeout, properties);
-    }
-
-    protected Subscription createSubscription(MessageListener listener, HashMap properties) {
-        return new Subscription(listener, this, properties);
-    }
-
-    public boolean equals(Object object) {
-        if ((object == null) || !(object instanceof JMSEndpoint)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-    /**
-     * Register a MessageListener.
-     *
-     * @param listener
-     * @throws javax.jms.JMSException
-     */
-    public void registerListener(MessageListener listener) throws Exception {
-        m_connector.getReceiveConnection().subscribe(createSubscription(listener, null));
-    }
-
-    /**
-     * Register a MessageListener.
-     *
-     * @param listener
-     * @param properties
-     * @throws javax.jms.JMSException
-     */
-    public void registerListener(MessageListener listener, HashMap properties) throws Exception {
-        if (properties != null) {
-            properties = (HashMap) properties.clone();
-        }
-
-        m_connector.getReceiveConnection().subscribe(createSubscription(listener, properties));
-    }
-
-    /**
-     * Send a message w/o waiting for a response.
-     *
-     * @param message
-     * @throws javax.jms.JMSException
-     */
-    public void send(byte[] message) throws Exception {
-        m_connector.getSendConnection().send(this, message, null);
-    }
-
-    /**
-     * Send a message w/o waiting for a response.
-     *
-     * @param message
-     * @param properties
-     * @throws javax.jms.JMSException
-     */
-    public void send(byte[] message, HashMap properties) throws Exception {
-        if (properties != null) {
-            properties = (HashMap) properties.clone();
-        }
-
-        m_connector.getSendConnection().send(this, message, properties);
-    }
-
-    /**
-     * Unregister a message listener.
-     *
-     * @param listener
-     */
-    public void unregisterListener(MessageListener listener) {
-        m_connector.getReceiveConnection().unsubscribe(createSubscription(listener, null));
-    }
-
-    /**
-     * Unregister a message listener.
-     *
-     * @param listener
-     * @param properties
-     */
-    public void unregisterListener(MessageListener listener, HashMap properties) {
-        if (properties != null) {
-            properties = (HashMap) properties.clone();
-        }
-
-        m_connector.getReceiveConnection().unsubscribe(createSubscription(listener, properties));
-    }
-
-    abstract Destination getDestination(Session session) throws Exception;
-}
+/*
+* Copyright 2001, 2002,2004 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.axis2.transport.jms;
+
+import javax.jms.Destination;
+import javax.jms.MessageListener;
+import javax.jms.Session;
+import java.util.HashMap;
+
+/**
+ * JMSEndpoint encapsulates interactions with a JMS destination.
+ */
+public abstract class JMSEndpoint {
+    private JMSConnector m_connector;
+
+    protected JMSEndpoint(JMSConnector connector) {
+        m_connector = connector;
+    }
+
+    /**
+     * Sends a message and waits for a response.
+     *
+     * @param message
+     * @param timeout
+     * @return Returns byte[].
+     * @throws javax.jms.JMSException
+     */
+    public byte[] call(byte[] message, long timeout) throws Exception {
+        return m_connector.getSendConnection().call(this, message, timeout, null);
+    }
+
+    /**
+     * Send a message and wait for a response.
+     *
+     * @param message
+     * @param timeout
+     * @param properties
+     * @return Returns byte[].
+     * @throws javax.jms.JMSException
+     */
+    public byte[] call(byte[] message, long timeout, HashMap properties) throws Exception {
+        if (properties != null) {
+            properties = (HashMap) properties.clone();
+        }
+
+        return m_connector.getSendConnection().call(this, message, timeout, properties);
+    }
+
+    protected Subscription createSubscription(MessageListener listener, HashMap properties) {
+        return new Subscription(listener, this, properties);
+    }
+
+    public boolean equals(Object object) {
+        if ((object == null) || !(object instanceof JMSEndpoint)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public int hashCode() {
+        return toString().hashCode();
+    }
+
+    /**
+     * Registers a MessageListener.
+     *
+     * @param listener
+     * @throws javax.jms.JMSException
+     */
+    public void registerListener(MessageListener listener) throws Exception {
+        m_connector.getReceiveConnection().subscribe(createSubscription(listener, null));
+    }
+
+    /**
+     * Registers a MessageListener.
+     *
+     * @param listener
+     * @param properties
+     * @throws javax.jms.JMSException
+     */
+    public void registerListener(MessageListener listener, HashMap properties) throws Exception {
+        if (properties != null) {
+            properties = (HashMap) properties.clone();
+        }
+
+        m_connector.getReceiveConnection().subscribe(createSubscription(listener, properties));
+    }
+
+    /**
+     * Sends a message without waiting for a response.
+     *
+     * @param message
+     * @throws javax.jms.JMSException
+     */
+    public void send(byte[] message) throws Exception {
+        m_connector.getSendConnection().send(this, message, null);
+    }
+
+    /**
+     * Sends a message without waiting for a response.
+     *
+     * @param message
+     * @param properties
+     * @throws javax.jms.JMSException
+     */
+    public void send(byte[] message, HashMap properties) throws Exception {
+        if (properties != null) {
+            properties = (HashMap) properties.clone();
+        }
+
+        m_connector.getSendConnection().send(this, message, properties);
+    }
+
+    /**
+     * Unregisters a message listener.
+     *
+     * @param listener
+     */
+    public void unregisterListener(MessageListener listener) {
+        m_connector.getReceiveConnection().unsubscribe(createSubscription(listener, null));
+    }
+
+    /**
+     * Unregisters a message listener.
+     *
+     * @param listener
+     * @param properties
+     */
+    public void unregisterListener(MessageListener listener, HashMap properties) {
+        if (properties != null) {
+            properties = (HashMap) properties.clone();
+        }
+
+        m_connector.getReceiveConnection().unsubscribe(createSubscription(listener, properties));
+    }
+
+    abstract Destination getDestination(Session session) throws Exception;
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/QueueConnector.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/QueueConnector.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/QueueConnector.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/QueueConnector.java Fri Jan  6 11:46:16 2006
@@ -1,223 +1,223 @@
-/*
-* Copyright 2001, 2002,2004 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-package org.apache.axis2.transport.jms;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TemporaryQueue;
-
-/**
- * QueueConnector is a concrete JMSConnector subclass that specifically handles
- * connections to queues (ptp domain).
- */
-public class QueueConnector extends JMSConnector {
-    public QueueConnector(ConnectionFactory factory, int numRetries, int numSessions,
-                          long connectRetryInterval, long interactRetryInterval, long timeoutTime,
-                          boolean allowReceive, String clientID, String username, String password,
-                          JMSVendorAdapter adapter, JMSURLHelper jmsurl)
-            throws JMSException {
-        super(factory, numRetries, numSessions, connectRetryInterval, interactRetryInterval,
-                timeoutTime, allowReceive, clientID, username, password, adapter, jmsurl);
-    }
-
-    protected AsyncConnection createAsyncConnection(ConnectionFactory factory,
-                                                    javax.jms.Connection connection, String threadName, String clientID, String username,
-                                                    String password)
-            throws JMSException {
-        return new QueueAsyncConnection((QueueConnectionFactory) factory,
-                (QueueConnection) connection, threadName, clientID,
-                username, password);
-    }
-
-    /**
-     * Create an endpoint for a queue destination.
-     *
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public JMSEndpoint createEndpoint(Destination destination) throws JMSException {
-        if (!(destination instanceof Queue)) {
-            throw new IllegalArgumentException("The input must be a queue for this connector");
-        }
-
-        return new QueueDestinationEndpoint((Queue) destination);
-    }
-
-    public JMSEndpoint createEndpoint(String destination) {
-        return new QueueEndpoint(destination);
-    }
-
-    private Queue createQueue(QueueSession session, String subject) throws Exception {
-        return m_adapter.getQueue(session, subject);
-    }
-
-    private QueueSession createQueueSession(QueueConnection connection, int ackMode)
-            throws JMSException {
-        return connection.createQueueSession(false, ackMode);
-    }
-
-    private QueueReceiver createReceiver(QueueSession session, Queue queue, String messageSelector)
-            throws JMSException {
-        return session.createReceiver(queue, messageSelector);
-    }
-
-    protected SyncConnection createSyncConnection(ConnectionFactory factory,
-                                                  javax.jms.Connection connection, int numSessions, String threadName, String clientID,
-                                                  String username, String password)
-            throws JMSException {
-        return new QueueSyncConnection((QueueConnectionFactory) factory,
-                (QueueConnection) connection, numSessions, threadName,
-                clientID, username, password);
-    }
-
-    protected javax.jms.Connection internalConnect(ConnectionFactory connectionFactory,
-                                                   String username, String password)
-            throws JMSException {
-        QueueConnectionFactory qcf = (QueueConnectionFactory) connectionFactory;
-
-        if (username == null) {
-            return qcf.createQueueConnection();
-        }
-
-        return qcf.createQueueConnection(username, password);
-    }
-
-    private final class QueueAsyncConnection extends AsyncConnection {
-        QueueAsyncConnection(QueueConnectionFactory connectionFactory, QueueConnection connection,
-                             String threadName, String clientID, String username, String password)
-                throws JMSException {
-            super(connectionFactory, connection, threadName, clientID, username, password);
-        }
-
-        protected ListenerSession createListenerSession(javax.jms.Connection connection,
-                                                        Subscription subscription)
-                throws Exception {
-            QueueSession session = createQueueSession((QueueConnection) connection,
-                    subscription.m_ackMode);
-            QueueReceiver receiver = createReceiver(session,
-                    (Queue) subscription.m_endpoint.getDestination(session),
-                    subscription.m_messageSelector);
-
-            return new ListenerSession(session, receiver, subscription);
-        }
-    }
-
-
-    private final class QueueDestinationEndpoint extends QueueEndpoint {
-        Queue m_queue;
-
-        QueueDestinationEndpoint(Queue queue) throws JMSException {
-            super(queue.getQueueName());
-            m_queue = queue;
-        }
-
-        Destination getDestination(Session session) {
-            return m_queue;
-        }
-    }
-
-
-    private class QueueEndpoint extends JMSEndpoint {
-        String m_queueName;
-
-        QueueEndpoint(String queueName) {
-            super(QueueConnector.this);
-            m_queueName = queueName;
-        }
-
-        public boolean equals(Object object) {
-            if (!super.equals(object)) {
-                return false;
-            }
-
-            if (!(object instanceof QueueEndpoint)) {
-                return false;
-            }
-
-            return m_queueName.equals(((QueueEndpoint) object).m_queueName);
-        }
-
-        public String toString() {
-            StringBuffer buffer = new StringBuffer("QueueEndpoint:");
-
-            buffer.append(m_queueName);
-
-            return buffer.toString();
-        }
-
-        Destination getDestination(Session session) throws Exception {
-            return createQueue((QueueSession) session, m_queueName);
-        }
-    }
-
-
-    private final class QueueSyncConnection extends SyncConnection {
-        QueueSyncConnection(QueueConnectionFactory connectionFactory, QueueConnection connection,
-                            int numSessions, String threadName, String clientID, String username,
-                            String password)
-                throws JMSException {
-            super(connectionFactory, connection, numSessions, threadName, clientID, username,
-                    password);
-        }
-
-        protected SendSession createSendSession(javax.jms.Connection connection)
-                throws JMSException {
-            QueueSession session = createQueueSession((QueueConnection) connection,
-                    JMSConstants.DEFAULT_ACKNOWLEDGE_MODE);
-            QueueSender sender = session.createSender(null);
-
-            return new QueueSendSession(session, sender);
-        }
-
-        private final class QueueSendSession extends SendSession {
-            QueueSendSession(QueueSession session, QueueSender sender) throws JMSException {
-                super(session, sender);
-            }
-
-            protected MessageConsumer createConsumer(Destination destination) throws JMSException {
-                return createReceiver((QueueSession) m_session, (Queue) destination, null);
-            }
-
-            protected Destination createTemporaryDestination() throws JMSException {
-                return ((QueueSession) m_session).createTemporaryQueue();
-            }
-
-            protected void deleteTemporaryDestination(Destination destination) throws JMSException {
-                ((TemporaryQueue) destination).delete();
-            }
-
-            protected void send(Destination destination, Message message, int deliveryMode,
-                                int priority, long timeToLive)
-                    throws JMSException {
-                ((QueueSender) m_producer).send((Queue) destination, message, deliveryMode,
-                        priority, timeToLive);
-            }
-        }
-    }
-}
+/*
+* Copyright 2001, 2002,2004 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.axis2.transport.jms;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+
+/**
+ * QueueConnector is a concrete JMSConnector subclass that specifically handles
+ * connections to queues (ptp domain).
+ */
+public class QueueConnector extends JMSConnector {
+    public QueueConnector(ConnectionFactory factory, int numRetries, int numSessions,
+                          long connectRetryInterval, long interactRetryInterval, long timeoutTime,
+                          boolean allowReceive, String clientID, String username, String password,
+                          JMSVendorAdapter adapter, JMSURLHelper jmsurl)
+            throws JMSException {
+        super(factory, numRetries, numSessions, connectRetryInterval, interactRetryInterval,
+                timeoutTime, allowReceive, clientID, username, password, adapter, jmsurl);
+    }
+
+    protected AsyncConnection createAsyncConnection(ConnectionFactory factory,
+                                                    javax.jms.Connection connection, String threadName, String clientID, String username,
+                                                    String password)
+            throws JMSException {
+        return new QueueAsyncConnection((QueueConnectionFactory) factory,
+                (QueueConnection) connection, threadName, clientID,
+                username, password);
+    }
+
+    /**
+     * Creates an endpoint for a queue destination.
+     *
+     * @param destination
+     * @return Returns JMSEndPoint.
+     * @throws JMSException
+     */
+    public JMSEndpoint createEndpoint(Destination destination) throws JMSException {
+        if (!(destination instanceof Queue)) {
+            throw new IllegalArgumentException("The input must be a queue for this connector");
+        }
+
+        return new QueueDestinationEndpoint((Queue) destination);
+    }
+
+    public JMSEndpoint createEndpoint(String destination) {
+        return new QueueEndpoint(destination);
+    }
+
+    private Queue createQueue(QueueSession session, String subject) throws Exception {
+        return m_adapter.getQueue(session, subject);
+    }
+
+    private QueueSession createQueueSession(QueueConnection connection, int ackMode)
+            throws JMSException {
+        return connection.createQueueSession(false, ackMode);
+    }
+
+    private QueueReceiver createReceiver(QueueSession session, Queue queue, String messageSelector)
+            throws JMSException {
+        return session.createReceiver(queue, messageSelector);
+    }
+
+    protected SyncConnection createSyncConnection(ConnectionFactory factory,
+                                                  javax.jms.Connection connection, int numSessions, String threadName, String clientID,
+                                                  String username, String password)
+            throws JMSException {
+        return new QueueSyncConnection((QueueConnectionFactory) factory,
+                (QueueConnection) connection, numSessions, threadName,
+                clientID, username, password);
+    }
+
+    protected javax.jms.Connection internalConnect(ConnectionFactory connectionFactory,
+                                                   String username, String password)
+            throws JMSException {
+        QueueConnectionFactory qcf = (QueueConnectionFactory) connectionFactory;
+
+        if (username == null) {
+            return qcf.createQueueConnection();
+        }
+
+        return qcf.createQueueConnection(username, password);
+    }
+
+    private final class QueueAsyncConnection extends AsyncConnection {
+        QueueAsyncConnection(QueueConnectionFactory connectionFactory, QueueConnection connection,
+                             String threadName, String clientID, String username, String password)
+                throws JMSException {
+            super(connectionFactory, connection, threadName, clientID, username, password);
+        }
+
+        protected ListenerSession createListenerSession(javax.jms.Connection connection,
+                                                        Subscription subscription)
+                throws Exception {
+            QueueSession session = createQueueSession((QueueConnection) connection,
+                    subscription.m_ackMode);
+            QueueReceiver receiver = createReceiver(session,
+                    (Queue) subscription.m_endpoint.getDestination(session),
+                    subscription.m_messageSelector);
+
+            return new ListenerSession(session, receiver, subscription);
+        }
+    }
+
+
+    private final class QueueDestinationEndpoint extends QueueEndpoint {
+        Queue m_queue;
+
+        QueueDestinationEndpoint(Queue queue) throws JMSException {
+            super(queue.getQueueName());
+            m_queue = queue;
+        }
+
+        Destination getDestination(Session session) {
+            return m_queue;
+        }
+    }
+
+
+    private class QueueEndpoint extends JMSEndpoint {
+        String m_queueName;
+
+        QueueEndpoint(String queueName) {
+            super(QueueConnector.this);
+            m_queueName = queueName;
+        }
+
+        public boolean equals(Object object) {
+            if (!super.equals(object)) {
+                return false;
+            }
+
+            if (!(object instanceof QueueEndpoint)) {
+                return false;
+            }
+
+            return m_queueName.equals(((QueueEndpoint) object).m_queueName);
+        }
+
+        public String toString() {
+            StringBuffer buffer = new StringBuffer("QueueEndpoint:");
+
+            buffer.append(m_queueName);
+
+            return buffer.toString();
+        }
+
+        Destination getDestination(Session session) throws Exception {
+            return createQueue((QueueSession) session, m_queueName);
+        }
+    }
+
+
+    private final class QueueSyncConnection extends SyncConnection {
+        QueueSyncConnection(QueueConnectionFactory connectionFactory, QueueConnection connection,
+                            int numSessions, String threadName, String clientID, String username,
+                            String password)
+                throws JMSException {
+            super(connectionFactory, connection, numSessions, threadName, clientID, username,
+                    password);
+        }
+
+        protected SendSession createSendSession(javax.jms.Connection connection)
+                throws JMSException {
+            QueueSession session = createQueueSession((QueueConnection) connection,
+                    JMSConstants.DEFAULT_ACKNOWLEDGE_MODE);
+            QueueSender sender = session.createSender(null);
+
+            return new QueueSendSession(session, sender);
+        }
+
+        private final class QueueSendSession extends SendSession {
+            QueueSendSession(QueueSession session, QueueSender sender) throws JMSException {
+                super(session, sender);
+            }
+
+            protected MessageConsumer createConsumer(Destination destination) throws JMSException {
+                return createReceiver((QueueSession) m_session, (Queue) destination, null);
+            }
+
+            protected Destination createTemporaryDestination() throws JMSException {
+                return ((QueueSession) m_session).createTemporaryQueue();
+            }
+
+            protected void deleteTemporaryDestination(Destination destination) throws JMSException {
+                ((TemporaryQueue) destination).delete();
+            }
+
+            protected void send(Destination destination, Message message, int deliveryMode,
+                                int priority, long timeToLive)
+                    throws JMSException {
+                ((QueueSender) m_producer).send((Queue) destination, message, deliveryMode,
+                        priority, timeToLive);
+            }
+        }
+    }
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/TopicConnector.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/TopicConnector.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/TopicConnector.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/jms/TopicConnector.java Fri Jan  6 11:46:16 2006
@@ -1,337 +1,337 @@
-/*
-* Copyright 2001, 2002,2004 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-package org.apache.axis2.transport.jms;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.TemporaryTopic;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.jms.TopicSubscriber;
-import java.util.HashMap;
-
-/**
- * TopicConnector is a concrete JMSConnector subclass that specifically handles
- * connections to topics (pub-sub domain).
- */
-public class TopicConnector extends JMSConnector {
-    public TopicConnector(TopicConnectionFactory factory, int numRetries, int numSessions,
-                          long connectRetryInterval, long interactRetryInterval, long timeoutTime,
-                          boolean allowReceive, String clientID, String username, String password,
-                          JMSVendorAdapter adapter, JMSURLHelper jmsurl)
-            throws JMSException {
-        super(factory, numRetries, numSessions, connectRetryInterval, interactRetryInterval,
-                timeoutTime, allowReceive, clientID, username, password, adapter, jmsurl);
-    }
-
-    protected AsyncConnection createAsyncConnection(ConnectionFactory factory,
-                                                    javax.jms.Connection connection, String threadName, String clientID, String username,
-                                                    String password)
-            throws JMSException {
-        return new TopicAsyncConnection((TopicConnectionFactory) factory,
-                (TopicConnection) connection, threadName, clientID,
-                username, password);
-    }
-
-    private TopicSubscriber createDurableSubscriber(TopicSession session, Topic topic,
-                                                    String subscriptionName, String messageSelector, boolean noLocal)
-            throws JMSException {
-        return session.createDurableSubscriber(topic, subscriptionName, messageSelector, noLocal);
-    }
-
-    /**
-     * Create an endpoint for a queue destination.
-     *
-     * @param destination
-     * @return
-     * @throws JMSException
-     */
-    public JMSEndpoint createEndpoint(Destination destination) throws JMSException {
-        if (!(destination instanceof Topic)) {
-            throw new IllegalArgumentException("The input be a topic for this connector");
-        }
-
-        return new TopicDestinationEndpoint((Topic) destination);
-    }
-
-    public JMSEndpoint createEndpoint(String destination) {
-        return new TopicEndpoint(destination);
-    }
-
-    private TopicSubscriber createSubscriber(TopicSession session, TopicSubscription subscription)
-            throws Exception {
-        if (subscription.isDurable()) {
-            return createDurableSubscriber(session,
-                    (Topic) subscription.m_endpoint.getDestination(session),
-                    subscription.m_subscriptionName,
-                    subscription.m_messageSelector, subscription.m_noLocal);
-        } else {
-            return createSubscriber(session,
-                    (Topic) subscription.m_endpoint.getDestination(session),
-                    subscription.m_messageSelector, subscription.m_noLocal);
-        }
-    }
-
-    private TopicSubscriber createSubscriber(TopicSession session, Topic topic,
-                                             String messageSelector, boolean noLocal)
-            throws JMSException {
-        return session.createSubscriber(topic, messageSelector, noLocal);
-    }
-
-    protected SyncConnection createSyncConnection(ConnectionFactory factory,
-                                                  javax.jms.Connection connection, int numSessions, String threadName, String clientID,
-                                                  String username, String password)
-            throws JMSException {
-        return new TopicSyncConnection((TopicConnectionFactory) factory,
-                (TopicConnection) connection, numSessions, threadName,
-                clientID, username, password);
-    }
-
-    private Topic createTopic(TopicSession session, String subject) throws Exception {
-        return m_adapter.getTopic(session, subject);
-    }
-
-    private TopicSession createTopicSession(TopicConnection connection, int ackMode)
-            throws JMSException {
-        return connection.createTopicSession(false, ackMode);
-    }
-
-    protected javax.jms.Connection internalConnect(ConnectionFactory connectionFactory,
-                                                   String username, String password)
-            throws JMSException {
-        TopicConnectionFactory tcf = (TopicConnectionFactory) connectionFactory;
-
-        if (username == null) {
-            return tcf.createTopicConnection();
-        }
-
-        return tcf.createTopicConnection(username, password);
-    }
-
-    private final class TopicAsyncConnection extends AsyncConnection {
-        TopicAsyncConnection(TopicConnectionFactory connectionFactory, TopicConnection connection,
-                             String threadName, String clientID, String username, String password)
-                throws JMSException {
-            super(connectionFactory, connection, threadName, clientID, username, password);
-        }
-
-        protected ListenerSession createListenerSession(javax.jms.Connection connection,
-                                                        Subscription subscription)
-                throws Exception {
-            TopicSession session = createTopicSession((TopicConnection) connection,
-                    subscription.m_ackMode);
-            TopicSubscriber subscriber = createSubscriber(session,
-                    (TopicSubscription) subscription);
-
-            return new TopicListenerSession(session, subscriber, (TopicSubscription) subscription);
-        }
-
-        private final class TopicListenerSession extends ListenerSession {
-            TopicListenerSession(TopicSession session, TopicSubscriber subscriber,
-                                 TopicSubscription subscription)
-                    throws Exception {
-                super(session, subscriber, subscription);
-            }
-
-            void cleanup() {
-                try {
-                    m_consumer.close();
-                } catch (Exception ignore) {
-                }
-
-                try {
-                    TopicSubscription sub = (TopicSubscription) m_subscription;
-
-                    if (sub.isDurable() && sub.m_unsubscribe) {
-                        ((TopicSession) m_session).unsubscribe(sub.m_subscriptionName);
-                    }
-                } catch (Exception ignore) {
-                }
-
-                try {
-                    m_session.close();
-                } catch (Exception ignore) {
-                }
-            }
-        }
-    }
-
-
-    private final class TopicDestinationEndpoint extends TopicEndpoint {
-        Topic m_topic;
-
-        TopicDestinationEndpoint(Topic topic) throws JMSException {
-            super(topic.getTopicName());
-            m_topic = topic;
-        }
-
-        Destination getDestination(Session session) {
-            return m_topic;
-        }
-    }
-
-
-    private class TopicEndpoint extends JMSEndpoint {
-        String m_topicName;
-
-        TopicEndpoint(String topicName) {
-            super(TopicConnector.this);
-            m_topicName = topicName;
-        }
-
-        protected Subscription createSubscription(MessageListener listener, HashMap properties) {
-            return new TopicSubscription(listener, this, properties);
-        }
-
-        public boolean equals(Object object) {
-            if (!super.equals(object)) {
-                return false;
-            }
-
-            if (!(object instanceof TopicEndpoint)) {
-                return false;
-            }
-
-            return m_topicName.equals(((TopicEndpoint) object).m_topicName);
-        }
-
-        public String toString() {
-            StringBuffer buffer = new StringBuffer("TopicEndpoint:");
-
-            buffer.append(m_topicName);
-
-            return buffer.toString();
-        }
-
-        Destination getDestination(Session session) throws Exception {
-            return createTopic((TopicSession) session, m_topicName);
-        }
-    }
-
-
-    private final class TopicSubscription extends Subscription {
-        boolean m_noLocal;
-        String m_subscriptionName;
-        boolean m_unsubscribe;
-
-        TopicSubscription(MessageListener listener, JMSEndpoint endpoint, HashMap properties) {
-            super(listener, endpoint, properties);
-            m_subscriptionName = MapUtils.removeStringProperty(properties,
-                    JMSConstants.SUBSCRIPTION_NAME, null);
-            m_unsubscribe = MapUtils.removeBooleanProperty(properties, JMSConstants.UNSUBSCRIBE,
-                    JMSConstants.DEFAULT_UNSUBSCRIBE);
-            m_noLocal = MapUtils.removeBooleanProperty(properties, JMSConstants.NO_LOCAL,
-                    JMSConstants.DEFAULT_NO_LOCAL);
-        }
-
-        public boolean equals(Object obj) {
-            if (!super.equals(obj)) {
-                return false;
-            }
-
-            if (!(obj instanceof TopicSubscription)) {
-                return false;
-            }
-
-            TopicSubscription other = (TopicSubscription) obj;
-
-            if ((other.m_unsubscribe != m_unsubscribe) || (other.m_noLocal != m_noLocal)) {
-                return false;
-            }
-
-            if (isDurable()) {
-                return other.isDurable() && other.m_subscriptionName.equals(m_subscriptionName);
-            } else if (other.isDurable()) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-
-        public String toString() {
-            StringBuffer buffer = new StringBuffer(super.toString());
-
-            buffer.append(":").append(m_noLocal).append(":").append(m_unsubscribe);
-
-            if (isDurable()) {
-                buffer.append(":");
-                buffer.append(m_subscriptionName);
-            }
-
-            return buffer.toString();
-        }
-
-        boolean isDurable() {
-            return m_subscriptionName != null;
-        }
-    }
-
-
-    private final class TopicSyncConnection extends SyncConnection {
-        TopicSyncConnection(TopicConnectionFactory connectionFactory, TopicConnection connection,
-                            int numSessions, String threadName, String clientID, String username,
-                            String password)
-                throws JMSException {
-            super(connectionFactory, connection, numSessions, threadName, clientID, username,
-                    password);
-        }
-
-        protected SendSession createSendSession(javax.jms.Connection connection)
-                throws JMSException {
-            TopicSession session = createTopicSession((TopicConnection) connection,
-                    JMSConstants.DEFAULT_ACKNOWLEDGE_MODE);
-            TopicPublisher publisher = session.createPublisher(null);
-
-            return new TopicSendSession(session, publisher);
-        }
-
-        private final class TopicSendSession extends SendSession {
-            TopicSendSession(TopicSession session, TopicPublisher publisher) throws JMSException {
-                super(session, publisher);
-            }
-
-            protected MessageConsumer createConsumer(Destination destination) throws JMSException {
-                return createSubscriber((TopicSession) m_session, (Topic) destination, null,
-                        JMSConstants.DEFAULT_NO_LOCAL);
-            }
-
-            protected Destination createTemporaryDestination() throws JMSException {
-                return ((TopicSession) m_session).createTemporaryTopic();
-            }
-
-            protected void deleteTemporaryDestination(Destination destination) throws JMSException {
-                ((TemporaryTopic) destination).delete();
-            }
-
-            protected void send(Destination destination, Message message, int deliveryMode,
-                                int priority, long timeToLive)
-                    throws JMSException {
-                ((TopicPublisher) m_producer).publish((Topic) destination, message, deliveryMode,
-                        priority, timeToLive);
-            }
-        }
-    }
-}
+/*
+* Copyright 2001, 2002,2004 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package org.apache.axis2.transport.jms;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Session;
+import javax.jms.TemporaryTopic;
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.TopicPublisher;
+import javax.jms.TopicSession;
+import javax.jms.TopicSubscriber;
+import java.util.HashMap;
+
+/**
+ * TopicConnector is a concrete JMSConnector subclass that specifically handles
+ * connections to topics (pub-sub domain).
+ */
+public class TopicConnector extends JMSConnector {
+    public TopicConnector(TopicConnectionFactory factory, int numRetries, int numSessions,
+                          long connectRetryInterval, long interactRetryInterval, long timeoutTime,
+                          boolean allowReceive, String clientID, String username, String password,
+                          JMSVendorAdapter adapter, JMSURLHelper jmsurl)
+            throws JMSException {
+        super(factory, numRetries, numSessions, connectRetryInterval, interactRetryInterval,
+                timeoutTime, allowReceive, clientID, username, password, adapter, jmsurl);
+    }
+
+    protected AsyncConnection createAsyncConnection(ConnectionFactory factory,
+                                                    javax.jms.Connection connection, String threadName, String clientID, String username,
+                                                    String password)
+            throws JMSException {
+        return new TopicAsyncConnection((TopicConnectionFactory) factory,
+                (TopicConnection) connection, threadName, clientID,
+                username, password);
+    }
+
+    private TopicSubscriber createDurableSubscriber(TopicSession session, Topic topic,
+                                                    String subscriptionName, String messageSelector, boolean noLocal)
+            throws JMSException {
+        return session.createDurableSubscriber(topic, subscriptionName, messageSelector, noLocal);
+    }
+
+    /**
+     * Creates an endpoint for a queue destination.
+     *
+     * @param destination
+     * @return Returns JMSEndpoint.
+     * @throws JMSException
+     */
+    public JMSEndpoint createEndpoint(Destination destination) throws JMSException {
+        if (!(destination instanceof Topic)) {
+            throw new IllegalArgumentException("The input be a topic for this connector");
+        }
+
+        return new TopicDestinationEndpoint((Topic) destination);
+    }
+
+    public JMSEndpoint createEndpoint(String destination) {
+        return new TopicEndpoint(destination);
+    }
+
+    private TopicSubscriber createSubscriber(TopicSession session, TopicSubscription subscription)
+            throws Exception {
+        if (subscription.isDurable()) {
+            return createDurableSubscriber(session,
+                    (Topic) subscription.m_endpoint.getDestination(session),
+                    subscription.m_subscriptionName,
+                    subscription.m_messageSelector, subscription.m_noLocal);
+        } else {
+            return createSubscriber(session,
+                    (Topic) subscription.m_endpoint.getDestination(session),
+                    subscription.m_messageSelector, subscription.m_noLocal);
+        }
+    }
+
+    private TopicSubscriber createSubscriber(TopicSession session, Topic topic,
+                                             String messageSelector, boolean noLocal)
+            throws JMSException {
+        return session.createSubscriber(topic, messageSelector, noLocal);
+    }
+
+    protected SyncConnection createSyncConnection(ConnectionFactory factory,
+                                                  javax.jms.Connection connection, int numSessions, String threadName, String clientID,
+                                                  String username, String password)
+            throws JMSException {
+        return new TopicSyncConnection((TopicConnectionFactory) factory,
+                (TopicConnection) connection, numSessions, threadName,
+                clientID, username, password);
+    }
+
+    private Topic createTopic(TopicSession session, String subject) throws Exception {
+        return m_adapter.getTopic(session, subject);
+    }
+
+    private TopicSession createTopicSession(TopicConnection connection, int ackMode)
+            throws JMSException {
+        return connection.createTopicSession(false, ackMode);
+    }
+
+    protected javax.jms.Connection internalConnect(ConnectionFactory connectionFactory,
+                                                   String username, String password)
+            throws JMSException {
+        TopicConnectionFactory tcf = (TopicConnectionFactory) connectionFactory;
+
+        if (username == null) {
+            return tcf.createTopicConnection();
+        }
+
+        return tcf.createTopicConnection(username, password);
+    }
+
+    private final class TopicAsyncConnection extends AsyncConnection {
+        TopicAsyncConnection(TopicConnectionFactory connectionFactory, TopicConnection connection,
+                             String threadName, String clientID, String username, String password)
+                throws JMSException {
+            super(connectionFactory, connection, threadName, clientID, username, password);
+        }
+
+        protected ListenerSession createListenerSession(javax.jms.Connection connection,
+                                                        Subscription subscription)
+                throws Exception {
+            TopicSession session = createTopicSession((TopicConnection) connection,
+                    subscription.m_ackMode);
+            TopicSubscriber subscriber = createSubscriber(session,
+                    (TopicSubscription) subscription);
+
+            return new TopicListenerSession(session, subscriber, (TopicSubscription) subscription);
+        }
+
+        private final class TopicListenerSession extends ListenerSession {
+            TopicListenerSession(TopicSession session, TopicSubscriber subscriber,
+                                 TopicSubscription subscription)
+                    throws Exception {
+                super(session, subscriber, subscription);
+            }
+
+            void cleanup() {
+                try {
+                    m_consumer.close();
+                } catch (Exception ignore) {
+                }
+
+                try {
+                    TopicSubscription sub = (TopicSubscription) m_subscription;
+
+                    if (sub.isDurable() && sub.m_unsubscribe) {
+                        ((TopicSession) m_session).unsubscribe(sub.m_subscriptionName);
+                    }
+                } catch (Exception ignore) {
+                }
+
+                try {
+                    m_session.close();
+                } catch (Exception ignore) {
+                }
+            }
+        }
+    }
+
+
+    private final class TopicDestinationEndpoint extends TopicEndpoint {
+        Topic m_topic;
+
+        TopicDestinationEndpoint(Topic topic) throws JMSException {
+            super(topic.getTopicName());
+            m_topic = topic;
+        }
+
+        Destination getDestination(Session session) {
+            return m_topic;
+        }
+    }
+
+
+    private class TopicEndpoint extends JMSEndpoint {
+        String m_topicName;
+
+        TopicEndpoint(String topicName) {
+            super(TopicConnector.this);
+            m_topicName = topicName;
+        }
+
+        protected Subscription createSubscription(MessageListener listener, HashMap properties) {
+            return new TopicSubscription(listener, this, properties);
+        }
+
+        public boolean equals(Object object) {
+            if (!super.equals(object)) {
+                return false;
+            }
+
+            if (!(object instanceof TopicEndpoint)) {
+                return false;
+            }
+
+            return m_topicName.equals(((TopicEndpoint) object).m_topicName);
+        }
+
+        public String toString() {
+            StringBuffer buffer = new StringBuffer("TopicEndpoint:");
+
+            buffer.append(m_topicName);
+
+            return buffer.toString();
+        }
+
+        Destination getDestination(Session session) throws Exception {
+            return createTopic((TopicSession) session, m_topicName);
+        }
+    }
+
+
+    private final class TopicSubscription extends Subscription {
+        boolean m_noLocal;
+        String m_subscriptionName;
+        boolean m_unsubscribe;
+
+        TopicSubscription(MessageListener listener, JMSEndpoint endpoint, HashMap properties) {
+            super(listener, endpoint, properties);
+            m_subscriptionName = MapUtils.removeStringProperty(properties,
+                    JMSConstants.SUBSCRIPTION_NAME, null);
+            m_unsubscribe = MapUtils.removeBooleanProperty(properties, JMSConstants.UNSUBSCRIBE,
+                    JMSConstants.DEFAULT_UNSUBSCRIBE);
+            m_noLocal = MapUtils.removeBooleanProperty(properties, JMSConstants.NO_LOCAL,
+                    JMSConstants.DEFAULT_NO_LOCAL);
+        }
+
+        public boolean equals(Object obj) {
+            if (!super.equals(obj)) {
+                return false;
+            }
+
+            if (!(obj instanceof TopicSubscription)) {
+                return false;
+            }
+
+            TopicSubscription other = (TopicSubscription) obj;
+
+            if ((other.m_unsubscribe != m_unsubscribe) || (other.m_noLocal != m_noLocal)) {
+                return false;
+            }
+
+            if (isDurable()) {
+                return other.isDurable() && other.m_subscriptionName.equals(m_subscriptionName);
+            } else if (other.isDurable()) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+
+        public String toString() {
+            StringBuffer buffer = new StringBuffer(super.toString());
+
+            buffer.append(":").append(m_noLocal).append(":").append(m_unsubscribe);
+
+            if (isDurable()) {
+                buffer.append(":");
+                buffer.append(m_subscriptionName);
+            }
+
+            return buffer.toString();
+        }
+
+        boolean isDurable() {
+            return m_subscriptionName != null;
+        }
+    }
+
+
+    private final class TopicSyncConnection extends SyncConnection {
+        TopicSyncConnection(TopicConnectionFactory connectionFactory, TopicConnection connection,
+                            int numSessions, String threadName, String clientID, String username,
+                            String password)
+                throws JMSException {
+            super(connectionFactory, connection, numSessions, threadName, clientID, username,
+                    password);
+        }
+
+        protected SendSession createSendSession(javax.jms.Connection connection)
+                throws JMSException {
+            TopicSession session = createTopicSession((TopicConnection) connection,
+                    JMSConstants.DEFAULT_ACKNOWLEDGE_MODE);
+            TopicPublisher publisher = session.createPublisher(null);
+
+            return new TopicSendSession(session, publisher);
+        }
+
+        private final class TopicSendSession extends SendSession {
+            TopicSendSession(TopicSession session, TopicPublisher publisher) throws JMSException {
+                super(session, publisher);
+            }
+
+            protected MessageConsumer createConsumer(Destination destination) throws JMSException {
+                return createSubscriber((TopicSession) m_session, (Topic) destination, null,
+                        JMSConstants.DEFAULT_NO_LOCAL);
+            }
+
+            protected Destination createTemporaryDestination() throws JMSException {
+                return ((TopicSession) m_session).createTemporaryTopic();
+            }
+
+            protected void deleteTemporaryDestination(Destination destination) throws JMSException {
+                ((TemporaryTopic) destination).delete();
+            }
+
+            protected void send(Destination destination, Message message, int deliveryMode,
+                                int priority, long timeToLive)
+                    throws JMSException {
+                ((TopicPublisher) m_producer).publish((Topic) destination, message, deliveryMode,
+                        priority, timeToLive);
+            }
+        }
+    }
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java Fri Jan  6 11:46:16 2006
@@ -207,7 +207,7 @@
 
         PolicyInclude policyInclude = axisOperation.getPolicyInclude();
         List policyList = policyInclude
-                .getPolicyElements(PolicyInclude.BINDING_OPERATOIN_POLICY);
+                .getPolicyElements(PolicyInclude.BINDING_OPERATION_POLICY);
         addPolicyAsExtElements(description, policyList, wsdlBindingOperation,
                 policyInclude);
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/URL.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/URL.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/URL.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/URL.java Fri Jan  6 11:46:16 2006
@@ -55,28 +55,28 @@
     }
 
     /**
-     * @return
+     * @return Returns String.
      */
     public String getFileName() {
         return fileName;
     }
 
     /**
-     * @return
+     * @return Returns String.
      */
     public String getHost() {
         return host;
     }
 
     /**
-     * @return
+     * @return Returns int.
      */
     public int getPort() {
         return port;
     }
 
     /**
-     * @return
+     * @return Returns String.
      */
     public String getProtocol() {
         return protocol;

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java Fri Jan  6 11:46:16 2006
@@ -31,7 +31,7 @@
 
 
     /**
-     * @param ownerNode
+     * @param ownerDocument
      */
     protected ChildNode(DocumentImpl ownerDocument) {
         super(ownerDocument);

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java Fri Jan  6 11:46:16 2006
@@ -129,7 +129,7 @@
     
     /**
      * Sets Locale to be used by the formatter.
-     * @param locale
+     * @param dlocale
      */
     public static void setLocale(Locale dlocale){
         locale = dlocale;

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamedNodeMapImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamedNodeMapImpl.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamedNodeMapImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamedNodeMapImpl.java Fri Jan  6 11:46:16 2006
@@ -174,7 +174,7 @@
      *                      The namespace URI of the node to remove.
      *                      When it is null or an empty string, this
      *                      method behaves like removeNamedItem.
-     * @param               The local name of the node to remove.
+     * @param     name          The local name of the node to remove.
      * @return          Returns the node removed from the map if a node with such
      *                      a local name and namespace URI exists.
      * @throws              NOT_FOUND_ERR: Raised if there is no node named

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/soap/impl/dom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/soap/impl/dom/SOAPHeaderBlockImpl.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/soap/impl/dom/SOAPHeaderBlockImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/soap/impl/dom/SOAPHeaderBlockImpl.java Fri Jan  6 11:46:16 2006
@@ -38,6 +38,7 @@
     /**
      * @param localName
      * @param ns
+     * @param parent     
      */
     public SOAPHeaderBlockImpl(String localName,
                                OMNamespace ns,
@@ -47,7 +48,7 @@
     }
 
     /**
-     * Constructor SOAPHeaderBlockImpl
+     * Constructor SOAPHeaderBlockImpl.
      *
      * @param localName
      * @param ns
@@ -63,6 +64,7 @@
     /**
      * @param attributeName
      * @param attrValue
+     * @param soapEnvelopeNamespaceURI
      */
     protected void setAttribute(String attributeName,
                                 String attrValue,
@@ -81,10 +83,10 @@
     }
 
     /**
-     * Method getAttribute
+     * Method getAttribute.
      *
      * @param attrName
-     * @return
+     * @return Returns String.
      */
     protected String getAttribute(String attrName,
                                   String soapEnvelopeNamespaceURI) {

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/PrefixedQName.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/PrefixedQName.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/PrefixedQName.java (original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/PrefixedQName.java Fri Jan  6 11:46:16 2006
@@ -39,7 +39,7 @@
     private QName qName;
 
     /**
-     * Constructor PrefixedQName
+     * Constructor PrefixedQName.
      *
      * @param uri
      * @param localName
@@ -53,10 +53,9 @@
     }
 
     /**
-     * Constructor qname
+     * Constructor PrefixedQName
      *
      * @param qname
-     * @return
      */
     public PrefixedQName(QName qname) {
         this.qName = qname;
@@ -67,7 +66,7 @@
      * Gets the local name part of the XML name that this <code>Name</code>
      * object represents.
      *
-     * @return a string giving the local name
+     * @return Returns the local name.
      */
     public String getLocalName() {
         return qName.getLocalPart();
@@ -77,7 +76,7 @@
      * Gets the namespace-qualified name of the XML name that this
      * <code>Name</code> object represents.
      *
-     * @return the namespace-qualified name as a string
+     * @return Returns the namespace-qualified name.
      */
     public String getQualifiedName() {
         StringBuffer buf = new StringBuffer(prefix);
@@ -91,7 +90,7 @@
      * Returns the URI of the namespace for the XML
      * name that this <code>Name</code> object represents.
      *
-     * @return the URI as a string
+     * @return Returns the URI as a string.
      */
     public String getURI() {
         return qName.getNamespaceURI();
@@ -101,7 +100,7 @@
      * Returns the prefix associated with the namespace for the XML
      * name that this <code>Name</code> object represents.
      *
-     * @return the prefix as a string
+     * @return  Returns the prefix as a string.
      */
     public String getPrefix() {
         return prefix;

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java?rev=366555&r1=366554&r2=366555&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java Fri Jan  6 11:46:16 2006
@@ -55,32 +55,32 @@
     protected RequestData reqData;
     
     /**
-     * In Axis2 the user cannot set inflow and outflow parameters
-     * Therefore we need to map the Axis2 specific inflow and outflow 
-     * parameters to WSS4J params
+     * In Axis2, the user cannot set inflow and outflow parameters.
+     * Therefore, we need to map the Axis2 specific inflow and outflow 
+     * parameters to WSS4J params,
      * 
-     * Knowledge of inhandler and out handler is used to get the mapped value
+     * Knowledge of inhandler and out handler is used to get the mapped value.
      */
     protected boolean inHandler;
     
     /**
-     * Constructor AbstractHandler
+     * Constructor AbstractHandler.
      */
     public WSDoAllHandler() {
         handlerDesc = EMPTY_HANDLER_METADATA;
     }
 
     /**
-     * Method getName
+     * Method getName.
      *
-     * @return name
+     * @return Returns name.
      */
     public QName getName() {
         return handlerDesc.getName();
     }
 
     /**
-     * Method revoke
+     * Method revoke.
      *
      * @param msgContext
      */
@@ -88,7 +88,7 @@
     }
 
     /**
-     * Method cleanup
+     * Method cleanup.
      *
      * @throws org.apache.axis2.AxisFault
      */
@@ -96,17 +96,17 @@
     }
 
     /**
-     * Method getParameter
+     * Method getParameter.
      *
      * @param name
-     * @return parameter
+     * @return Returns parameter.
      */
     public Parameter getParameter(String name) {
         return handlerDesc.getParameter(name);
     }
 
     /**
-     * Method init
+     * Method init.
      *
      * @param handlerdesc
      */
@@ -115,10 +115,9 @@
     }
 
     /**
-     * To get the phaseRule of a handler it is required to get the HnadlerDescription of the handler
-     * so the argumnet pass when it call return as HnadlerDescription
+     * Gets the handler description.
      *
-     * @return handler description
+     * @return Returns handler description.
      */
     public HandlerDescription getHandlerDesc() {
         return handlerDesc;
@@ -145,7 +144,7 @@
     /**
      * Returns the repetition number from the message context
      * @param msgContext
-     * @return
+     * @return Returns int.
      */
 	protected int getCurrentRepetition(Object msgContext) {
 		//get the repetition from the message context
@@ -176,10 +175,9 @@
     }
     
 	/**
-	 * Get optoin should extract the configuration 
-	 * values from the service.xml and/or axis2.xml
-	 * Values set in the service.xml takes prority over values of the
-	 * axis2.xml
+	 * Gets optoin. Extracts the configuration values from the service.xml 
+	 * and/or axis2.xml. Values set in the service.xml takes prority over 
+	 * values of the axis2.xml
 	 */
     public Object getOption(String axisKey) {
     	
@@ -212,8 +210,8 @@
 	}
 
     /**
-     * override the class loader used to load the PW callback class
-     * @return class loader
+     * Overrides the class loader used to load the PW callback class.
+     * @return Returns class loader.
      */
     public java.lang.ClassLoader getClassLoader() {
         try {