[jboss-cvs] JBoss Messaging SVN: r2685 - in trunk: src/main/org/jboss/jms/client/container and 31 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 15 03:56:12 EDT 2007
Author: timfox
Date: 2007-05-15 03:56:12 -0400 (Tue, 15 May 2007)
New Revision: 2685
Added:
trunk/src/main/org/jboss/jms/exception/
trunk/src/main/org/jboss/messaging/util/XMLUtil.java
Removed:
trunk/src/main/org/jboss/jms/exception/ExceptionUtil.java
trunk/src/main/org/jboss/jms/exception/JNDIUtil.java
trunk/src/main/org/jboss/jms/exception/MessageQueueNameHelper.java
trunk/src/main/org/jboss/jms/exception/ToString.java
trunk/src/main/org/jboss/jms/exception/XMLException.java
trunk/src/main/org/jboss/jms/exception/XMLRuntimeException.java
trunk/src/main/org/jboss/jms/exception/XMLUtil.java
trunk/src/main/org/jboss/jms/util/
trunk/src/main/org/jboss/messaging/core/filepersist/
trunk/tests/src/org/jboss/test/messaging/core/filepersist/
trunk/tests/src/org/jboss/test/messaging/tools/aop/PoisonAspect.java
trunk/tests/src/org/jboss/test/messaging/tools/client/Client.java
trunk/tests/src/org/jboss/test/messaging/tools/client/Colocated.java
trunk/tests/src/org/jboss/test/messaging/tools/client/JChannelClient.java
trunk/tests/src/org/jboss/test/messaging/tools/client/ReceiverManager.java
trunk/tests/src/org/jboss/test/messaging/tools/client/RpcDispatcherClient.java
Modified:
trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
trunk/src/main/org/jboss/jms/exception/MessagingJMSException.java
trunk/src/main/org/jboss/jms/exception/MessagingNetworkFailureException.java
trunk/src/main/org/jboss/jms/exception/MessagingTransactionRolledBackException.java
trunk/src/main/org/jboss/jms/exception/MessagingXAException.java
trunk/src/main/org/jboss/jms/message/JBossBytesMessage.java
trunk/src/main/org/jboss/jms/message/JBossMessage.java
trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java
trunk/src/main/org/jboss/jms/server/destination/QueueService.java
trunk/src/main/org/jboss/jms/server/destination/TopicService.java
trunk/src/main/org/jboss/jms/server/remoting/JMSServerInvocationHandler.java
trunk/src/main/org/jboss/jms/tx/MessagingXAResource.java
trunk/src/main/org/jboss/jms/tx/ResourceManager.java
trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java
trunk/tests/src/org/jboss/test/messaging/core/paging/base/PagingStateTestBase.java
trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/ClusteredPersistenceServiceConfigFileJChannelFactory.java
trunk/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java
trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
trunk/tests/src/org/jboss/test/messaging/jms/MemLeakTest.java
trunk/tests/src/org/jboss/test/messaging/jms/MessageCleanupTest.java
trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java
trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusterLeakTest.java
trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java
trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateTwoClientOnServerCommand.java
trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/FailingClient.java
trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/SimultaneousFailureTest.java
trunk/tests/src/org/jboss/test/messaging/jms/message/ExpiredMessageTest.java
trunk/tests/src/org/jboss/test/messaging/jms/message/MessageBodyTest.java
trunk/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageDeliveryTest.java
trunk/tests/src/org/jboss/test/messaging/jms/message/SomeObject.java
trunk/tests/src/org/jboss/test/messaging/jms/message/foreign/ForeignTestObject.java
trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerTest.java
trunk/tests/src/org/jboss/test/messaging/jms/server/connectionfactory/JNDIBindingsTest.java
trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java
trunk/tests/src/org/jboss/test/messaging/tools/jboss/MBeanConfigurationElement.java
trunk/tests/src/org/jboss/test/messaging/tools/jboss/ServiceDeploymentDescriptor.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/NoopInvoker.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMINamingDelegate.java
trunk/tests/src/org/jboss/test/messaging/tools/jndi/JNPInitialContextFactory.java
trunk/tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java
trunk/tests/src/org/jboss/test/messaging/util/ServiceContainerTest.java
trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java
trunk/tests/src/org/jboss/test/messaging/util/prioritylinkedlist/PriorityLinkedListTest.java
trunk/tests/src/org/jboss/test/thirdparty/remoting/RemotingTest.java
Log:
Client and server step 9
Modified: trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -6,23 +6,24 @@
*/
package org.jboss.jms.client.container;
-import org.jboss.logging.Logger;
+import java.util.Arrays;
+import java.util.Map;
+
+import javax.jms.JMSException;
+
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.jms.client.FailoverCommandCenter;
import org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate;
+import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
-import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.DelegateSupport;
+import org.jboss.jms.client.plugin.LoadBalancingPolicy;
import org.jboss.jms.client.state.ConnectionState;
-import org.jboss.jms.client.FailoverCommandCenter;
-import org.jboss.jms.client.plugin.LoadBalancingPolicy;
import org.jboss.jms.delegate.CreateConnectionResult;
-import org.jboss.jms.util.MessagingNetworkFailureException;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
+import org.jboss.logging.Logger;
-import javax.jms.JMSException;
-import java.util.Map;
-import java.util.Arrays;
-
/**
* This aspect is part of a clustered ConnectionFactory aspect stack.
* Some of its responsibilities are:
Modified: trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -17,7 +17,7 @@
import org.jboss.jms.client.remoting.JMSRemotingConnection;
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.client.state.HierarchicalState;
-import org.jboss.jms.util.MessagingNetworkFailureException;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
import org.jboss.logging.Logger;
/**
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,18 +21,18 @@
*/
package org.jboss.jms.client.delegate;
+import java.io.Serializable;
import java.util.Map;
-import java.io.Serializable;
+import javax.jms.JMSException;
+
+import org.jboss.jms.client.plugin.LoadBalancingPolicy;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.delegate.CreateConnectionResult;
-import org.jboss.jms.delegate.ConnectionFactoryDelegate;
-import org.jboss.jms.client.plugin.LoadBalancingPolicy;
-import org.jboss.jms.util.MessagingNetworkFailureException;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
+import org.jboss.logging.Logger;
import org.jboss.messaging.core.plugin.IDBlock;
-import org.jboss.logging.Logger;
-import javax.jms.JMSException;
-
/**
* A ClientClusteredConnectionFactoryDelegate.
*
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -32,11 +32,11 @@
import org.jboss.jms.client.container.JMSClientVMIdentifier;
import org.jboss.jms.client.remoting.JMSRemotingConnection;
import org.jboss.jms.delegate.ConnectionFactoryDelegate;
+import org.jboss.jms.delegate.CreateConnectionResult;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.Version;
-import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.jms.server.remoting.JMSWireFormat;
-import org.jboss.jms.util.MessagingNetworkFailureException;
import org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest;
import org.jboss.jms.wireformat.ConnectionFactoryGetClientAOPStackRequest;
import org.jboss.jms.wireformat.ResponseSupport;
Modified: trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -29,8 +29,8 @@
import javax.jms.JMSException;
import org.jboss.jms.client.state.HierarchicalState;
-import org.jboss.jms.util.MessagingJMSException;
-import org.jboss.jms.util.MessagingNetworkFailureException;
+import org.jboss.jms.exception.MessagingJMSException;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
import org.jboss.jms.wireformat.RequestSupport;
import org.jboss.jms.wireformat.ResponseSupport;
import org.jboss.logging.Logger;
Copied: trunk/src/main/org/jboss/jms/exception (from rev 2680, trunk/src/main/org/jboss/jms/util)
Deleted: trunk/src/main/org/jboss/jms/exception/ExceptionUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/ExceptionUtil.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/ExceptionUtil.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.util;
-
-import javax.jms.JMSException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.id.GUID;
-
-/**
- * A ExceptionUtil
-
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class ExceptionUtil
-{
- private static final Logger log = Logger.getLogger(ExceptionUtil.class);
-
- /*
- * The strategy for what how we propagate Throwables from the server to the client
- * in the event of one occuring on the server in a client initiated invocation is as
- * follows:
- * 1) We always log the Throwable irrespective of it's type - this is so system administrators
- * have a record of what has happened - typically they may configure log4j to send an email
- * or create some other alert when this happens
- * 2) If the exception is a JMSException that was created and thrown in the messaging code, then
- * this is propagated back to the client
- * 4) Any other Errors or Exceptions (e.g. SQLException) are rethrown as a JMSException
- * - we do not want to propagate the original exception back to the client since the client may not
- * have the correct jars to receive the exception - (e.g. if it was an exception thrown from a postgressql driver)
- * Also there maybe security reasons we do not want to expose the specific original exception to the client
- */
- public static JMSException handleJMSInvocation(Throwable t, String msg)
- {
- //We create a GUID and log it and send it in the client exception.
- //This allows what is received at the client to be correlated if necessary
- //to what is logged in the server logs
- String id = new GUID().toString();
-
- //First we log the Throwable
- log.error(msg + " [" + id + "]", t);
-
- if (t instanceof JMSException)
- {
- return (JMSException)t;
- }
- else
- {
- JMSException e = new MessagingJMSException("A failure has occurred during processing of the request. " +
- "Please consult the server logs for more details. " + msg + " [" + id + "]");
- return e;
- }
- }
-
- /*
- * This method is used to log any Throwables occurring in the execution of JMX methods before
- * propagating them back to the caller.
- * If we don't log them then we have no record of them occurring on the server.
- */
- public static Exception handleJMXInvocation(Throwable t, String msg)
- {
- log.error(msg, t);
-
- if (t instanceof RuntimeException)
- {
- throw (RuntimeException)t;
- }
- else if (t instanceof Error)
- {
- throw (Error)t;
- }
- else if (t instanceof Exception)
- {
- //Some other non RuntimeException
- return (Exception)t;
- }
- else
- {
- //Some other subclass of Throwable
- throw new RuntimeException(msg);
- }
- }
-}
Deleted: trunk/src/main/org/jboss/jms/exception/JNDIUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/JNDIUtil.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/JNDIUtil.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.util;
-
-import java.util.StringTokenizer;
-import javax.naming.Binding;
-import javax.naming.Context;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class JNDIUtil
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- /**
- * Create a context path recursively.
- */
- public static Context createContext(Context c, String path) throws NamingException
- {
- Context crtContext = c;
- for(StringTokenizer st = new StringTokenizer(path, "/"); st.hasMoreTokens(); )
- {
- String tok = st.nextToken();
-
- try
- {
- Object o = crtContext.lookup(tok);
- if (!(o instanceof Context))
- {
- throw new NamingException("Path " + path + " overwrites and already bound object");
- }
- crtContext = (Context)o;
- continue;
- }
- catch(NameNotFoundException e)
- {
- // OK
- }
- crtContext = crtContext.createSubcontext(tok);
- }
- return crtContext;
- }
-
- public static void tearDownRecursively(Context c) throws Exception
- {
- for(NamingEnumeration ne = c.listBindings(""); ne.hasMore(); )
- {
- Binding b = (Binding)ne.next();
- String name = b.getName();
- Object object = b.getObject();
- if (object instanceof Context)
- {
- tearDownRecursively((Context)object);
- }
- c.unbind(name);
- }
- }
-
- /**
- * Context.rebind() requires that all intermediate contexts and the target context (that named by
- * all but terminal atomic component of the name) must already exist, otherwise
- * NameNotFoundException is thrown. This method behaves similar to Context.rebind(), but creates
- * intermediate contexts, if necessary.
- */
- public static void rebind(Context c, String jndiName, Object o) throws NamingException
- {
- Context context = c;
- String name = jndiName;
-
- int idx = jndiName.lastIndexOf('/');
- if (idx != -1)
- {
- context = createContext(c, jndiName.substring(0, idx));
- name = jndiName.substring(idx + 1);
- }
- boolean failed=false;
- try
- {
- context.rebind(name,o);
- }
- catch (Exception ignored)
- {
- failed=true;
- }
- if (failed)
- {
- context.bind(name, o);
- }
- }
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/src/main/org/jboss/jms/exception/MessageQueueNameHelper.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessageQueueNameHelper.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/MessageQueueNameHelper.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.util;
-
-import java.util.StringTokenizer;
-
-/**
- * A MessageQueueNameHelper
- *
- * By convention, we name durable topic message queue names in the following way:
- *
- * <clientid>.<sub_name>
- *
- * This is a helper class to aid in converting between the string form and the client id
- * and subscription name and vice versa
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class MessageQueueNameHelper
-{
- private String clientId;
-
- private String subName;
-
- private static String SEPARATOR = ".";
-
- private MessageQueueNameHelper(String messageQueueName)
- {
- if (messageQueueName == null)
- {
- throw new IllegalArgumentException("Message queue name is null");
- }
-
- StringTokenizer tok = new StringTokenizer(messageQueueName, SEPARATOR);
-
- int count = 0;
-
- while (tok.hasMoreElements())
- {
- String token = (String)tok.nextElement();
-
- if (count == 0)
- {
- clientId = token;
- }
- else if (count == 1)
- {
- subName = token;
- }
- count++;
- }
-
- if (count != 2)
- {
- throw new IllegalArgumentException("Invalid message queue name: " + messageQueueName);
- }
- }
-
- public String getClientId()
- {
- return clientId;
- }
-
- public String getSubName()
- {
- return subName;
- }
-
- public static MessageQueueNameHelper createHelper(String messageQueueName)
- {
- return new MessageQueueNameHelper(messageQueueName);
- }
-
- public static String createSubscriptionName(String clientID, String subName)
- {
- if (clientID == null)
- {
- throw new IllegalArgumentException("clientID name is null");
- }
- if (subName == null)
- {
- throw new IllegalArgumentException("Subscription name is null");
- }
-
- return clientID + SEPARATOR + subName;
- }
-}
Modified: trunk/src/main/org/jboss/jms/exception/MessagingJMSException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessagingJMSException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/MessagingJMSException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.jms.util;
+package org.jboss.jms.exception;
import javax.jms.JMSException;
Modified: trunk/src/main/org/jboss/jms/exception/MessagingNetworkFailureException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessagingNetworkFailureException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/MessagingNetworkFailureException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.jms.util;
+package org.jboss.jms.exception;
/**
* A MessagingNetworkFailureException
Modified: trunk/src/main/org/jboss/jms/exception/MessagingTransactionRolledBackException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessagingTransactionRolledBackException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/MessagingTransactionRolledBackException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.jms.util;
+package org.jboss.jms.exception;
import javax.jms.TransactionRolledBackException;
Modified: trunk/src/main/org/jboss/jms/exception/MessagingXAException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessagingXAException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/MessagingXAException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.jms.util;
+package org.jboss.jms.exception;
import javax.transaction.xa.XAException;
Deleted: trunk/src/main/org/jboss/jms/exception/ToString.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/ToString.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/ToString.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.util;
-
-import javax.jms.DeliveryMode;
-import javax.jms.Session;
-
-/**
- * A collection of static string convertors.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class ToString
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- public static String deliveryMode(int m)
- {
- if (m == DeliveryMode.NON_PERSISTENT)
- {
- return "NON_PERSISTENT";
- }
- if (m == DeliveryMode.PERSISTENT)
- {
- return "PERSISTENT";
- }
- return "UNKNOWN";
- }
-
- public static String acknowledgmentMode(int ack)
- {
- if (ack == Session.AUTO_ACKNOWLEDGE)
- {
- return "AUTO_ACKNOWLEDGE";
- }
- if (ack == Session.CLIENT_ACKNOWLEDGE)
- {
- return "CLIENT_ACKNOWLEDGE";
- }
- if (ack == Session.DUPS_OK_ACKNOWLEDGE)
- {
- return "DUPS_OK_ACKNOWLEDGE";
- }
- if (ack == Session.SESSION_TRANSACTED)
- {
- return "SESSION_TRANSACTED";
- }
- return "UNKNOWN";
- }
-
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/src/main/org/jboss/jms/exception/XMLException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/XMLException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jms.util;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class XMLException extends Exception
-{
- // Constants -----------------------------------------------------
-
- private static final long serialVersionUID = -1766745141220167507L;
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public XMLException(String msg)
- {
- super(msg);
- }
-
- public XMLException(String msg, Exception cause)
- {
- super(msg, cause);
- }
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/src/main/org/jboss/jms/exception/XMLRuntimeException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLRuntimeException.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/XMLRuntimeException.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,40 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.jms.util;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class XMLRuntimeException extends RuntimeException
-{
- // Constants -----------------------------------------------------
-
- private static final long serialVersionUID = -8900987884583231425L;
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public XMLRuntimeException(String msg)
- {
- super(msg);
- }
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/src/main/org/jboss/jms/exception/XMLUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLUtil.java 2007-05-14 23:15:36 UTC (rev 2680)
+++ trunk/src/main/org/jboss/jms/exception/XMLUtil.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,366 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.jms.util;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.jboss.logging.Logger;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import java.io.StringReader;
-import java.io.Reader;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class XMLUtil
-{
- // Constants ------------------------------------------------------------------------------------
-
- private static final Logger log = Logger.getLogger(XMLUtil.class);
-
- // Static ---------------------------------------------------------------------------------------
-
- public static Element stringToElement(String s) throws Exception
- {
- return readerToElement(new StringReader(s));
- }
-
- public static Element urlToElement(URL url) throws Exception
- {
- return readerToElement(new InputStreamReader(url.openStream()));
- }
-
- public static Element readerToElement(Reader r) throws Exception
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- Document doc = parser.parse(new InputSource(r));
- return doc.getDocumentElement();
- }
-
- public static String elementToString(Node n) throws XMLException
- {
-
- String name = n.getNodeName();
-
- short type = n.getNodeType();
-
- if (Node.CDATA_SECTION_NODE == type)
- {
- return "<![CDATA[" + n.getNodeValue() + "]]>";
- }
-
- if (name.startsWith("#"))
- {
- return "";
- }
-
- StringBuffer sb = new StringBuffer();
- sb.append('<').append(name);
-
- NamedNodeMap attrs = n.getAttributes();
- if (attrs != null)
- {
- for(int i = 0; i < attrs.getLength(); i++)
- {
- Node attr = attrs.item(i);
- sb.append(' ').
- append(attr.getNodeName()).
- append("=\"").
- append(attr.getNodeValue()).
- append("\"");
- }
- }
-
- String textContent = null;
- NodeList children = n.getChildNodes();
-
- if (children.getLength() == 0)
- {
- if ((textContent = XMLUtil.getTextContent(n)) != null && !"".equals(textContent))
- {
- sb.append(textContent).append("</").append(name).append('>');;
- }
- else
- {
- sb.append("/>").append('\n');
- }
- }
- else
- {
- sb.append('>').append('\n');
- boolean hasValidChildren = false;
- for(int i = 0; i < children.getLength(); i++)
- {
- String childToString = elementToString(children.item(i));
- if (!"".equals(childToString))
- {
- sb.append(childToString);
- hasValidChildren = true;
- }
- }
-
- if (!hasValidChildren && ((textContent = XMLUtil.getTextContent(n)) != null))
- {
- sb.append(textContent);
- }
-
- sb.append("</").append(name).append('>');
- }
-
- return sb.toString();
- }
-
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * This metod is here because Node.getTextContent() is not available in JDK 1.4 and I would like
- * to have an uniform access to this functionality.
- *
- * Note: if the content is another element or set of elements, it returns a string representation
- * of the hierarchy.
- *
- * TODO implementation of this method is a hack. Implement it properly.
- */
- public static String getTextContent(Node n) throws XMLException
- {
- if (n.hasChildNodes())
- {
- StringBuffer sb = new StringBuffer();
- NodeList nl = n.getChildNodes();
- for(int i = 0; i < nl.getLength(); i++)
- {
- sb.append(XMLUtil.elementToString(nl.item(i)));
- if (i < nl.getLength() - 1)
- {
- sb.append('\n');
- }
- }
-
- String s = sb.toString();
- if (s.length() != 0)
- {
- return s;
- }
- }
-
- Method[] methods = Node.class.getMethods();
-
- for(int i = 0; i < methods.length; i++)
- {
- if("getTextContent".equals(methods[i].getName()))
- {
- Method getTextContext = methods[i];
- try
- {
- return (String)getTextContext.invoke(n, EMPTY_ARRAY);
- }
- catch(Exception e)
- {
- log.error("Failed to invoke getTextContent() on node " + n, e);
- return null;
- }
- }
- }
-
- String textContent = null;
-
- if (n.hasChildNodes())
- {
- NodeList nl = n.getChildNodes();
- for(int i = 0; i < nl.getLength(); i++)
- {
- Node c = nl.item(i);
- if (c.getNodeType() == Node.TEXT_NODE)
- {
- textContent = n.getNodeValue();
- if (textContent == null)
- {
- // TODO This is a hack. Get rid of it and implement this properly
- String s = c.toString();
- int idx = s.indexOf("#text:");
- if (idx != -1)
- {
- textContent = s.substring(idx + 6).trim();
- if (textContent.endsWith("]"))
- {
- textContent = textContent.substring(0, textContent.length() - 1);
- }
- }
- }
- if (textContent == null)
- {
- break;
- }
- }
- }
-
- // TODO This is a hack. Get rid of it and implement this properly
- String s = n.toString();
- int i = s.indexOf('>');
- int i2 = s.indexOf("</");
- if (i != -1 && i2 != -1)
- {
- textContent = s.substring(i + 1, i2);
- }
- }
-
- return textContent;
- }
-
- public static void assertEquivalent(Node node, Node node2)
- {
- if (node == null)
- {
- throw new XMLRuntimeException("the first node to be compared is null");
- }
-
- if (node2 == null)
- {
- throw new XMLRuntimeException("the second node to be compared is null");
- }
-
- if (!node.getNodeName().equals(node2.getNodeName()))
- {
- throw new XMLRuntimeException("nodes have different node names");
- }
-
- int attrCount = 0;
- NamedNodeMap attrs = node.getAttributes();
- if (attrs != null)
- {
- attrCount = attrs.getLength();
- }
-
- int attrCount2 = 0;
- NamedNodeMap attrs2 = node2.getAttributes();
- if (attrs2 != null)
- {
- attrCount2 = attrs2.getLength();
- }
-
- if (attrCount != attrCount2)
- {
- throw new XMLRuntimeException("nodes hava a different number of attributes");
- }
-
- outer: for(int i = 0; i < attrCount; i++)
- {
- Node n = attrs.item(i);
- String name = n.getNodeName();
- String value = n.getNodeValue();
-
- for(int j = 0; j < attrCount; j++)
- {
- Node n2 = attrs2.item(j);
- String name2 = n2.getNodeName();
- String value2 = n2.getNodeValue();
-
- if (name.equals(name2) && value.equals(value2))
- {
- continue outer;
- }
- }
- throw new XMLRuntimeException("attribute " + name + "=" + value + " doesn't match");
- }
-
- boolean hasChildren = node.hasChildNodes();
-
- if (hasChildren != node2.hasChildNodes())
- {
- throw new XMLRuntimeException("one node has children and the other doesn't");
- }
-
- if (hasChildren)
- {
- NodeList nl = node.getChildNodes();
- NodeList nl2 = node2.getChildNodes();
-
- short[] toFilter = new short[] {Node.TEXT_NODE, Node.ATTRIBUTE_NODE, Node.COMMENT_NODE};
- List nodes = filter(nl, toFilter);
- List nodes2 = filter(nl2, toFilter);
-
- int length = nodes.size();
-
- if (length != nodes2.size())
- {
- throw new XMLRuntimeException("nodes hava a different number of children");
- }
-
- for(int i = 0; i < length; i++)
- {
- Node n = (Node)nodes.get(i);
- Node n2 = (Node)nodes2.get(i);
- assertEquivalent(n, n2);
- }
- }
- }
-
- public static String stripCDATA(String s)
- {
- s = s.trim();
- if (s.startsWith("<![CDATA["))
- {
- s = s.substring(9);
- int i = s.indexOf("]]>");
- if (i == -1)
- {
- throw new IllegalStateException(
- "argument starts with <![CDATA[ but cannot find pairing ]]>");
- }
- s = s.substring(0, i);
- }
- return s;
- }
-
- // Attributes -----------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- // Public ---------------------------------------------------------------------------------------
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- private static List filter(NodeList nl, short[] typesToFilter)
- {
- List nodes = new ArrayList();
-
- outer: for(int i = 0; i < nl.getLength(); i++)
- {
- Node n = nl.item(i);
- short type = n.getNodeType();
- for(int j = 0; j < typesToFilter.length; j++)
- {
- if (typesToFilter[j] == type)
- {
- continue outer;
- }
- }
- nodes.add(n);
- }
- return nodes;
- }
-
- // Inner classes --------------------------------------------------------------------------------
-}
Modified: trunk/src/main/org/jboss/jms/message/JBossBytesMessage.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/JBossBytesMessage.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/message/JBossBytesMessage.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -34,7 +34,7 @@
import javax.jms.MessageEOFException;
import javax.jms.MessageFormatException;
-import org.jboss.jms.util.MessagingJMSException;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.logging.Logger;
/**
Modified: trunk/src/main/org/jboss/jms/message/JBossMessage.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/JBossMessage.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/message/JBossMessage.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -44,7 +44,7 @@
import javax.jms.TextMessage;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.util.MessagingJMSException;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.message.MessageSupport;
import org.jboss.util.Primitives;
Modified: trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,16 +21,26 @@
*/
package org.jboss.jms.server;
-import java.util.*;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
import javax.jms.InvalidDestinationException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
-import org.jboss.jms.destination.*;
+
+import org.jboss.jms.destination.JBossDestination;
+import org.jboss.jms.destination.JBossQueue;
+import org.jboss.jms.destination.JBossTemporaryQueue;
+import org.jboss.jms.destination.JBossTemporaryTopic;
+import org.jboss.jms.destination.JBossTopic;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.jms.server.destination.ManagedDestination;
+import org.jboss.logging.Logger;
import org.jboss.messaging.util.JNDIUtil;
-import org.jboss.jms.util.MessagingJMSException;
-import org.jboss.logging.Logger;
/**
* Keeps track of destinations - including temporary destinations
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -26,7 +26,7 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.jms.util.XMLUtil;
+import org.jboss.messaging.util.XMLUtil;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified: trunk/src/main/org/jboss/jms/server/destination/QueueService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/QueueService.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/server/destination/QueueService.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -14,13 +14,13 @@
import org.jboss.jms.server.JMSCondition;
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.server.messagecounter.MessageStatistics;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.messaging.core.Queue;
import org.jboss.messaging.core.local.PagingFilteredQueue;
import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.Binding;
import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
import org.jboss.messaging.util.ExceptionUtil;
+import org.jboss.messaging.util.XMLUtil;
/**
* MBean wrapper around a ManagedQueue
Modified: trunk/src/main/org/jboss/jms/server/destination/TopicService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/TopicService.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/server/destination/TopicService.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -14,12 +14,12 @@
import org.jboss.jms.server.JMSCondition;
import org.jboss.jms.server.messagecounter.MessageCounter;
-import org.jboss.messaging.util.ExceptionUtil;
-import org.jboss.messaging.util.MessageQueueNameHelper;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.messaging.core.local.PagingFilteredQueue;
import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.Binding;
+import org.jboss.messaging.util.ExceptionUtil;
+import org.jboss.messaging.util.MessageQueueNameHelper;
+import org.jboss.messaging.util.XMLUtil;
/**
* A deployable JBoss Messaging topic.
Modified: trunk/src/main/org/jboss/jms/server/remoting/JMSServerInvocationHandler.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/remoting/JMSServerInvocationHandler.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/server/remoting/JMSServerInvocationHandler.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -28,7 +28,7 @@
import javax.management.MBeanServer;
-import org.jboss.jms.util.MessagingJMSException;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest;
import org.jboss.jms.wireformat.RequestSupport;
import org.jboss.logging.Logger;
Modified: trunk/src/main/org/jboss/jms/tx/MessagingXAResource.java
===================================================================
--- trunk/src/main/org/jboss/jms/tx/MessagingXAResource.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/tx/MessagingXAResource.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -27,7 +27,7 @@
import org.jboss.jms.client.state.SessionState;
import org.jboss.jms.delegate.ConnectionDelegate;
-import org.jboss.jms.util.MessagingXAException;
+import org.jboss.jms.exception.MessagingXAException;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.tx.MessagingXid;
Modified: trunk/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/tx/ResourceManager.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/jms/tx/ResourceManager.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -36,11 +36,11 @@
import org.jboss.jms.delegate.ConnectionDelegate;
import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.jms.delegate.SessionDelegate;
+import org.jboss.jms.exception.MessagingTransactionRolledBackException;
+import org.jboss.jms.exception.MessagingXAException;
import org.jboss.jms.message.JBossMessage;
import org.jboss.jms.message.MessageProxy;
import org.jboss.jms.tx.ClientTransaction.SessionTxState;
-import org.jboss.jms.util.MessagingTransactionRolledBackException;
-import org.jboss.jms.util.MessagingXAException;
import org.jboss.logging.Logger;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
Modified: trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -23,7 +23,7 @@
import javax.jms.JMSException;
-import org.jboss.jms.util.MessagingJMSException;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.logging.Logger;
import org.jboss.util.id.GUID;
Copied: trunk/src/main/org/jboss/messaging/util/XMLUtil.java (from rev 2684, trunk/src/main/org/jboss/jms/util/XMLUtil.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/util/XMLUtil.java (rev 0)
+++ trunk/src/main/org/jboss/messaging/util/XMLUtil.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -0,0 +1,367 @@
+/**
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.messaging.util;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.jboss.logging.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @version <tt>$Revision$</tt>
+ * $Id$
+ */
+public class XMLUtil
+{
+ // Constants ------------------------------------------------------------------------------------
+
+ private static final Logger log = Logger.getLogger(XMLUtil.class);
+
+ // Static ---------------------------------------------------------------------------------------
+
+ public static Element stringToElement(String s) throws Exception
+ {
+ return readerToElement(new StringReader(s));
+ }
+
+ public static Element urlToElement(URL url) throws Exception
+ {
+ return readerToElement(new InputStreamReader(url.openStream()));
+ }
+
+ public static Element readerToElement(Reader r) throws Exception
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder parser = factory.newDocumentBuilder();
+ Document doc = parser.parse(new InputSource(r));
+ return doc.getDocumentElement();
+ }
+
+ public static String elementToString(Node n)
+ {
+
+ String name = n.getNodeName();
+
+ short type = n.getNodeType();
+
+ if (Node.CDATA_SECTION_NODE == type)
+ {
+ return "<![CDATA[" + n.getNodeValue() + "]]>";
+ }
+
+ if (name.startsWith("#"))
+ {
+ return "";
+ }
+
+ StringBuffer sb = new StringBuffer();
+ sb.append('<').append(name);
+
+ NamedNodeMap attrs = n.getAttributes();
+ if (attrs != null)
+ {
+ for(int i = 0; i < attrs.getLength(); i++)
+ {
+ Node attr = attrs.item(i);
+ sb.append(' ').
+ append(attr.getNodeName()).
+ append("=\"").
+ append(attr.getNodeValue()).
+ append("\"");
+ }
+ }
+
+ String textContent = null;
+ NodeList children = n.getChildNodes();
+
+ if (children.getLength() == 0)
+ {
+ if ((textContent = XMLUtil.getTextContent(n)) != null && !"".equals(textContent))
+ {
+ sb.append(textContent).append("</").append(name).append('>');;
+ }
+ else
+ {
+ sb.append("/>").append('\n');
+ }
+ }
+ else
+ {
+ sb.append('>').append('\n');
+ boolean hasValidChildren = false;
+ for(int i = 0; i < children.getLength(); i++)
+ {
+ String childToString = elementToString(children.item(i));
+ if (!"".equals(childToString))
+ {
+ sb.append(childToString);
+ hasValidChildren = true;
+ }
+ }
+
+ if (!hasValidChildren && ((textContent = XMLUtil.getTextContent(n)) != null))
+ {
+ sb.append(textContent);
+ }
+
+ sb.append("</").append(name).append('>');
+ }
+
+ return sb.toString();
+ }
+
+ private static final Object[] EMPTY_ARRAY = new Object[0];
+
+ /**
+ * This metod is here because Node.getTextContent() is not available in JDK 1.4 and I would like
+ * to have an uniform access to this functionality.
+ *
+ * Note: if the content is another element or set of elements, it returns a string representation
+ * of the hierarchy.
+ *
+ * TODO implementation of this method is a hack. Implement it properly.
+ */
+ public static String getTextContent(Node n)
+ {
+ if (n.hasChildNodes())
+ {
+ StringBuffer sb = new StringBuffer();
+ NodeList nl = n.getChildNodes();
+ for(int i = 0; i < nl.getLength(); i++)
+ {
+ sb.append(XMLUtil.elementToString(nl.item(i)));
+ if (i < nl.getLength() - 1)
+ {
+ sb.append('\n');
+ }
+ }
+
+ String s = sb.toString();
+ if (s.length() != 0)
+ {
+ return s;
+ }
+ }
+
+ Method[] methods = Node.class.getMethods();
+
+ for(int i = 0; i < methods.length; i++)
+ {
+ if("getTextContent".equals(methods[i].getName()))
+ {
+ Method getTextContext = methods[i];
+ try
+ {
+ return (String)getTextContext.invoke(n, EMPTY_ARRAY);
+ }
+ catch(Exception e)
+ {
+ log.error("Failed to invoke getTextContent() on node " + n, e);
+ return null;
+ }
+ }
+ }
+
+ String textContent = null;
+
+ if (n.hasChildNodes())
+ {
+ NodeList nl = n.getChildNodes();
+ for(int i = 0; i < nl.getLength(); i++)
+ {
+ Node c = nl.item(i);
+ if (c.getNodeType() == Node.TEXT_NODE)
+ {
+ textContent = n.getNodeValue();
+ if (textContent == null)
+ {
+ // TODO This is a hack. Get rid of it and implement this properly
+ String s = c.toString();
+ int idx = s.indexOf("#text:");
+ if (idx != -1)
+ {
+ textContent = s.substring(idx + 6).trim();
+ if (textContent.endsWith("]"))
+ {
+ textContent = textContent.substring(0, textContent.length() - 1);
+ }
+ }
+ }
+ if (textContent == null)
+ {
+ break;
+ }
+ }
+ }
+
+ // TODO This is a hack. Get rid of it and implement this properly
+ String s = n.toString();
+ int i = s.indexOf('>');
+ int i2 = s.indexOf("</");
+ if (i != -1 && i2 != -1)
+ {
+ textContent = s.substring(i + 1, i2);
+ }
+ }
+
+ return textContent;
+ }
+
+ public static void assertEquivalent(Node node, Node node2)
+ {
+ if (node == null)
+ {
+ throw new IllegalArgumentException("the first node to be compared is null");
+ }
+
+ if (node2 == null)
+ {
+ throw new IllegalArgumentException("the second node to be compared is null");
+ }
+
+ if (!node.getNodeName().equals(node2.getNodeName()))
+ {
+ throw new IllegalArgumentException("nodes have different node names");
+ }
+
+ int attrCount = 0;
+ NamedNodeMap attrs = node.getAttributes();
+ if (attrs != null)
+ {
+ attrCount = attrs.getLength();
+ }
+
+ int attrCount2 = 0;
+ NamedNodeMap attrs2 = node2.getAttributes();
+ if (attrs2 != null)
+ {
+ attrCount2 = attrs2.getLength();
+ }
+
+ if (attrCount != attrCount2)
+ {
+ throw new IllegalArgumentException("nodes hava a different number of attributes");
+ }
+
+ outer: for(int i = 0; i < attrCount; i++)
+ {
+ Node n = attrs.item(i);
+ String name = n.getNodeName();
+ String value = n.getNodeValue();
+
+ for(int j = 0; j < attrCount; j++)
+ {
+ Node n2 = attrs2.item(j);
+ String name2 = n2.getNodeName();
+ String value2 = n2.getNodeValue();
+
+ if (name.equals(name2) && value.equals(value2))
+ {
+ continue outer;
+ }
+ }
+ throw new IllegalArgumentException("attribute " + name + "=" + value + " doesn't match");
+ }
+
+ boolean hasChildren = node.hasChildNodes();
+
+ if (hasChildren != node2.hasChildNodes())
+ {
+ throw new IllegalArgumentException("one node has children and the other doesn't");
+ }
+
+ if (hasChildren)
+ {
+ NodeList nl = node.getChildNodes();
+ NodeList nl2 = node2.getChildNodes();
+
+ short[] toFilter = new short[] {Node.TEXT_NODE, Node.ATTRIBUTE_NODE, Node.COMMENT_NODE};
+ List nodes = filter(nl, toFilter);
+ List nodes2 = filter(nl2, toFilter);
+
+ int length = nodes.size();
+
+ if (length != nodes2.size())
+ {
+ throw new IllegalArgumentException("nodes hava a different number of children");
+ }
+
+ for(int i = 0; i < length; i++)
+ {
+ Node n = (Node)nodes.get(i);
+ Node n2 = (Node)nodes2.get(i);
+ assertEquivalent(n, n2);
+ }
+ }
+ }
+
+ public static String stripCDATA(String s)
+ {
+ s = s.trim();
+ if (s.startsWith("<![CDATA["))
+ {
+ s = s.substring(9);
+ int i = s.indexOf("]]>");
+ if (i == -1)
+ {
+ throw new IllegalStateException(
+ "argument starts with <![CDATA[ but cannot find pairing ]]>");
+ }
+ s = s.substring(0, i);
+ }
+ return s;
+ }
+
+ // Attributes -----------------------------------------------------------------------------------
+
+ // Constructors ---------------------------------------------------------------------------------
+
+ // Public ---------------------------------------------------------------------------------------
+
+ // Package protected ----------------------------------------------------------------------------
+
+ // Protected ------------------------------------------------------------------------------------
+
+ // Private --------------------------------------------------------------------------------------
+
+ private static List filter(NodeList nl, short[] typesToFilter)
+ {
+ List nodes = new ArrayList();
+
+ outer: for(int i = 0; i < nl.getLength(); i++)
+ {
+ Node n = nl.item(i);
+ short type = n.getNodeType();
+ for(int j = 0; j < typesToFilter.length; j++)
+ {
+ if (typesToFilter[j] == type)
+ {
+ continue outer;
+ }
+ }
+ nodes.add(n);
+ }
+ return nodes;
+ }
+
+ // Inner classes --------------------------------------------------------------------------------
+}
Modified: trunk/tests/src/org/jboss/test/messaging/core/paging/base/PagingStateTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/paging/base/PagingStateTestBase.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/core/paging/base/PagingStateTestBase.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -438,8 +438,7 @@
while (rs.next())
{
long msgId = rs.getLong(1);
- long ord = rs.getLong(2);
-
+
msgIds.add(new Long(msgId));
}
rs.close();
@@ -481,8 +480,7 @@
while (rs.next())
{
long msgId = rs.getLong(1);
- long pageOrd = rs.getLong(3);
-
+
msgIds.add(new Long(msgId));
}
rs.close();
Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/ClusteredPersistenceServiceConfigFileJChannelFactory.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/ClusteredPersistenceServiceConfigFileJChannelFactory.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/ClusteredPersistenceServiceConfigFileJChannelFactory.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -6,19 +6,20 @@
*/
package org.jboss.test.messaging.core.plugin.postoffice.cluster;
+import java.net.URL;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
import org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.JChannelFactory;
import org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.MultiplexerJChannelFactory;
-import org.jboss.logging.Logger;
+import org.jboss.messaging.util.XMLUtil;
+import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
import org.jboss.test.messaging.tools.jboss.ServiceDeploymentDescriptor;
-import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
-import org.jboss.jms.util.XMLUtil;
import org.jgroups.JChannel;
import org.w3c.dom.Element;
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import java.net.URL;
-
/**
* A JChannelFactory that reads the configuration of its synchronous/asynchronous JChannels from a
* Messaging-style clustered persistence service configuration file (usually shipped with a
Modified: trunk/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -36,10 +36,6 @@
import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
-import javax.jms.XAConnection;
-import javax.jms.Queue;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XASession;
import javax.management.ObjectName;
import javax.naming.InitialContext;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -26,12 +26,10 @@
import javax.jms.JMSException;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
import javax.jms.Session;
import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
-import javax.jms.TopicSession;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
import javax.management.ObjectName;
import javax.naming.InitialContext;
@@ -291,7 +289,7 @@
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- TopicSubscriber subs = session.createDurableSubscriber(topic,
+ session.createDurableSubscriber(topic,
"durableSubscriberChangeSelectorTest", "TEST = 'test'", false);
}
finally
Modified: trunk/tests/src/org/jboss/test/messaging/jms/MemLeakTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/MemLeakTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/MemLeakTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -29,7 +29,6 @@
import javax.jms.ConnectionFactory;
import javax.jms.DeliveryMode;
import javax.jms.JMSException;
-import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
@@ -195,7 +194,7 @@
for (int i = 0; i < NUM_MESSAGES; i++)
{
- Message m = cons.receive();
+ cons.receive();
log.info("Received " + i);
}
}
@@ -220,8 +219,6 @@
prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- final int NUM_MESSAGES = 100;
-
//send some messages
ArrayList payLoad = new ArrayList();
for (int i=0;i<100;i++)
@@ -294,13 +291,13 @@
for (int i = 0; i < NUM_MESSAGES/2; i++)
{
- Message m = cons1.receive();
+ cons1.receive();
log.info("Received " + i);
}
log.info("Starting second queue");
for (int i = 0; i < NUM_MESSAGES/2; i++)
{
- Message m = cons2.receive();
+ cons2.receive();
log.info("Received " + i);
}
}
Modified: trunk/tests/src/org/jboss/test/messaging/jms/MessageCleanupTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/MessageCleanupTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/MessageCleanupTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -280,9 +280,9 @@
prod.setDeliveryMode(DeliveryMode.PERSISTENT);
- MessageConsumer cons1 = sess.createConsumer(topic);
+ sess.createConsumer(topic);
- MessageConsumer cons2 = sess.createConsumer(topic);
+ sess.createConsumer(topic);
//Don't start the connection
Modified: trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/SecurityTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -35,8 +35,8 @@
import javax.management.ObjectName;
import javax.naming.InitialContext;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.logging.Logger;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -397,7 +397,9 @@
private class TestWireFormat extends JMSWireFormat
{
- private void testPacket(PacketSupport req, int id) throws Exception
+ private static final long serialVersionUID = -832216627671902129L;
+
+ private void testPacket(PacketSupport req, int id) throws Exception
{
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusterLeakTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusterLeakTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusterLeakTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -22,24 +22,24 @@
package org.jboss.test.messaging.jms.clustering;
-import org.jboss.test.messaging.jms.clustering.base.ClusteringTestBase;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.jms.client.state.ConnectionState;
-import org.jboss.jms.client.state.ProducerState;
-import org.jboss.jms.client.delegate.DelegateSupport;
-import org.jboss.jms.client.JBossConnection;
-import org.jboss.jms.client.JBossMessageProducer;
-import org.jboss.jms.client.container.ConnectionFailureListener;
-import org.jboss.profiler.jvmti.JVMTIInterface;
-import org.jboss.profiler.jvmti.InventoryDataPoint;
+import java.util.Map;
+
import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.MessageConsumer;
import javax.jms.Session;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.DeliveryMode;
import javax.jms.TextMessage;
-import java.util.Map;
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.jms.client.JBossMessageProducer;
+import org.jboss.jms.client.delegate.DelegateSupport;
+import org.jboss.jms.client.state.ConnectionState;
+import org.jboss.jms.client.state.ProducerState;
+import org.jboss.profiler.jvmti.InventoryDataPoint;
+import org.jboss.profiler.jvmti.JVMTIInterface;
+import org.jboss.test.messaging.jms.clustering.base.ClusteringTestBase;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* This test is executed with target "leak-tests" on the testsuite/build.xml
* It requires jbossAgent.dll or libJBossAgent.so on the LD_LIBRARY_PATH, so you need to set it
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/ClusteredConnectionFactoryTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -23,9 +23,10 @@
package org.jboss.test.messaging.jms.clustering;
import javax.jms.Connection;
+
import org.jboss.jms.client.JBossConnection;
import org.jboss.jms.client.JBossConnectionFactory;
-import org.jboss.jms.util.MessagingNetworkFailureException;
+import org.jboss.jms.exception.MessagingNetworkFailureException;
import org.jboss.test.messaging.jms.clustering.base.ClusteringTestBase;
import org.jboss.test.messaging.tools.ServerManagement;
import org.jboss.test.messaging.tools.aop.PoisonInterceptor;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -25,7 +25,7 @@
import org.jboss.jms.client.delegate.DelegateSupport;
import org.jboss.jms.client.remoting.JMSRemotingConnection;
import org.jboss.jms.client.state.ConnectionState;
-import org.jboss.jms.util.MessagingTransactionRolledBackException;
+import org.jboss.jms.exception.MessagingTransactionRolledBackException;
import org.jboss.test.messaging.jms.clustering.base.ClusteringTestBase;
import org.jboss.test.messaging.tools.ServerManagement;
import org.jboss.test.messaging.tools.aop.PoisonInterceptor;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateTwoClientOnServerCommand.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateTwoClientOnServerCommand.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateTwoClientOnServerCommand.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -29,7 +29,6 @@
import javax.jms.Topic;
import org.jboss.jms.client.JBossConnection;
-import org.jboss.logging.Logger;
import org.jboss.test.messaging.tools.jmx.rmi.Command;
/**
@@ -46,8 +45,6 @@
{
private static final long serialVersionUID = -997724797145152821L;
- private static final Logger log = Logger.getLogger(CreateTwoClientOnServerCommand.class);
-
private ConnectionFactory cf;
private boolean retainReference;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/FailingClient.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/FailingClient.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/FailingClient.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -22,19 +22,18 @@
package org.jboss.test.messaging.jms.crash.simultaneousfailure;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.logging.Logger;
-import javax.naming.InitialContext;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
import javax.jms.Connection;
-import javax.jms.Session;
+import javax.jms.ConnectionFactory;
import javax.jms.MessageProducer;
-import javax.jms.MessageConsumer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.jms.TopicSubscriber;
-import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import org.jboss.logging.Logger;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
* @version <tt>$Revision$</tt>
Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/SimultaneousFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/SimultaneousFailureTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/simultaneousfailure/SimultaneousFailureTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -22,21 +22,18 @@
package org.jboss.test.messaging.jms.crash.simultaneousfailure;
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.logging.Logger;
-import javax.naming.InitialContext;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
import javax.jms.Session;
-import javax.jms.MessageProducer;
-import javax.jms.MessageConsumer;
-import javax.jms.Message;
+import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.jms.TopicSubscriber;
-import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import org.jboss.logging.Logger;
+import org.jboss.test.messaging.MessagingTestCase;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
* @version <tt>$Revision$</tt>
Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/ExpiredMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/ExpiredMessageTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/ExpiredMessageTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -6,23 +6,19 @@
*/
package org.jboss.test.messaging.jms.message;
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.logging.Logger;
-
-import javax.naming.InitialContext;
-import javax.jms.ConnectionFactory;
-import javax.jms.Queue;
import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.MessageProducer;
+import javax.jms.ConnectionFactory;
import javax.jms.Message;
import javax.jms.MessageConsumer;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XAConnection;
-import javax.jms.TextMessage;
-import javax.management.ObjectName;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+import org.jboss.logging.Logger;
+import org.jboss.test.messaging.MessagingTestCase;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/MessageBodyTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/MessageBodyTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/MessageBodyTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1208,7 +1208,8 @@
static class TestSerializable implements Serializable
{
- String str;
+ private static final long serialVersionUID = -8641359255228705573L;
+ String str;
}
public void testObjectMessage() throws Exception
Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageDeliveryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageDeliveryTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/ObjectMessageDeliveryTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -98,7 +98,8 @@
static class TestObject implements Serializable
{
- String text;
+ private static final long serialVersionUID = -340663970717491155L;
+ String text;
}
/**
Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/SomeObject.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/SomeObject.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/SomeObject.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -38,7 +38,9 @@
// Attributes -----------------------------------------------------------------------------------
- int i;
+ private static final long serialVersionUID = -2939720794544432834L;
+
+ int i;
int j;
// Static ---------------------------------------------------------------------------------------
Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/foreign/ForeignTestObject.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/foreign/ForeignTestObject.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/foreign/ForeignTestObject.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messaging.jms.message.foreign;
import java.io.Serializable;
@@ -35,44 +35,46 @@
*/
public class ForeignTestObject implements Serializable
{
- private String s1;
- private double d1;
-
- public ForeignTestObject(String s, double d)
- {
- s1 = s;
- d1 = d;
- }
+ private static final long serialVersionUID = -7503042537789321104L;
- public double getD1()
- {
- return d1;
- }
+ private String s1;
+ private double d1;
- public void setD1(double d1)
- {
- this.d1 = d1;
- }
+ public ForeignTestObject(String s, double d)
+ {
+ s1 = s;
+ d1 = d;
+ }
- public String getS1()
- {
- return s1;
- }
+ public double getD1()
+ {
+ return d1;
+ }
- public void setS1(String s1)
- {
- this.s1 = s1;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ForeignTestObject)
- {
- ForeignTestObject to = (ForeignTestObject)o;
-
- return (s1.equals(to.getS1()) && d1 == to.getD1());
- }
- return super.equals(o);
- }
+ public void setD1(double d1)
+ {
+ this.d1 = d1;
+ }
+ public String getS1()
+ {
+ return s1;
+ }
+
+ public void setS1(String s1)
+ {
+ this.s1 = s1;
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof ForeignTestObject)
+ {
+ ForeignTestObject to = (ForeignTestObject)o;
+
+ return (s1.equals(to.getS1()) && d1 == to.getD1());
+ }
+ return super.equals(o);
+ }
+
}
Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/ServerPeerTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -44,9 +44,9 @@
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
+import org.jboss.jms.exception.MessagingJMSException;
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.server.messagecounter.MessageStatistics;
-import org.jboss.jms.util.MessagingJMSException;
import org.jboss.messaging.core.tx.MessagingXid;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/connectionfactory/JNDIBindingsTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/connectionfactory/JNDIBindingsTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/connectionfactory/JNDIBindingsTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,14 +21,15 @@
*/
package org.jboss.test.messaging.jms.server.connectionfactory;
+import java.util.List;
+
+import javax.naming.InitialContext;
+
+import org.jboss.jms.server.connectionfactory.JNDIBindings;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.jms.util.XMLUtil;
-import org.jboss.jms.server.connectionfactory.JNDIBindings;
import org.w3c.dom.Element;
-import javax.naming.InitialContext;
-import java.util.List;
-
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -43,7 +43,7 @@
import org.jboss.jms.destination.JBossTopic;
import org.jboss.jms.server.destination.ManagedDestination;
import org.jboss.jms.server.messagecounter.MessageCounter;
-import org.jboss.jms.util.XMLUtil;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;
import org.w3c.dom.Element;
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/aop/PoisonAspect.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/aop/PoisonAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/aop/PoisonAspect.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,49 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.test.messaging.tools.aop;
-
-import org.jboss.logging.Logger;
-
-/**
- * Used to force a "poisoned" server to do all sorts of bad things. Used for testing.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class PoisonAspect
-{
- // Constants ------------------------------------------------------------------------------------
-
- private static final Logger log = Logger.getLogger(PoisonAspect.class);
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- // Constructors ---------------------------------------------------------------------------------
-
- // Public ---------------------------------------------------------------------------------------
-
- /**
- * Used by the failover tests to kill server in the middle of an invocation.
- */
- public void haltTheServer()
- {
- log.info("Halting the server ...");
-
- Runtime.getRuntime().halt(1);
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-}
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/client/Client.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/client/Client.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/client/Client.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,412 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.client;
-
-import org.jboss.logging.Logger;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.Session;
-import javax.jms.MessageProducer;
-import javax.jms.MessageConsumer;
-import javax.jms.Destination;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.DeliveryMode;
-import javax.jms.JMSException;
-import javax.naming.InitialContext;
-
-/**
- * An interactive command-line JMS client. Allows you to look-up a ConnectionFactory and
- * Destinations and connect to the JMS server.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class Client
-{
- // Constants -----------------------------------------------------
-
- private static final Logger log = Logger.getLogger(Client.class);
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private ConnectionFactory connectionFactory;
- private Connection connection;
- private Session session;
- private MessageProducer producer;
- private MessageConsumer consumer;
-
- // Constructors --------------------------------------------------
-
- public Client() throws Exception
- {
- }
-
- // Public --------------------------------------------------------
-
- public void lookupConnectionFactory() throws Exception
- {
- if (connectionFactory != null)
- {
- System.out.println("ConnectionFactory already downloaded");
- return;
- }
-
- if (connectionFactory == null)
- {
- InitialContext ic = new InitialContext();
- connectionFactory = (ConnectionFactory)ic.lookup("/ConnectionFactory");
- ic.close();
- }
- }
-
- /**
- *
- * @param destination - the destination's fully qualified JNDI name
- */
- public Destination lookupDestination(String destination) throws Exception
- {
- InitialContext ic = new InitialContext();
- Destination d = (Destination)ic.lookup(destination);
- ic.close();
- return d;
- }
-
-
- public void createConnection() throws Exception
- {
- if (connection != null)
- {
- System.out.println("Connection already created");
- return;
- }
-
- if (connectionFactory == null)
- {
- lookupConnectionFactory();
- }
-
- connection = connectionFactory.createConnection();
- }
-
-
- public void startConnection() throws Exception
- {
- if (connection == null)
- {
- System.out.println("There is no connection. Create a connection first");
- return;
- }
-
- connection.start();
- }
-
-
- public void stopConnection() throws Exception
- {
- if (connection == null)
- {
- System.out.println("There is no connection. Create a connection first");
- return;
- }
-
- connection.stop();
- }
-
-
- public void createSession(boolean transacted, String acknowledgmentModeString) throws Exception
- {
- if (session != null)
- {
- System.out.println("Session already created");
- return;
- }
-
- int acknowledgmentMode = -1;
- if (!transacted)
- {
- acknowledgmentMode = acknowledgmentModeToInt(acknowledgmentModeString);
- }
-
- if (connection == null)
- {
- createConnection();
- }
-
- session = connection.createSession(transacted, acknowledgmentMode);
- displaySessionInfo(session);
- }
-
- public void createProducer(String destination) throws Exception
- {
-
- if (producer != null)
- {
- System.out.println("Producer already created");
- return;
- }
-
- if (session == null)
- {
- createSession(false, "AUTO_ACKNOWLEDGE");
- }
-
- producer = session.createProducer(lookupDestination(destination));
-
- producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- log.info("The producer's delivery mode was set ot NON_PERSISTENT");
- }
-
- public void createConsumer(String destination) throws Exception
- {
-
- if (consumer != null)
- {
- System.out.println("Consumer already created");
- return;
- }
-
- if (session == null)
- {
- createSession(false, "AUTO_ACKNOWLEDGE");
- }
-
- consumer = session.createConsumer(lookupDestination(destination));
- }
-
-
- public void setMessageListener() throws Exception
- {
- if (consumer == null)
- {
- throw new Exception("You need to create a consumer first. " +
- "Use createConsumer(destination)");
- }
- consumer.setMessageListener(new MessageListener()
- {
- public void onMessage(Message m)
- {
- System.out.println("MessageLister got message: " + m);
- }
- });
- }
-
- public void unsetMessageListener() throws Exception
- {
- if (consumer == null)
- {
- throw new Exception("You need to create a consumer first. " +
- "Use createConsumer(destination)");
- }
- consumer.setMessageListener(null);
- }
-
-
-
-
-
- public void send() throws Exception
- {
- insureProducer();
- Message m = session.createMessage();
- producer.send(m);
- }
-
- /**
- * Sends a burst of messages.
- * @throws Exception
- */
- public void send(int count) throws Exception
- {
- insureProducer();
- Message m;
- for(int i = 0; i < count; i ++)
- {
- m = session.createMessage();
- producer.send(m);
- }
- }
-
-
- public Object receive(long timeout) throws Exception
- {
- insureConsumer();
- return consumer.receive(timeout);
- }
-
- public void receiveOnASeparateThread(final int workTimeMs)
- {
- insureConsumer();
- new Thread(new Runnable() {
- public void run()
- {
- int cnt = 1;
- while(true)
- {
- try
- {
- consumer.receive();
- System.out.println("received " + cnt++);
-
- // process
- Thread.sleep(workTimeMs);
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- }
- }}, "Consumer").start();
- }
-
- public Object receiveNoWait() throws Exception
- {
- insureConsumer();
- return consumer.receiveNoWait();
- }
-
- public void closeConnection() throws Exception
- {
- if (connection == null)
- {
- return;
- }
- connection.close();
- }
-
- public void closeSession() throws Exception
- {
- if (session == null)
- {
- return;
- }
- session.close();
- }
-
- public void closeProducer() throws Exception
- {
- if (producer == null)
- {
- return;
- }
- producer.close();
- }
-
- public void closeConsumer() throws Exception
- {
- if (consumer == null)
- {
- return;
- }
- consumer.close();
- }
-
-
- public void dump()
- {
- System.out.println("connectionFactory = " + connectionFactory);
- System.out.println("connection = " + connection);
- System.out.println("session = " + session);
- System.out.println("producer = " + producer);
- System.out.println("consumer = " + consumer);
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- private void insureConsumer()
- {
- if (consumer == null)
- {
- throw new RuntimeException("You need to create a consumer first. " +
- "Use createConsumer(destination)");
- }
- }
-
- private void insureProducer()
- {
- if (producer == null)
- {
- throw new RuntimeException("You need to create a producer first. " +
- "Use createProducer(destination)");
- }
- }
-
- private int acknowledgmentModeToInt(String ackModeString)
- {
- ackModeString = ackModeString.toUpperCase();
- if ("AUTO_ACKNOWLEDGE".equals(ackModeString))
- {
- return Session.AUTO_ACKNOWLEDGE;
- }
- else if ("CLIENT_ACKNOWLEDGE".equals(ackModeString))
- {
- return Session.CLIENT_ACKNOWLEDGE;
- }
- else if ("DUPS_OK_ACKNOWLEDGE".equals(ackModeString))
- {
- return Session.DUPS_OK_ACKNOWLEDGE;
- }
- throw new IllegalArgumentException("No such acknowledgment mode: " + ackModeString);
- }
-
- private String acknowledgmentModeToString(int ackMode)
- {
-
- if (ackMode == Session.AUTO_ACKNOWLEDGE)
- {
- return "AUTO_ACKNOWLEDGE";
- }
- else if (ackMode == Session.CLIENT_ACKNOWLEDGE)
- {
- return "CLIENT_ACKNOWLEDGE";
- }
- else if (ackMode == Session.DUPS_OK_ACKNOWLEDGE)
- {
- return "DUPS_OK_ACKNOWLEDGE";
- }
- return "UNKNOWN: " + ackMode;
- }
-
-
- public void displaySessionInfo(Session s) throws JMSException
- {
- if (s.getTransacted())
- {
- log.info("The session is TRANSACTED");
- }
- else
- {
- log.info("The session is NON-TRANSACTED, the delivery mode is " +
- acknowledgmentModeToString(s.getAcknowledgeMode()));
- }
- }
-
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/client/Colocated.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/client/Colocated.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/client/Colocated.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,94 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.client;
-
-import org.jboss.logging.Logger;
-import org.jboss.jms.server.ServerPeer;
-import org.jboss.test.messaging.tools.jmx.ServiceContainer;
-import org.jboss.messaging.util.NotYetImplementedException;
-
-
-/**
- * An interactive command-line JMS client that starts the server in the same VM. Allows you to
- * cut out remoting and access the server using pass-by-reference. Good for debugging without
- * connecting the debugger to two VMs. It also doesn't need a JNDI server, it used inVM
- * implementation.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class Colocated extends Client
-{
- // Constants -----------------------------------------------------
-
- private static final Logger log = Logger.getLogger(Colocated.class);
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private ServiceContainer sc;
- private ServerPeer serverPeer;
-
- // Constructors --------------------------------------------------
-
- public Colocated() throws Exception
- {
- sc = new ServiceContainer("transaction,remoting", null);
- sc.start();
-
- serverPeer = new ServerPeer(0, "/queue", "/topic");
- serverPeer.start();
-
- deployTopic("T");
- log.info("Topic messaging/topics/T deployed");
- }
-
- // Public --------------------------------------------------------
-
- public void deployTopic(String name) throws Exception
- {
- throw new NotYetImplementedException();
- //serverPeer.getDestinationManager().createTopic(name, null);
- }
-
- public void deployQueue(String name) throws Exception
- {
- throw new NotYetImplementedException();
- //serverPeer.getDestinationManager().createQueue(name, null);
- }
-
- public void exit() throws Exception
- {
- serverPeer.stop();
- sc.stop();
- System.exit(0);
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/client/JChannelClient.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/client/JChannelClient.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/client/JChannelClient.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,119 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.client;
-
-import org.jgroups.JChannel;
-import org.jgroups.ChannelListener;
-import org.jgroups.Channel;
-import org.jgroups.Address;
-import org.jgroups.View;
-
-/**
- * Class that provides a command line interface to a JGroups JChannel. Can be extended for more
- * ellaborated use cases. Run it with Clester.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class JChannelClient
-{
- // Attributes ----------------------------------------------------
-
- private String props =
- "UDP(mcast_addr=228.1.2.3;mcast_port=45566;ip_ttl=32):"+
- "PING(timeout=3050;num_initial_members=6):"+
- "FD(timeout=3000):"+
- "VERIFY_SUSPECT(timeout=1500):"+
- "pbcast.NAKACK(gc_lag=10;retransmit_timeout=600,1200,2400,4800):"+
- "UNICAST(timeout=600,1200,2400,4800):"+
- "pbcast.STABLE(desired_avg_gossip=10000):"+
- "FRAG:"+
- "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=true;print_local_addr=true)";
-
- protected JChannel jChannel;
-
- // Constructors --------------------------------------------------
-
- public JChannelClient() throws Exception
- {
- jChannel = new JChannel(props);
- // this may be replaced by other listener by subclasses
- // TODO commented out to get rid of deprecated warnings at compilation. If needed, replace with something valid
- //jChannel.setChannelListener(new ChannelListenerImpl());
-
- }
-
- // Public --------------------------------------------------------
-
- public String getProperties()
- {
- return jChannel.getProperties();
- }
-
- public void connect(String groupName) throws Exception
- {
- jChannel.connect(groupName);
- }
-
- public View getView()
- {
- return jChannel.getView();
- }
-
- public void exit()
- {
- System.exit(0);
- }
-
- // Inner classes -------------------------------------------------
-
- private class ChannelListenerImpl implements ChannelListener
- {
- public void channelConnected(Channel channel)
- {
- System.out.println("Channel connected");
- }
-
- public void channelDisconnected(Channel channel)
- {
- System.out.println("Channel disconnected");
- }
-
- public void channelClosed(Channel channel)
- {
- System.out.println("Channel closed");
- }
-
- public void channelShunned()
- {
- System.out.println("Channel shunned");
- }
-
- public void channelReconnected(Address addr)
- {
- System.out.println("Channel reconnected");
- }
- }
-
-
-
-}
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/client/ReceiverManager.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/client/ReceiverManager.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/client/ReceiverManager.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,77 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.client;
-
-import org.jboss.messaging.core.Receiver;
-import org.jboss.test.messaging.core.SimpleReceiver;
-
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Iterator;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class ReceiverManager
-{
- // Attributes ----------------------------------------------------
-
- private Set receivers = new HashSet();
-
- // Public --------------------------------------------------------
-
- public Receiver getReceiver(String name)
- {
- if (name == null)
- {
- return null;
- }
- for(Iterator i = receivers.iterator(); i.hasNext();)
- {
- SimpleReceiver r = (SimpleReceiver)i.next();
- if (name.equals(r.getName()))
- {
- return r;
- }
- }
- SimpleReceiver r = new SimpleReceiver(name);
- receivers.add(r);
- return r;
- }
-
- public String dump()
- {
- StringBuffer sb = new StringBuffer("{");
- for(Iterator i = receivers.iterator(); i.hasNext();)
- {
- SimpleReceiver r = (SimpleReceiver)i.next();
- sb.append(r.toString());
- if (i.hasNext())
- {
- sb.append(", ");
- }
- }
- return sb.append("}").toString();
- }
-}
-
Deleted: trunk/tests/src/org/jboss/test/messaging/tools/client/RpcDispatcherClient.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/client/RpcDispatcherClient.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/client/RpcDispatcherClient.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -1,101 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.messaging.tools.client;
-
-import org.jgroups.blocks.RpcDispatcher;
-import org.jgroups.Address;
-import org.jgroups.MessageListener;
-import org.jgroups.Message;
-import org.jgroups.MembershipListener;
-import org.jgroups.View;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class RpcDispatcherClient extends JChannelClient
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- protected RpcDispatcher rpcDispatcher;
-
- // Constructors --------------------------------------------------
-
- public RpcDispatcherClient(Object serverObject) throws Exception
- {
- super();
- rpcDispatcher = new RpcDispatcher(jChannel,
- new MessageListenerImpl(),
- new MembershipListenerImpl(),
- serverObject);
- }
-
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
- private class MessageListenerImpl implements MessageListener
- {
- public void receive(Message message)
- {
- System.out.println("receive("+message+")");
- }
-
- public byte[] getState()
- {
- return new byte[0];
- }
-
- public void setState(byte[] bytes)
- {
- }
- }
-
- private class MembershipListenerImpl implements MembershipListener
- {
- public void viewAccepted(View view)
- {
- System.out.println("viewAccepted("+view+")");
- }
-
- public void suspect(Address address)
- {
- System.out.println("suspect("+address+")");
- }
-
- public void block()
- {
-
- }
- }
-}
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jboss/MBeanConfigurationElement.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jboss/MBeanConfigurationElement.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jboss/MBeanConfigurationElement.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -6,20 +6,21 @@
*/
package org.jboss.test.messaging.tools.jboss;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.messaging.util.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import org.jboss.jms.util.XMLUtil;
-import org.jboss.logging.Logger;
-import javax.management.ObjectName;
-import java.util.Map;
-import java.util.Set;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-
/**
* The convenience object model of a JBoss <mbean> service descriptor configuration element.
*
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jboss/ServiceDeploymentDescriptor.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jboss/ServiceDeploymentDescriptor.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jboss/ServiceDeploymentDescriptor.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -14,8 +14,8 @@
import javax.management.ObjectName;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.logging.Logger;
+import org.jboss.messaging.util.XMLUtil;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/NoopInvoker.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/NoopInvoker.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/NoopInvoker.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,11 +21,11 @@
*/
package org.jboss.test.messaging.tools.jmx;
+import java.io.Serializable;
+
+import org.jboss.invocation.Invocation;
import org.jboss.invocation.Invoker;
-import org.jboss.invocation.Invocation;
-import java.io.Serializable;
-
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
@@ -35,6 +35,8 @@
class NoopInvoker implements Serializable, Invoker
{
// Constants -----------------------------------------------------
+
+ private static final long serialVersionUID = -7508123339922333502L;
// Static --------------------------------------------------------
@@ -44,7 +46,7 @@
// Invoker implementation ----------------------------------------
- public String getServerHostName() throws Exception
+ public String getServerHostName() throws Exception
{
return "localhost";
}
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -63,9 +63,9 @@
import org.jboss.jms.jndi.JNDIProviderAdapter;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.remoting.JMSServerInvocationHandler;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.logging.Logger;
import org.jboss.messaging.util.JNDIUtil;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.remoting.transport.PortUtil;
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -13,7 +13,7 @@
import java.util.Map;
import java.util.StringTokenizer;
-import org.jboss.jms.util.XMLUtil;
+import org.jboss.messaging.util.XMLUtil;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -38,10 +38,10 @@
import org.jboss.jms.jndi.JMSProviderAdapter;
import org.jboss.jms.server.DestinationManager;
import org.jboss.jms.server.ServerPeer;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.plugin.contract.MessageStore;
import org.jboss.messaging.core.plugin.contract.PersistenceManager;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.test.messaging.tools.ServerManagement;
import org.jboss.test.messaging.tools.aop.PoisonInterceptor;
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMINamingDelegate.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMINamingDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/RMINamingDelegate.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -37,12 +37,14 @@
public class RMINamingDelegate extends UnicastRemoteObject implements NamingDelegate
{
// Constants -----------------------------------------------------
-
+
+ private static final long serialVersionUID = -7123818911636174877L;
+
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
- private InitialContextAccess ica;
+ private InitialContextAccess ica;
private int serverIndex;
// Constructors --------------------------------------------------
Modified: trunk/tests/src/org/jboss/test/messaging/tools/jndi/JNPInitialContextFactory.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jndi/JNPInitialContextFactory.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jndi/JNPInitialContextFactory.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -28,8 +28,6 @@
import javax.naming.NamingException;
import javax.naming.spi.InitialContextFactory;
-import org.jboss.logging.Logger;
-
/**
* An InitialContextFactory providing InitialContext to JNDI on a remote JBoss instance.
@@ -42,10 +40,6 @@
{
// Constants -----------------------------------------------------
- private static final Logger log = Logger.getLogger(JNPInitialContextFactory.class);
-
- private static InVMContext initialContext;
-
// Static --------------------------------------------------------
/**
Modified: trunk/tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/util/MBeanConfigurationElementTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,16 +21,17 @@
*/
package org.jboss.test.messaging.util;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.jms.util.XMLUtil;
import org.jboss.test.messaging.tools.jboss.MBeanConfigurationElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import javax.management.ObjectName;
-import java.util.Set;
-
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Modified: trunk/tests/src/org/jboss/test/messaging/util/ServiceContainerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/ServiceContainerTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/util/ServiceContainerTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -6,18 +6,17 @@
*/
package org.jboss.test.messaging.util;
-import org.jboss.logging.Logger;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.jms.client.JBossConnectionFactory;
-
-import javax.naming.InitialContext;
+import javax.jms.Connection;
import javax.jms.ConnectionFactory;
+import javax.jms.MessageProducer;
import javax.jms.Queue;
-import javax.jms.Connection;
import javax.jms.Session;
-import javax.jms.MessageProducer;
+import javax.naming.InitialContext;
+import org.jboss.jms.client.JBossConnectionFactory;
+import org.jboss.test.messaging.MessagingTestCase;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
@@ -27,8 +26,6 @@
{
// Constants -----------------------------------------------------
- private static final Logger log = Logger.getLogger(ServiceContainerTest.class);
-
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
Modified: trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.messaging.util;
-import org.jboss.jms.util.XMLUtil;
+import org.jboss.messaging.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Modified: trunk/tests/src/org/jboss/test/messaging/util/prioritylinkedlist/PriorityLinkedListTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/prioritylinkedlist/PriorityLinkedListTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/messaging/util/prioritylinkedlist/PriorityLinkedListTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -121,7 +121,7 @@
for (int i = 0; i < NUM_MESSAGES; i++)
{
- Object obj = list.removeFirst();
+ list.removeFirst();
}
long end = System.currentTimeMillis();
@@ -411,7 +411,7 @@
int c = 0;
while (iter.hasNext())
{
- Wibble w = (Wibble)iter.next();
+ iter.next();
c++;
}
assertEquals(c, 26);
Modified: trunk/tests/src/org/jboss/test/thirdparty/remoting/RemotingTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/thirdparty/remoting/RemotingTest.java 2007-05-15 07:31:30 UTC (rev 2684)
+++ trunk/tests/src/org/jboss/test/thirdparty/remoting/RemotingTest.java 2007-05-15 07:56:12 UTC (rev 2685)
@@ -66,6 +66,7 @@
// Attributes -----------------------------------------------------------------------------------
InitialContext ic;
+
private boolean connListenerCalled;
// Constructors ---------------------------------------------------------------------------------
More information about the jboss-cvs-commits
mailing list