[jboss-cvs] JBoss Messaging SVN: r2684 - in trunk: src/main/org/jboss/jms/client and 23 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 15 03:31:30 EDT 2007
Author: timfox
Date: 2007-05-15 03:31:30 -0400 (Tue, 15 May 2007)
New Revision: 2684
Added:
trunk/src/main/org/jboss/jms/delegate/Ack.java
trunk/src/main/org/jboss/jms/delegate/BrowserEndpoint.java
trunk/src/main/org/jboss/jms/delegate/Cancel.java
trunk/src/main/org/jboss/jms/delegate/ConnectionEndpoint.java
trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryEndpoint.java
trunk/src/main/org/jboss/jms/delegate/ConsumerEndpoint.java
trunk/src/main/org/jboss/jms/delegate/CreateConnectionResult.java
trunk/src/main/org/jboss/jms/delegate/DefaultAck.java
trunk/src/main/org/jboss/jms/delegate/DefaultCancel.java
trunk/src/main/org/jboss/jms/delegate/DeliveryInfo.java
trunk/src/main/org/jboss/jms/delegate/DeliveryRecovery.java
trunk/src/main/org/jboss/jms/delegate/SessionEndpoint.java
trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java
trunk/src/main/org/jboss/messaging/util/JNDIUtil.java
trunk/src/main/org/jboss/messaging/util/MessageQueueNameHelper.java
Removed:
trunk/src/main/org/jboss/jms/server/endpoint/Ack.java
trunk/src/main/org/jboss/jms/server/endpoint/BrowserEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/Cancel.java
trunk/src/main/org/jboss/jms/server/endpoint/ConnectionEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ConsumerEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/CreateConnectionResult.java
trunk/src/main/org/jboss/jms/server/endpoint/DefaultAck.java
trunk/src/main/org/jboss/jms/server/endpoint/DefaultCancel.java
trunk/src/main/org/jboss/jms/server/endpoint/DeliveryInfo.java
trunk/src/main/org/jboss/jms/server/endpoint/DeliveryRecovery.java
trunk/src/main/org/jboss/jms/server/endpoint/SessionEndpoint.java
trunk/src/main/org/jboss/jms/util/ExceptionUtil.java
trunk/src/main/org/jboss/jms/util/JNDIUtil.java
trunk/src/main/org/jboss/jms/util/MessageQueueNameHelper.java
trunk/src/main/org/jboss/jms/util/ToString.java
trunk/src/main/org/jboss/jms/util/XMLException.java
trunk/src/main/org/jboss/jms/util/XMLRuntimeException.java
trunk/src/main/org/jboss/messaging/util/ConcurrentHashSet.java
trunk/src/main/org/jboss/messaging/util/Lockable.java
trunk/src/main/org/jboss/messaging/util/RotatingPool.java
trunk/src/main/org/jboss/messaging/util/SelectiveIterator.java
trunk/tests/src/org/jboss/test/messaging/util/SelectiveIteratorTest.java
Modified:
trunk/build-messaging.xml
trunk/src/main/org/jboss/jms/client/ClientAOPStackLoader.java
trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java
trunk/src/main/org/jboss/jms/client/JBossConnectionFactory.java
trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
trunk/src/main/org/jboss/jms/client/container/ConsumerAspect.java
trunk/src/main/org/jboss/jms/client/container/SessionAspect.java
trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.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/ClientSessionDelegate.java
trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
trunk/src/main/org/jboss/jms/client/state/SessionState.java
trunk/src/main/org/jboss/jms/delegate/BrowserDelegate.java
trunk/src/main/org/jboss/jms/delegate/ConnectionDelegate.java
trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/delegate/ConsumerDelegate.java
trunk/src/main/org/jboss/jms/delegate/SessionDelegate.java
trunk/src/main/org/jboss/jms/message/MessageIdGenerator.java
trunk/src/main/org/jboss/jms/server/ConnectionManager.java
trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
trunk/src/main/org/jboss/jms/server/ServerPeer.java
trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java
trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
trunk/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.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/endpoint/ConnectionFactoryInternalEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
trunk/src/main/org/jboss/jms/server/endpoint/advised/BrowserAdvised.java
trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java
trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java
trunk/src/main/org/jboss/jms/server/endpoint/advised/ConsumerAdvised.java
trunk/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java
trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManagerService.java
trunk/src/main/org/jboss/jms/tx/ClientTransaction.java
trunk/src/main/org/jboss/jms/tx/ResourceManager.java
trunk/src/main/org/jboss/jms/util/XMLUtil.java
trunk/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java
trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java
trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java
trunk/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java
trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionSendRequest.java
trunk/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java
trunk/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
trunk/src/main/org/jboss/messaging/core/plugin/DefaultPostOfficeService.java
trunk/src/main/org/jboss/messaging/core/plugin/JDBCMBeanSupport.java
trunk/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManagerService.java
trunk/src/main/org/jboss/messaging/core/plugin/JDBCServiceSupport.java
trunk/src/main/org/jboss/messaging/util/Util.java
trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
trunk/tests/src/org/jboss/test/messaging/jms/server/connectionmanager/SimpleConnectionManagerTest.java
trunk/tests/src/org/jboss/test/messaging/jms/util/MessageQueueNameHelperTest.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/util/JNDIUtilTest.java
trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java
Log:
Split client and server classes step 8
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/build-messaging.xml 2007-05-15 07:31:30 UTC (rev 2684)
@@ -459,7 +459,9 @@
<include name="org/jboss/jms/delegate/**/*.class"/>
<include name="org/jboss/jms/destination/**/*.class"/>
<include name="org/jboss/jms/message/**/*.class"/>
- <include name="org/jboss/jms/tx/**/*.class"/>
+ <include name="org/jboss/jms/tx/**/*.class"/>
+ <include name="org/jboss/jms/referenceable/*.class"/>
+ <include name="org/jboss/messaging/util/**/*.class"/>
</fileset>
<fileset dir="${build.etc}">
<include name="VERSION"/>
Modified: trunk/src/main/org/jboss/jms/client/ClientAOPStackLoader.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/ClientAOPStackLoader.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/ClientAOPStackLoader.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -7,7 +7,7 @@
package org.jboss.jms.client;
import org.jboss.jms.client.container.JmsClientAspectXMLLoader;
-import org.jboss.jms.server.endpoint.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
/**
* A static singleton that insures the client-side AOP stack is loaded.
Modified: trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/FailoverCommandCenter.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -14,7 +14,7 @@
import org.jboss.jms.client.remoting.JMSRemotingConnection;
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.delegate.ConnectionFactoryDelegate;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.logging.Logger;
/**
Modified: trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -39,7 +39,7 @@
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.message.MessageProxy;
-import org.jboss.jms.util.MessageQueueNameHelper;
+import org.jboss.messaging.util.MessageQueueNameHelper;
import org.jboss.logging.Logger;
import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
Modified: trunk/src/main/org/jboss/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/JBossConnectionFactory.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/JBossConnectionFactory.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -41,7 +41,7 @@
import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.referenceable.SerializableObjectRefAddr;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.logging.Logger;
/**
Modified: trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -16,7 +16,7 @@
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.client.FailoverCommandCenter;
import org.jboss.jms.client.plugin.LoadBalancingPolicy;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.jms.util.MessagingNetworkFailureException;
import javax.jms.JMSException;
Modified: trunk/src/main/org/jboss/jms/client/container/ConsumerAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ConsumerAspect.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/container/ConsumerAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -34,7 +34,7 @@
import org.jboss.jms.delegate.ConsumerDelegate;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.delegate.ConnectionDelegate;
-import org.jboss.jms.util.MessageQueueNameHelper;
+import org.jboss.messaging.util.MessageQueueNameHelper;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
Modified: trunk/src/main/org/jboss/jms/client/container/SessionAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/SessionAspect.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/container/SessionAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -43,6 +43,8 @@
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.client.state.SessionState;
import org.jboss.jms.delegate.ConnectionDelegate;
+import org.jboss.jms.delegate.DefaultCancel;
+import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.message.BytesMessageProxy;
@@ -57,8 +59,6 @@
import org.jboss.jms.message.ObjectMessageProxy;
import org.jboss.jms.message.StreamMessageProxy;
import org.jboss.jms.message.TextMessageProxy;
-import org.jboss.jms.server.endpoint.DefaultCancel;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
import org.jboss.jms.tx.LocalTx;
import org.jboss.jms.tx.ResourceManager;
import org.jboss.logging.Logger;
Modified: trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -44,7 +44,7 @@
import org.jboss.jms.message.MessageIdGenerator;
import org.jboss.jms.message.MessageIdGeneratorFactory;
import org.jboss.jms.server.Version;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
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 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.util.Map;
import java.io.Serializable;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+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;
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -34,7 +34,7 @@
import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.Version;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+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;
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -32,8 +32,11 @@
import org.jboss.jms.client.state.ConnectionState;
import org.jboss.jms.client.state.HierarchicalState;
+import org.jboss.jms.delegate.Ack;
import org.jboss.jms.delegate.BrowserDelegate;
+import org.jboss.jms.delegate.Cancel;
import org.jboss.jms.delegate.ConsumerDelegate;
+import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.jms.delegate.ProducerDelegate;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.destination.JBossDestination;
@@ -46,9 +49,6 @@
import org.jboss.jms.message.ObjectMessageProxy;
import org.jboss.jms.message.StreamMessageProxy;
import org.jboss.jms.message.TextMessageProxy;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
import org.jboss.jms.wireformat.CloseRequest;
import org.jboss.jms.wireformat.ClosingRequest;
import org.jboss.jms.wireformat.RequestSupport;
Modified: trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -33,9 +33,9 @@
import org.jboss.jms.delegate.ConsumerDelegate;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.message.MessageProxy;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.DefaultCancel;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
+import org.jboss.jms.delegate.Cancel;
+import org.jboss.jms.delegate.DefaultCancel;
+import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.message.Message;
import org.jboss.messaging.util.Future;
Modified: trunk/src/main/org/jboss/jms/client/state/SessionState.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/state/SessionState.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/client/state/SessionState.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -42,8 +42,8 @@
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.server.Version;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
-import org.jboss.jms.server.endpoint.DeliveryRecovery;
+import org.jboss.jms.delegate.DeliveryInfo;
+import org.jboss.jms.delegate.DeliveryRecovery;
import org.jboss.jms.tx.MessagingXAResource;
import org.jboss.jms.tx.ResourceManager;
import org.jboss.logging.Logger;
Copied: trunk/src/main/org/jboss/jms/delegate/Ack.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/Ack.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/Ack.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/Ack.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,36 @@
+/*
+ * 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.delegate;
+
+/**
+ * A Ack
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public interface Ack
+{
+ long getDeliveryID();
+}
Modified: trunk/src/main/org/jboss/jms/delegate/BrowserDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/BrowserDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/delegate/BrowserDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,8 +21,6 @@
*/
package org.jboss.jms.delegate;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
-
/**
* Represents the minimal set of operations to provide browser
* functionality.
Copied: trunk/src/main/org/jboss/jms/delegate/BrowserEndpoint.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/BrowserEndpoint.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/BrowserEndpoint.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/BrowserEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,53 @@
+/*
+ * 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.delegate;
+
+import javax.jms.JMSException;
+
+import org.jboss.jms.client.Closeable;
+import org.jboss.jms.message.JBossMessage;
+
+/**
+ * Represents the set of methods from the BrowserDelegate that are handled on the server. The rest
+ * of the methods are handled in the advice stack.
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public interface BrowserEndpoint extends Closeable
+{
+ /**
+ * Reset the internal state of the browser endpoint so the following
+ * nextMessage()/hasNextMessage()/nextMessageBlock() invocations would reflect the state of the
+ * queue at the moment of the reset.
+ */
+ void reset() throws JMSException;
+
+ JBossMessage nextMessage() throws JMSException;
+
+ boolean hasNextMessage() throws JMSException;
+
+ JBossMessage[] nextMessageBlock(int maxMessages) throws JMSException;
+}
Copied: trunk/src/main/org/jboss/jms/delegate/Cancel.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/Cancel.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/Cancel.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/Cancel.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,42 @@
+/*
+ * 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.delegate;
+
+/**
+ * A Cancel
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public interface Cancel
+{
+ long getDeliveryId();
+
+ int getDeliveryCount();
+
+ boolean isExpired();
+
+ boolean isReachedMaxDeliveryAttempts();
+}
Modified: trunk/src/main/org/jboss/jms/delegate/ConnectionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConnectionDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/delegate/ConnectionDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -27,9 +27,8 @@
import javax.jms.JMSException;
import javax.jms.ServerSessionPool;
-import org.jboss.jms.client.JBossConnectionConsumer;
import org.jboss.jms.client.FailoverListener;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.client.JBossConnectionConsumer;
/**
* Represents the minimal set of operations to provide connection functionality.
Copied: trunk/src/main/org/jboss/jms/delegate/ConnectionEndpoint.java (from rev 2681, trunk/src/main/org/jboss/jms/server/endpoint/ConnectionEndpoint.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConnectionEndpoint.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/ConnectionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,62 @@
+/*
+ * 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.delegate;
+
+import javax.jms.JMSException;
+
+import org.jboss.jms.client.Closeable;
+import org.jboss.jms.delegate.SessionDelegate;
+import org.jboss.jms.tx.TransactionRequest;
+import org.jboss.messaging.core.plugin.IDBlock;
+import org.jboss.messaging.core.tx.MessagingXid;
+
+
+/**
+ * Represents the set of methods from the ConnectionDelegate that are handled on the server. The
+ * rest of the methods are handled in the advice stack.
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public interface ConnectionEndpoint extends Closeable
+{
+ SessionDelegate createSessionDelegate(boolean transacted,
+ int acknowledgmentMode,
+ boolean isXA) throws JMSException;
+
+ String getClientID() throws JMSException;
+
+ void setClientID(String id) throws JMSException;
+
+ void start() throws JMSException;
+
+ void stop() throws JMSException;
+
+ void sendTransaction(TransactionRequest request, boolean checkForDuplicates) throws JMSException;
+
+ MessagingXid[] getPreparedTransactions() throws JMSException;
+
+ IDBlock getIdBlock(int size) throws JMSException;
+}
+
Modified: trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,7 +21,6 @@
*/
package org.jboss.jms.delegate;
-import org.jboss.jms.server.endpoint.ConnectionFactoryEndpoint;
/**
* Represents the minimal set of operations to provide connection factory functionality. Some of the
Copied: trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryEndpoint.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryEndpoint.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryEndpoint.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/ConnectionFactoryEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,49 @@
+/*
+ * 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.delegate;
+
+import javax.jms.JMSException;
+
+/**
+ * Represents the set of methods from the ConnectionFactoryDelegate that are handled on the server.
+ * The rest of the methods are handled in the advice stack.
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public interface ConnectionFactoryEndpoint
+{
+ /**
+ * @param failedNodeID - zero or positive values mean the connection creation attempt is result
+ * of failover. Negative values are ignored (mean regular connection creation attempt).
+ */
+ CreateConnectionResult createConnectionDelegate(String username,
+ String password,
+ int failedNodeID)
+ throws JMSException;
+
+ byte[] getClientAOPStack() throws JMSException;
+}
+
Modified: trunk/src/main/org/jboss/jms/delegate/ConsumerDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConsumerDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/delegate/ConsumerDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -26,7 +26,6 @@
import javax.jms.MessageListener;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.server.endpoint.ConsumerEndpoint;
/**
* Represents the minimal set of operations to provide consumer
Copied: trunk/src/main/org/jboss/jms/delegate/ConsumerEndpoint.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/ConsumerEndpoint.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/ConsumerEndpoint.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/ConsumerEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,45 @@
+/*
+ * 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.delegate;
+
+import javax.jms.JMSException;
+
+import org.jboss.jms.client.Closeable;
+
+/**
+ * Represents the set of methods from the ConsumerDelegate that are handled on the server.
+ * The rest of the methods are handled in the advice stack.
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public interface ConsumerEndpoint extends Closeable
+{
+ /**
+ * Sent to the server to specify a new maximum rate at which to send messages at
+ */
+ void changeRate(float newRate) throws JMSException;
+}
Copied: trunk/src/main/org/jboss/jms/delegate/CreateConnectionResult.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/CreateConnectionResult.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/CreateConnectionResult.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/CreateConnectionResult.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,136 @@
+/*
+ * 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.delegate;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+
+import org.jboss.jms.client.delegate.ClientConnectionDelegate;
+import org.jboss.messaging.util.Streamable;
+
+/**
+ *
+ * A CreateConnectionResult
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public class CreateConnectionResult implements Streamable
+{
+ // Constants -----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ private static final int NULL = 0;
+
+ private static final int NOT_NULL = 1;
+
+ // Attributes ----------------------------------------------------
+
+ private ClientConnectionDelegate delegate;
+
+ private int actualFailoverNodeID;
+
+ // Constructors --------------------------------------------------
+
+ public CreateConnectionResult()
+ {
+ }
+
+ public CreateConnectionResult(ClientConnectionDelegate delegate)
+ {
+ this(delegate, Integer.MIN_VALUE);
+ }
+
+ public CreateConnectionResult(int actualFailoverNodeID)
+ {
+ this(null, actualFailoverNodeID);
+ }
+
+ private CreateConnectionResult(ClientConnectionDelegate delegate,
+ int actualFailoverNodeId)
+ {
+ this.delegate = delegate;
+ this.actualFailoverNodeID = actualFailoverNodeId;
+ }
+
+ // Public --------------------------------------------------------
+
+ public ClientConnectionDelegate getDelegate()
+ {
+ return delegate;
+ }
+
+ public int getActualFailoverNodeID()
+ {
+ return actualFailoverNodeID;
+ }
+
+ public String toString()
+ {
+ return "CreateConnectionResult[" + delegate + ", failover node " + actualFailoverNodeID + "]";
+ }
+
+ // Streamable implementation ------------------------------------
+
+ public void read(DataInputStream in) throws Exception
+ {
+ actualFailoverNodeID = in.readInt();
+
+ int b = in.readByte();
+
+ if (b == NOT_NULL)
+ {
+ delegate = new ClientConnectionDelegate();
+
+ delegate.read(in);
+ }
+ }
+
+ public void write(DataOutputStream out) throws Exception
+ {
+ out.writeInt(actualFailoverNodeID);
+
+ if (delegate == null)
+ {
+ out.writeByte(NULL);
+ }
+ else
+ {
+ out.writeByte(NOT_NULL);
+
+ delegate.write(out);
+ }
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
Copied: trunk/src/main/org/jboss/jms/delegate/DefaultAck.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/DefaultAck.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/DefaultAck.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/DefaultAck.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,73 @@
+/*
+ * 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.delegate;
+
+/**
+ * A DefaultAck
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public class DefaultAck implements Ack
+{
+
+ // Constants ------------------------------------------------------------------------------------
+
+ // Static ---------------------------------------------------------------------------------------
+
+ // Attributes -----------------------------------------------------------------------------------
+
+ private long deliveryID;
+
+ // Constructors ---------------------------------------------------------------------------------
+
+ public DefaultAck(long deliveryId)
+ {
+ this.deliveryID = deliveryId;
+ }
+
+ // Ack implementation ---------------------------------------------------------------------------
+
+ public long getDeliveryID()
+ {
+ return deliveryID;
+ }
+
+ // Public ---------------------------------------------------------------------------------------
+
+ public String toString()
+ {
+ return "ACK[" + deliveryID + "]";
+ }
+
+ // Package protected ----------------------------------------------------------------------------
+
+ // Protected ------------------------------------------------------------------------------------
+
+ // Private --------------------------------------------------------------------------------------
+
+ // Inner classes --------------------------------------------------------------------------------
+
+}
Copied: trunk/src/main/org/jboss/jms/delegate/DefaultCancel.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/DefaultCancel.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/DefaultCancel.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/DefaultCancel.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,107 @@
+/*
+ * 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.delegate;
+
+
+/**
+ *
+ * A Cancel.
+ *
+ * Used to send a cancel (NACK) to the server
+ *
+ * When we cancel we send delivery count info, this means delivery count
+ * can be updated on the server, and into storage if persistent, and the
+ * message can be sent to DLQ if appropriate
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public class DefaultCancel implements Cancel
+{
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ private long deliveryId;
+
+ private int deliveryCount;
+
+ private boolean expired;
+
+ private boolean reachedMaxDeliveryAttempts;
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ public DefaultCancel()
+ {
+ }
+
+ public DefaultCancel(long deliveryId, int deliveryCount, boolean expired, boolean maxDeliveries)
+ {
+ this.deliveryId = deliveryId;
+
+ this.deliveryCount = deliveryCount;
+
+ this.expired = expired;
+
+ this.reachedMaxDeliveryAttempts = maxDeliveries;
+ }
+
+ // Public --------------------------------------------------------
+
+ public long getDeliveryId()
+ {
+ return deliveryId;
+ }
+
+ public int getDeliveryCount()
+ {
+ return deliveryCount;
+ }
+
+ public boolean isExpired()
+ {
+ return expired;
+ }
+
+ public boolean isReachedMaxDeliveryAttempts()
+ {
+ return reachedMaxDeliveryAttempts;
+ }
+
+ // Class YYY overrides -------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Package Private -----------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner Classes -------------------------------------------------
+
+}
+
Copied: trunk/src/main/org/jboss/jms/delegate/DeliveryInfo.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/DeliveryInfo.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/DeliveryInfo.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/DeliveryInfo.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,117 @@
+/*
+ * 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.delegate;
+
+import org.jboss.jms.delegate.SessionDelegate;
+import org.jboss.jms.message.MessageProxy;
+
+/**
+ * Struct like class for holding information regarding a delivery
+ * on the client side - this is never passed to the server
+ *
+ * @author <a href="mailto:tim.fox at jboss.com>Tim Fox </a>
+ * @author <a href="mailto:ovidiu at jboss.com>Ovidiu Feodorov</a>
+ *
+ * $Id: AckInfo.java 1770 2006-12-12 10:49:42Z timfox $
+ */
+public class DeliveryInfo implements Ack
+{
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ private String queueName;
+
+ //This is needed when doing local redelivery of messages, since we need to know which
+ //consumer gets the message
+ private int consumerId;
+
+ private MessageProxy msg;
+
+ //When using the evil abomination known as a ConnectionConsumer, the connection consumer
+ //will get from a session that it created, then pass them onto sessions got from the pool
+ //this means when the messages are acked/cancelled then this needs to be done against
+ //the connection consumer's session not the session from the pool, since that session won't know
+ //about the deliveries on the server side
+ //Therefore if this delivery was done using a connection consumer then this attribute is set
+ //to the connection consumer's session, otherwise it will be null
+ private SessionDelegate connectionConsumerSession;
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ public DeliveryInfo(MessageProxy msg, int consumerId, String queueName,
+ SessionDelegate connectionConsumerSession)
+ {
+ this.msg = msg;
+
+ this.consumerId = consumerId;
+
+ this.queueName = queueName;
+
+ this.connectionConsumerSession = connectionConsumerSession;
+ }
+
+ // Public --------------------------------------------------------
+
+ public String getQueueName()
+ {
+ return queueName;
+ }
+
+ public int getConsumerId()
+ {
+ return consumerId;
+ }
+
+ public MessageProxy getMessageProxy()
+ {
+ return msg;
+ }
+
+ public SessionDelegate getConnectionConsumerSession()
+ {
+ return connectionConsumerSession;
+ }
+
+ public String toString()
+ {
+ return "Delivery[" + getDeliveryID() + ", " + msg + "]";
+ }
+
+ // Ack Implementation -------------------------------------------
+
+ public long getDeliveryID()
+ {
+ return msg.getDeliveryId();
+ }
+
+ // Protected -----------------------------------------------------
+
+ // Package Private -----------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner Classes -------------------------------------------------
+
+}
Copied: trunk/src/main/org/jboss/jms/delegate/DeliveryRecovery.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/DeliveryRecovery.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/DeliveryRecovery.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/DeliveryRecovery.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,112 @@
+/*
+ * 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.delegate;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+
+import org.jboss.messaging.util.Streamable;
+
+/**
+ * A DeliveryRecovery
+ *
+ * Used for sending information about to recover a delivery to the server
+ * on failover
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ *
+ */
+public class DeliveryRecovery implements Streamable
+{
+ // Constants ------------------------------------------------------------------------------------
+
+ // Static ---------------------------------------------------------------------------------------
+
+ // Attributes -----------------------------------------------------------------------------------
+
+ private long deliveryID;
+ private long messageID;
+ private String queueName;
+
+ // Constructors ---------------------------------------------------------------------------------
+
+ public DeliveryRecovery()
+ {
+ }
+
+ public DeliveryRecovery(long deliveryID, long messageID, String queueName)
+ {
+ this.deliveryID = deliveryID;
+ this.messageID = messageID;
+ this.queueName = queueName;
+ }
+
+ // Streamable implementation --------------------------------------------------------------------
+
+ public void read(DataInputStream in) throws Exception
+ {
+ deliveryID = in.readLong();
+ messageID = in.readLong();
+ queueName = in.readUTF();
+ }
+
+ public void write(DataOutputStream out) throws Exception
+ {
+ out.writeLong(deliveryID);
+ out.writeLong(messageID);
+ out.writeUTF(queueName);
+ }
+
+ // Public ---------------------------------------------------------------------------------------
+
+ public long getDeliveryID()
+ {
+ return deliveryID;
+ }
+
+ public long getMessageID()
+ {
+ return messageID;
+ }
+
+ public String getQueueName()
+ {
+ return queueName;
+ }
+
+ public String toString()
+ {
+ return "DeliveryRecovery[ID=" + deliveryID + ", MID=" + messageID + ", Queue name=" + queueName + "]";
+ }
+
+ // Package protected ----------------------------------------------------------------------------
+
+ // Protected ------------------------------------------------------------------------------------
+
+ // Private --------------------------------------------------------------------------------------
+
+ // Inner classes --------------------------------------------------------------------------------
+
+}
Modified: trunk/src/main/org/jboss/jms/delegate/SessionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/SessionDelegate.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/delegate/SessionDelegate.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -35,8 +35,6 @@
import org.jboss.jms.message.ObjectMessageProxy;
import org.jboss.jms.message.StreamMessageProxy;
import org.jboss.jms.message.TextMessageProxy;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
* Represents the minimal set of operations to provide session functionality.
Copied: trunk/src/main/org/jboss/jms/delegate/SessionEndpoint.java (from rev 2680, trunk/src/main/org/jboss/jms/server/endpoint/SessionEndpoint.java)
===================================================================
--- trunk/src/main/org/jboss/jms/delegate/SessionEndpoint.java (rev 0)
+++ trunk/src/main/org/jboss/jms/delegate/SessionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,132 @@
+/*
+ * 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.delegate;
+
+
+import java.util.List;
+
+import javax.jms.JMSException;
+
+import org.jboss.jms.client.Closeable;
+import org.jboss.jms.delegate.BrowserDelegate;
+import org.jboss.jms.delegate.ConsumerDelegate;
+import org.jboss.jms.destination.JBossDestination;
+import org.jboss.jms.destination.JBossQueue;
+import org.jboss.jms.destination.JBossTopic;
+import org.jboss.jms.message.JBossMessage;
+
+/**
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ * $Id$
+ */
+public interface SessionEndpoint extends Closeable
+{
+ /**
+ * @param failoverChannelID - the ID of the channel for which there is a failover process in
+ * progress. -1 means regular (non-failover) consumer delegate creation.
+ */
+ ConsumerDelegate createConsumerDelegate(JBossDestination destination, String selector,
+ boolean noLocal, String subscriptionName,
+ boolean connectionConsumer) throws JMSException;
+
+ /**
+ * @param failoverChannelID - the ID of the channel for which there is a failover process in
+ * progress. -1 means regular (non-failover) browser delegate creation.
+ */
+ BrowserDelegate createBrowserDelegate(JBossDestination queue, String messageSelector) throws JMSException;
+
+ /**
+ * Creates a queue identity given a Queue name. Does NOT create the physical queue. The physical
+ * creation of queues is an administrative task and is not to be initiated by the JMS API, with
+ * the exception of temporary queues.
+ */
+ JBossQueue createQueue(String queueName) throws JMSException;
+
+ /**
+ * Creates a topic identity given a Queue name. Does NOT create the physical topic. The physical
+ * creation of topics is an administrative task and is not to be initiated by the JMS API, with
+ * the exception of temporary topics.
+ */
+ JBossTopic createTopic(String topicName) throws JMSException;
+
+ /**
+ * Acknowledge a list of deliveries
+ * @throws JMSException
+ */
+ void acknowledgeDeliveries(List acks) throws JMSException;
+
+ /**
+ * Acknowledge a delivery
+ * @throws JMSException
+ */
+ void acknowledgeDelivery(Ack ack) throws JMSException;
+
+ /**
+ * Cancel a list of deliveries.
+ */
+ void cancelDeliveries(List cancels) throws JMSException;
+
+ /**
+ * Cancel a delivery
+ * @param cancel
+ * @throws JMSException
+ */
+ void cancelDelivery(Cancel cancel) throws JMSException;
+
+ /**
+ * Add a temporary destination.
+ */
+ void addTemporaryDestination(JBossDestination destination) throws JMSException;
+
+ /**
+ * Delete a temporary destination
+ */
+ void deleteTemporaryDestination(JBossDestination destination) throws JMSException;
+
+ /**
+ * Unsubscribe the client from the durable subscription
+ * specified by subscriptionName
+ *
+ * @param subscriptionName the Name of the durable subscription to unsubscribe from
+ * @throws JMSException if the unsubscribe fails
+ */
+ void unsubscribe(String subscriptionName) throws JMSException;
+
+ /**
+ * Send a message
+ * @param message The message to send
+ * @throws JMSException
+ */
+ void send(JBossMessage message, boolean checkForDuplicates) throws JMSException;
+
+ /**
+ * Send delivery info to the server so the delivery lists can be repopulated. Used only in
+ * failover.
+ */
+ void recoverDeliveries(List createInfos) throws JMSException;
+}
+
Modified: trunk/src/main/org/jboss/jms/message/MessageIdGenerator.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/MessageIdGenerator.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/message/MessageIdGenerator.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,7 +23,7 @@
import javax.jms.JMSException;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.plugin.IDBlock;
Modified: trunk/src/main/org/jboss/jms/server/ConnectionManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ConnectionManager.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/ConnectionManager.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,11 +21,12 @@
*/
package org.jboss.jms.server;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
-import org.jboss.messaging.core.plugin.contract.MessagingComponent;
import java.util.List;
+import org.jboss.jms.delegate.ConnectionEndpoint;
+import org.jboss.messaging.core.plugin.contract.MessagingComponent;
+
/**
* An interface that allows management of ConnectionEnpoints and their association with remoting
* clients.
Modified: trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -28,7 +28,7 @@
import javax.naming.NameNotFoundException;
import org.jboss.jms.destination.*;
import org.jboss.jms.server.destination.ManagedDestination;
-import org.jboss.jms.util.JNDIUtil;
+import org.jboss.messaging.util.JNDIUtil;
import org.jboss.jms.util.MessagingJMSException;
import org.jboss.logging.Logger;
Modified: trunk/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -51,7 +51,6 @@
import org.jboss.jms.server.remoting.JMSServerInvocationHandler;
import org.jboss.jms.server.remoting.JMSWireFormat;
import org.jboss.jms.server.security.SecurityMetadataStore;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.Queue;
import org.jboss.messaging.core.memory.MemoryManager;
@@ -68,6 +67,7 @@
import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.cluster.FailoverStatus;
import org.jboss.messaging.core.tx.TransactionRepository;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.messaging.util.Util;
import org.jboss.mx.loading.UnifiedClassLoader3;
import org.jboss.remoting.marshal.MarshalFactory;
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -13,7 +13,7 @@
import org.jboss.jms.server.ConnectionManager;
import org.jboss.jms.server.ConnectorManager;
import org.jboss.jms.server.ServerPeer;
-import org.jboss.jms.util.ExceptionUtil;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.remoting.InvokerLocator;
import org.jboss.system.ServiceMBeanSupport;
import org.w3c.dom.Element;
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -48,7 +48,7 @@
import org.jboss.jms.server.Version;
import org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint;
import org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised;
-import org.jboss.jms.util.JNDIUtil;
+import org.jboss.messaging.util.JNDIUtil;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.plugin.contract.FailoverMapper;
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/JNDIBindings.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,17 +21,16 @@
*/
package org.jboss.jms.server.connectionfactory;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Node;
-import org.jboss.jms.util.XMLException;
-import org.jboss.jms.util.XMLUtil;
-
-import java.util.List;
-import java.util.Collections;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
+import java.util.List;
+import org.jboss.jms.util.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
@@ -51,7 +50,7 @@
// Constructors --------------------------------------------------
- public JNDIBindings(Element delegate) throws XMLException
+ public JNDIBindings(Element delegate)
{
parse(delegate);
this.delegate = delegate;
@@ -98,11 +97,11 @@
// Private -------------------------------------------------------
- private void parse(Element e) throws XMLException
+ private void parse(Element e)
{
if (!"bindings".equals(e.getNodeName()))
{
- throw new XMLException("The element is not a <bindings> element");
+ throw new IllegalArgumentException("The element is not a <bindings> element");
}
if (!e.hasChildNodes())
Modified: trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,16 +24,16 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.HashSet;
import java.util.Set;
import javax.jms.JMSException;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.server.ConnectionManager;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
import org.jboss.logging.Logger;
import org.jboss.messaging.util.Util;
import org.jboss.remoting.Client;
Modified: trunk/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/destination/DestinationServiceSupport.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -15,7 +15,7 @@
import org.jboss.jms.server.SecurityManager;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.messagecounter.MessageCounter;
-import org.jboss.jms.util.ExceptionUtil;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.messaging.core.plugin.IDManager;
import org.jboss.messaging.core.plugin.contract.MessageStore;
import org.jboss.messaging.core.plugin.contract.MessagingComponent;
Modified: trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -29,10 +29,10 @@
import org.jboss.jms.server.JMSCondition;
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.server.selector.Selector;
-import org.jboss.jms.util.MessageQueueNameHelper;
import org.jboss.messaging.core.Queue;
import org.jboss.messaging.core.message.Message;
import org.jboss.messaging.core.plugin.postoffice.Binding;
+import org.jboss.messaging.util.MessageQueueNameHelper;
/**
* A ManagedTopic
Modified: trunk/src/main/org/jboss/jms/server/destination/QueueService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/QueueService.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/destination/QueueService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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.ExceptionUtil;
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;
/**
* 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 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/destination/TopicService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -14,8 +14,8 @@
import org.jboss.jms.server.JMSCondition;
import org.jboss.jms.server.messagecounter.MessageCounter;
-import org.jboss.jms.util.ExceptionUtil;
-import org.jboss.jms.util.MessageQueueNameHelper;
+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;
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/Ack.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/Ack.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/Ack.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,36 +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.server.endpoint;
-
-/**
- * A Ack
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public interface Ack
-{
- long getDeliveryID();
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/BrowserEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/BrowserEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/BrowserEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,53 +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.server.endpoint;
-
-import javax.jms.JMSException;
-
-import org.jboss.jms.client.Closeable;
-import org.jboss.jms.message.JBossMessage;
-
-/**
- * Represents the set of methods from the BrowserDelegate that are handled on the server. The rest
- * of the methods are handled in the advice stack.
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public interface BrowserEndpoint extends Closeable
-{
- /**
- * Reset the internal state of the browser endpoint so the following
- * nextMessage()/hasNextMessage()/nextMessageBlock() invocations would reflect the state of the
- * queue at the moment of the reset.
- */
- void reset() throws JMSException;
-
- JBossMessage nextMessage() throws JMSException;
-
- boolean hasNextMessage() throws JMSException;
-
- JBossMessage[] nextMessageBlock(int maxMessages) throws JMSException;
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/Cancel.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/Cancel.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/Cancel.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,42 +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.server.endpoint;
-
-/**
- * A Cancel
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public interface Cancel
-{
- long getDeliveryId();
-
- int getDeliveryCount();
-
- boolean isExpired();
-
- boolean isReachedMaxDeliveryAttempts();
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/ConnectionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ConnectionEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ConnectionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,62 +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.server.endpoint;
-
-import javax.jms.JMSException;
-
-import org.jboss.jms.client.Closeable;
-import org.jboss.jms.delegate.SessionDelegate;
-import org.jboss.jms.tx.TransactionRequest;
-import org.jboss.messaging.core.plugin.IDBlock;
-import org.jboss.messaging.core.tx.MessagingXid;
-
-
-/**
- * Represents the set of methods from the ConnectionDelegate that are handled on the server. The
- * rest of the methods are handled in the advice stack.
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public interface ConnectionEndpoint extends Closeable
-{
- SessionDelegate createSessionDelegate(boolean transacted,
- int acknowledgmentMode,
- boolean isXA) throws JMSException;
-
- String getClientID() throws JMSException;
-
- void setClientID(String id) throws JMSException;
-
- void start() throws JMSException;
-
- void stop() throws JMSException;
-
- void sendTransaction(TransactionRequest request, boolean checkForDuplicates) throws JMSException;
-
- MessagingXid[] getPreparedTransactions() throws JMSException;
-
- IDBlock getIdBlock(int size) throws JMSException;
-}
-
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,49 +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.server.endpoint;
-
-import javax.jms.JMSException;
-
-/**
- * Represents the set of methods from the ConnectionFactoryDelegate that are handled on the server.
- * The rest of the methods are handled in the advice stack.
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public interface ConnectionFactoryEndpoint
-{
- /**
- * @param failedNodeID - zero or positive values mean the connection creation attempt is result
- * of failover. Negative values are ignored (mean regular connection creation attempt).
- */
- CreateConnectionResult createConnectionDelegate(String username,
- String password,
- int failedNodeID)
- throws JMSException;
-
- byte[] getClientAOPStack() throws JMSException;
-}
-
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryInternalEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryInternalEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ConnectionFactoryInternalEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,6 +23,8 @@
import javax.jms.JMSException;
+import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
/**
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/ConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ConsumerEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ConsumerEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,45 +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.server.endpoint;
-
-import javax.jms.JMSException;
-
-import org.jboss.jms.client.Closeable;
-
-/**
- * Represents the set of methods from the ConsumerDelegate that are handled on the server.
- * The rest of the methods are handled in the advice stack.
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- *
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public interface ConsumerEndpoint extends Closeable
-{
- /**
- * Sent to the server to specify a new maximum rate at which to send messages at
- */
- void changeRate(float newRate) throws JMSException;
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/CreateConnectionResult.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/CreateConnectionResult.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/CreateConnectionResult.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,136 +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.server.endpoint;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.jms.client.delegate.ClientConnectionDelegate;
-import org.jboss.messaging.util.Streamable;
-
-/**
- *
- * A CreateConnectionResult
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class CreateConnectionResult implements Streamable
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- private static final int NULL = 0;
-
- private static final int NOT_NULL = 1;
-
- // Attributes ----------------------------------------------------
-
- private ClientConnectionDelegate delegate;
-
- private int actualFailoverNodeID;
-
- // Constructors --------------------------------------------------
-
- public CreateConnectionResult()
- {
- }
-
- public CreateConnectionResult(ClientConnectionDelegate delegate)
- {
- this(delegate, Integer.MIN_VALUE);
- }
-
- public CreateConnectionResult(int actualFailoverNodeID)
- {
- this(null, actualFailoverNodeID);
- }
-
- private CreateConnectionResult(ClientConnectionDelegate delegate,
- int actualFailoverNodeId)
- {
- this.delegate = delegate;
- this.actualFailoverNodeID = actualFailoverNodeId;
- }
-
- // Public --------------------------------------------------------
-
- public ClientConnectionDelegate getDelegate()
- {
- return delegate;
- }
-
- public int getActualFailoverNodeID()
- {
- return actualFailoverNodeID;
- }
-
- public String toString()
- {
- return "CreateConnectionResult[" + delegate + ", failover node " + actualFailoverNodeID + "]";
- }
-
- // Streamable implementation ------------------------------------
-
- public void read(DataInputStream in) throws Exception
- {
- actualFailoverNodeID = in.readInt();
-
- int b = in.readByte();
-
- if (b == NOT_NULL)
- {
- delegate = new ClientConnectionDelegate();
-
- delegate.read(in);
- }
- }
-
- public void write(DataOutputStream out) throws Exception
- {
- out.writeInt(actualFailoverNodeID);
-
- if (delegate == null)
- {
- out.writeByte(NULL);
- }
- else
- {
- out.writeByte(NOT_NULL);
-
- delegate.write(out);
- }
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/DefaultAck.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/DefaultAck.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/DefaultAck.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,73 +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.server.endpoint;
-
-/**
- * A DefaultAck
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class DefaultAck implements Ack
-{
-
- // Constants ------------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- private long deliveryID;
-
- // Constructors ---------------------------------------------------------------------------------
-
- public DefaultAck(long deliveryId)
- {
- this.deliveryID = deliveryId;
- }
-
- // Ack implementation ---------------------------------------------------------------------------
-
- public long getDeliveryID()
- {
- return deliveryID;
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- public String toString()
- {
- return "ACK[" + deliveryID + "]";
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/DefaultCancel.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/DefaultCancel.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/DefaultCancel.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,107 +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.server.endpoint;
-
-
-/**
- *
- * A Cancel.
- *
- * Used to send a cancel (NACK) to the server
- *
- * When we cancel we send delivery count info, this means delivery count
- * can be updated on the server, and into storage if persistent, and the
- * message can be sent to DLQ if appropriate
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class DefaultCancel implements Cancel
-{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private long deliveryId;
-
- private int deliveryCount;
-
- private boolean expired;
-
- private boolean reachedMaxDeliveryAttempts;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public DefaultCancel()
- {
- }
-
- public DefaultCancel(long deliveryId, int deliveryCount, boolean expired, boolean maxDeliveries)
- {
- this.deliveryId = deliveryId;
-
- this.deliveryCount = deliveryCount;
-
- this.expired = expired;
-
- this.reachedMaxDeliveryAttempts = maxDeliveries;
- }
-
- // Public --------------------------------------------------------
-
- public long getDeliveryId()
- {
- return deliveryId;
- }
-
- public int getDeliveryCount()
- {
- return deliveryCount;
- }
-
- public boolean isExpired()
- {
- return expired;
- }
-
- public boolean isReachedMaxDeliveryAttempts()
- {
- return reachedMaxDeliveryAttempts;
- }
-
- // Class YYY overrides -------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Package Private -----------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner Classes -------------------------------------------------
-
-}
-
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/DeliveryInfo.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/DeliveryInfo.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/DeliveryInfo.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,117 +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.server.endpoint;
-
-import org.jboss.jms.delegate.SessionDelegate;
-import org.jboss.jms.message.MessageProxy;
-
-/**
- * Struct like class for holding information regarding a delivery
- * on the client side - this is never passed to the server
- *
- * @author <a href="mailto:tim.fox at jboss.com>Tim Fox </a>
- * @author <a href="mailto:ovidiu at jboss.com>Ovidiu Feodorov</a>
- *
- * $Id: AckInfo.java 1770 2006-12-12 10:49:42Z timfox $
- */
-public class DeliveryInfo implements Ack
-{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private String queueName;
-
- //This is needed when doing local redelivery of messages, since we need to know which
- //consumer gets the message
- private int consumerId;
-
- private MessageProxy msg;
-
- //When using the evil abomination known as a ConnectionConsumer, the connection consumer
- //will get from a session that it created, then pass them onto sessions got from the pool
- //this means when the messages are acked/cancelled then this needs to be done against
- //the connection consumer's session not the session from the pool, since that session won't know
- //about the deliveries on the server side
- //Therefore if this delivery was done using a connection consumer then this attribute is set
- //to the connection consumer's session, otherwise it will be null
- private SessionDelegate connectionConsumerSession;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public DeliveryInfo(MessageProxy msg, int consumerId, String queueName,
- SessionDelegate connectionConsumerSession)
- {
- this.msg = msg;
-
- this.consumerId = consumerId;
-
- this.queueName = queueName;
-
- this.connectionConsumerSession = connectionConsumerSession;
- }
-
- // Public --------------------------------------------------------
-
- public String getQueueName()
- {
- return queueName;
- }
-
- public int getConsumerId()
- {
- return consumerId;
- }
-
- public MessageProxy getMessageProxy()
- {
- return msg;
- }
-
- public SessionDelegate getConnectionConsumerSession()
- {
- return connectionConsumerSession;
- }
-
- public String toString()
- {
- return "Delivery[" + getDeliveryID() + ", " + msg + "]";
- }
-
- // Ack Implementation -------------------------------------------
-
- public long getDeliveryID()
- {
- return msg.getDeliveryId();
- }
-
- // Protected -----------------------------------------------------
-
- // Package Private -----------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner Classes -------------------------------------------------
-
-}
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/DeliveryRecovery.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/DeliveryRecovery.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/DeliveryRecovery.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,112 +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.server.endpoint;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
-import org.jboss.messaging.util.Streamable;
-
-/**
- * A DeliveryRecovery
- *
- * Used for sending information about to recover a delivery to the server
- * on failover
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class DeliveryRecovery implements Streamable
-{
- // Constants ------------------------------------------------------------------------------------
-
- // Static ---------------------------------------------------------------------------------------
-
- // Attributes -----------------------------------------------------------------------------------
-
- private long deliveryID;
- private long messageID;
- private String queueName;
-
- // Constructors ---------------------------------------------------------------------------------
-
- public DeliveryRecovery()
- {
- }
-
- public DeliveryRecovery(long deliveryID, long messageID, String queueName)
- {
- this.deliveryID = deliveryID;
- this.messageID = messageID;
- this.queueName = queueName;
- }
-
- // Streamable implementation --------------------------------------------------------------------
-
- public void read(DataInputStream in) throws Exception
- {
- deliveryID = in.readLong();
- messageID = in.readLong();
- queueName = in.readUTF();
- }
-
- public void write(DataOutputStream out) throws Exception
- {
- out.writeLong(deliveryID);
- out.writeLong(messageID);
- out.writeUTF(queueName);
- }
-
- // Public ---------------------------------------------------------------------------------------
-
- public long getDeliveryID()
- {
- return deliveryID;
- }
-
- public long getMessageID()
- {
- return messageID;
- }
-
- public String getQueueName()
- {
- return queueName;
- }
-
- public String toString()
- {
- return "DeliveryRecovery[ID=" + deliveryID + ", MID=" + messageID + ", Queue name=" + queueName + "]";
- }
-
- // Package protected ----------------------------------------------------------------------------
-
- // Protected ------------------------------------------------------------------------------------
-
- // Private --------------------------------------------------------------------------------------
-
- // Inner classes --------------------------------------------------------------------------------
-
-}
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerBrowserEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -28,9 +28,10 @@
import javax.jms.JMSException;
import javax.jms.Message;
+import org.jboss.jms.delegate.BrowserEndpoint;
import org.jboss.jms.message.JBossMessage;
import org.jboss.jms.server.selector.Selector;
-import org.jboss.jms.util.ExceptionUtil;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.Channel;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -35,6 +35,7 @@
import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientSessionDelegate;
import org.jboss.jms.client.remoting.CallbackManager;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.message.JBossMessage;
@@ -48,8 +49,7 @@
import org.jboss.jms.tx.ClientTransaction;
import org.jboss.jms.tx.TransactionRequest;
import org.jboss.jms.tx.ClientTransaction.SessionTxState;
-import org.jboss.jms.util.ExceptionUtil;
-import org.jboss.jms.util.ToString;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.message.Message;
@@ -60,6 +60,7 @@
import org.jboss.messaging.core.tx.MessagingXid;
import org.jboss.messaging.core.tx.Transaction;
import org.jboss.messaging.core.tx.TransactionRepository;
+import org.jboss.messaging.util.Util;
import org.jboss.remoting.Client;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
@@ -222,7 +223,7 @@
try
{
log.debug(this + " creating " + (transacted ? "transacted" : "non transacted") +
- " session, " + ToString.acknowledgmentMode(acknowledgmentMode) + ", " +
+ " session, " + Util.acknowledgmentMode(acknowledgmentMode) + ", " +
(isXA ? "XA": "non XA"));
if (closed)
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -30,13 +30,15 @@
import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.connectionfactory.JNDIBindings;
import org.jboss.jms.server.endpoint.advised.ConnectionAdvised;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.jms.wireformat.ConnectionFactoryUpdate;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.remoting.callback.Callback;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
import org.jboss.security.SecurityAssociation;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,12 +25,12 @@
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
+import org.jboss.jms.delegate.ConsumerEndpoint;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.message.JBossMessage;
import org.jboss.jms.server.destination.TopicService;
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.server.selector.Selector;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.jms.wireformat.ClientDelivery;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
@@ -46,6 +46,7 @@
import org.jboss.messaging.core.plugin.contract.PostOffice;
import org.jboss.messaging.core.plugin.postoffice.Binding;
import org.jboss.messaging.core.tx.Transaction;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.remoting.Client;
import org.jboss.remoting.callback.Callback;
import org.jboss.remoting.callback.HandleCallbackException;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -40,8 +40,12 @@
import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientBrowserDelegate;
import org.jboss.jms.client.delegate.ClientConsumerDelegate;
+import org.jboss.jms.delegate.Ack;
import org.jboss.jms.delegate.BrowserDelegate;
+import org.jboss.jms.delegate.Cancel;
import org.jboss.jms.delegate.ConsumerDelegate;
+import org.jboss.jms.delegate.DeliveryRecovery;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.destination.JBossQueue;
import org.jboss.jms.destination.JBossTopic;
@@ -57,8 +61,6 @@
import org.jboss.jms.server.endpoint.advised.ConsumerAdvised;
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.server.selector.Selector;
-import org.jboss.jms.util.ExceptionUtil;
-import org.jboss.jms.util.MessageQueueNameHelper;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.Channel;
@@ -78,6 +80,8 @@
import org.jboss.messaging.core.tx.TransactionException;
import org.jboss.messaging.core.tx.TransactionRepository;
import org.jboss.messaging.core.tx.TxCallback;
+import org.jboss.messaging.util.ExceptionUtil;
+import org.jboss.messaging.util.MessageQueueNameHelper;
import org.jboss.util.id.GUID;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
Deleted: trunk/src/main/org/jboss/jms/server/endpoint/SessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/SessionEndpoint.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/SessionEndpoint.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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.server.endpoint;
-
-
-import java.util.List;
-
-import javax.jms.JMSException;
-
-import org.jboss.jms.client.Closeable;
-import org.jboss.jms.delegate.BrowserDelegate;
-import org.jboss.jms.delegate.ConsumerDelegate;
-import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.destination.JBossQueue;
-import org.jboss.jms.destination.JBossTopic;
-import org.jboss.jms.message.JBossMessage;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- *
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public interface SessionEndpoint extends Closeable
-{
- /**
- * @param failoverChannelID - the ID of the channel for which there is a failover process in
- * progress. -1 means regular (non-failover) consumer delegate creation.
- */
- ConsumerDelegate createConsumerDelegate(JBossDestination destination, String selector,
- boolean noLocal, String subscriptionName,
- boolean connectionConsumer) throws JMSException;
-
- /**
- * @param failoverChannelID - the ID of the channel for which there is a failover process in
- * progress. -1 means regular (non-failover) browser delegate creation.
- */
- BrowserDelegate createBrowserDelegate(JBossDestination queue, String messageSelector) throws JMSException;
-
- /**
- * Creates a queue identity given a Queue name. Does NOT create the physical queue. The physical
- * creation of queues is an administrative task and is not to be initiated by the JMS API, with
- * the exception of temporary queues.
- */
- JBossQueue createQueue(String queueName) throws JMSException;
-
- /**
- * Creates a topic identity given a Queue name. Does NOT create the physical topic. The physical
- * creation of topics is an administrative task and is not to be initiated by the JMS API, with
- * the exception of temporary topics.
- */
- JBossTopic createTopic(String topicName) throws JMSException;
-
- /**
- * Acknowledge a list of deliveries
- * @throws JMSException
- */
- void acknowledgeDeliveries(List acks) throws JMSException;
-
- /**
- * Acknowledge a delivery
- * @throws JMSException
- */
- void acknowledgeDelivery(Ack ack) throws JMSException;
-
- /**
- * Cancel a list of deliveries.
- */
- void cancelDeliveries(List cancels) throws JMSException;
-
- /**
- * Cancel a delivery
- * @param cancel
- * @throws JMSException
- */
- void cancelDelivery(Cancel cancel) throws JMSException;
-
- /**
- * Add a temporary destination.
- */
- void addTemporaryDestination(JBossDestination destination) throws JMSException;
-
- /**
- * Delete a temporary destination
- */
- void deleteTemporaryDestination(JBossDestination destination) throws JMSException;
-
- /**
- * Unsubscribe the client from the durable subscription
- * specified by subscriptionName
- *
- * @param subscriptionName the Name of the durable subscription to unsubscribe from
- * @throws JMSException if the unsubscribe fails
- */
- void unsubscribe(String subscriptionName) throws JMSException;
-
- /**
- * Send a message
- * @param message The message to send
- * @throws JMSException
- */
- void send(JBossMessage message, boolean checkForDuplicates) throws JMSException;
-
- /**
- * Send delivery info to the server so the delivery lists can be repopulated. Used only in
- * failover.
- */
- void recoverDeliveries(List createInfos) throws JMSException;
-}
-
Modified: trunk/src/main/org/jboss/jms/server/endpoint/advised/BrowserAdvised.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/advised/BrowserAdvised.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/advised/BrowserAdvised.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,8 +23,8 @@
import javax.jms.JMSException;
+import org.jboss.jms.delegate.BrowserEndpoint;
import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
/**
* The server-side advised instance corresponding to a Browser. It is bound to the AOP
Modified: trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionAdvised.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,8 +23,8 @@
import javax.jms.JMSException;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.delegate.SessionDelegate;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
import org.jboss.jms.tx.TransactionRequest;
import org.jboss.messaging.core.plugin.IDBlock;
import org.jboss.messaging.core.tx.MessagingXid;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/advised/ConnectionFactoryAdvised.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,9 +23,9 @@
import javax.jms.JMSException;
-import org.jboss.jms.server.endpoint.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.jms.server.endpoint.ConnectionFactoryInternalEndpoint;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
import org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
Modified: trunk/src/main/org/jboss/jms/server/endpoint/advised/ConsumerAdvised.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/advised/ConsumerAdvised.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/advised/ConsumerAdvised.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,7 +23,7 @@
import javax.jms.JMSException;
-import org.jboss.jms.server.endpoint.ConsumerEndpoint;
+import org.jboss.jms.delegate.ConsumerEndpoint;
/**
* The server-side advised instance corresponding to a Consumer. It is bound to the AOP
Modified: trunk/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/endpoint/advised/SessionAdvised.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,15 +25,15 @@
import javax.jms.JMSException;
+import org.jboss.jms.delegate.Ack;
import org.jboss.jms.delegate.BrowserDelegate;
+import org.jboss.jms.delegate.Cancel;
import org.jboss.jms.delegate.ConsumerDelegate;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
import org.jboss.jms.destination.JBossQueue;
import org.jboss.jms.destination.JBossTopic;
import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
* The server-side advised instance corresponding to a Session. It is bound to the AOP
Modified: trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManagerService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManagerService.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManagerService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,9 +24,9 @@
import javax.transaction.TransactionManager;
import org.jboss.jms.server.plugin.contract.JMSUserManager;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.messaging.core.plugin.JDBCServiceSupport;
import org.jboss.messaging.core.plugin.contract.MessagingComponent;
+import org.jboss.messaging.util.ExceptionUtil;
/**
* A JDBCJMSUserManagerService
Modified: trunk/src/main/org/jboss/jms/tx/ClientTransaction.java
===================================================================
--- trunk/src/main/org/jboss/jms/tx/ClientTransaction.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/tx/ClientTransaction.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -30,10 +30,10 @@
import java.util.List;
import java.util.Map;
+import org.jboss.jms.delegate.Ack;
+import org.jboss.jms.delegate.DefaultAck;
+import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.DefaultAck;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.message.MessageFactory;
Modified: trunk/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/tx/ResourceManager.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/tx/ResourceManager.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -34,10 +34,10 @@
import javax.transaction.xa.Xid;
import org.jboss.jms.delegate.ConnectionDelegate;
+import org.jboss.jms.delegate.DeliveryInfo;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.message.JBossMessage;
import org.jboss.jms.message.MessageProxy;
-import org.jboss.jms.server.endpoint.DeliveryInfo;
import org.jboss.jms.tx.ClientTransaction.SessionTxState;
import org.jboss.jms.util.MessagingTransactionRolledBackException;
import org.jboss.jms.util.MessagingXAException;
Deleted: trunk/src/main/org/jboss/jms/util/ExceptionUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/ExceptionUtil.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/ExceptionUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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/util/JNDIUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/JNDIUtil.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/JNDIUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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/util/MessageQueueNameHelper.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/MessageQueueNameHelper.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/MessageQueueNameHelper.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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;
- }
-}
Deleted: trunk/src/main/org/jboss/jms/util/ToString.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/ToString.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/ToString.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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/util/XMLException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLException.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/XMLException.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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/util/XMLRuntimeException.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLRuntimeException.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/XMLRuntimeException.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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 -------------------------------------------------
-}
Modified: trunk/src/main/org/jboss/jms/util/XMLUtil.java
===================================================================
--- trunk/src/main/org/jboss/jms/util/XMLUtil.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/util/XMLUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -55,7 +55,7 @@
return doc.getDocumentElement();
}
- public static String elementToString(Node n) throws XMLException
+ public static String elementToString(Node n)
{
String name = n.getNodeName();
@@ -139,7 +139,7 @@
*
* TODO implementation of this method is a hack. Implement it properly.
*/
- public static String getTextContent(Node n) throws XMLException
+ public static String getTextContent(Node n)
{
if (n.hasChildNodes())
{
@@ -229,17 +229,17 @@
{
if (node == null)
{
- throw new XMLRuntimeException("the first node to be compared is null");
+ throw new IllegalArgumentException("the first node to be compared is null");
}
if (node2 == null)
{
- throw new XMLRuntimeException("the second node to be compared is null");
+ throw new IllegalArgumentException("the second node to be compared is null");
}
if (!node.getNodeName().equals(node2.getNodeName()))
{
- throw new XMLRuntimeException("nodes have different node names");
+ throw new IllegalArgumentException("nodes have different node names");
}
int attrCount = 0;
@@ -258,7 +258,7 @@
if (attrCount != attrCount2)
{
- throw new XMLRuntimeException("nodes hava a different number of attributes");
+ throw new IllegalArgumentException("nodes hava a different number of attributes");
}
outer: for(int i = 0; i < attrCount; i++)
@@ -278,14 +278,14 @@
continue outer;
}
}
- throw new XMLRuntimeException("attribute " + name + "=" + value + " doesn't match");
+ throw new IllegalArgumentException("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");
+ throw new IllegalArgumentException("one node has children and the other doesn't");
}
if (hasChildren)
@@ -301,7 +301,7 @@
if (length != nodes2.size())
{
- throw new XMLRuntimeException("nodes hava a different number of children");
+ throw new IllegalArgumentException("nodes hava a different number of children");
}
for(int i = 0; i < length; i++)
Modified: trunk/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/BrowserHasNextMessageRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
+import org.jboss.jms.delegate.BrowserEndpoint;
/**
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
Modified: trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageBlockRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
+import org.jboss.jms.delegate.BrowserEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/BrowserNextMessageRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
+import org.jboss.jms.delegate.BrowserEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/BrowserResetRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -6,11 +6,11 @@
*/
package org.jboss.jms.wireformat;
-import org.jboss.jms.server.endpoint.BrowserEndpoint;
-
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.jboss.jms.delegate.BrowserEndpoint;
+
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionCreateSessionDelegateRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataOutputStream;
import org.jboss.jms.client.delegate.ClientSessionDelegate;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
import org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryCreateConnectionDelegateResponse.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
+import org.jboss.jms.delegate.CreateConnectionResult;
/**
* A ConnectionFactoryCreateConnectionDelegateResponse
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionFactoryGetClientAOPStackRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionFactoryEndpoint;
+import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
/**
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionGetClientIDRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionGetIDBlockRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
public class ConnectionGetIDBlockRequest extends RequestSupport
{
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionGetPreparedTransactionsRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionSendTransactionRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.tx.TransactionRequest;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionSetClientIDRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -24,7 +24,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionStartRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConnectionStopRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
+import org.jboss.jms.delegate.ConnectionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.ConsumerEndpoint;
+import org.jboss.jms.delegate.ConsumerEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveriesRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -28,9 +28,9 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.DefaultAck;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.Ack;
+import org.jboss.jms.delegate.DefaultAck;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionAcknowledgeDeliveryRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,9 +25,9 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.DefaultAck;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.Ack;
+import org.jboss.jms.delegate.DefaultAck;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionAddTemporaryDestinationRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,8 +25,8 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveriesRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -28,9 +28,9 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.DefaultCancel;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.Cancel;
+import org.jboss.jms.delegate.DefaultCancel;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCancelDeliveryRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,9 +25,9 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.DefaultCancel;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.Cancel;
+import org.jboss.jms.delegate.DefaultCancel;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCreateBrowserDelegateRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -26,8 +26,8 @@
import java.io.DataOutputStream;
import org.jboss.jms.client.delegate.ClientBrowserDelegate;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCreateConsumerDelegateRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -26,8 +26,8 @@
import java.io.DataOutputStream;
import org.jboss.jms.client.delegate.ClientConsumerDelegate;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCreateQueueRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionCreateTopicRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionDeleteTemporaryDestinationRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,8 +25,8 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.destination.JBossDestination;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionRecoverDeliveriesRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -28,8 +28,8 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.jms.server.endpoint.DeliveryRecovery;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.DeliveryRecovery;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionSendRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionSendRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionSendRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,8 +25,8 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.jboss.jms.delegate.SessionEndpoint;
import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
import org.jboss.messaging.core.message.MessageFactory;
/**
Modified: trunk/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/jms/wireformat/SessionUnsubscribeRequest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -25,7 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
-import org.jboss.jms.server.endpoint.SessionEndpoint;
+import org.jboss.jms.delegate.SessionEndpoint;
/**
*
Modified: trunk/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -34,7 +34,6 @@
import org.jboss.jms.server.JMSConditionFactory;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.selector.SelectorFactory;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.messaging.core.FilterFactory;
import org.jboss.messaging.core.plugin.contract.ConditionFactory;
import org.jboss.messaging.core.plugin.contract.FailoverMapper;
@@ -50,6 +49,7 @@
import org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.MultiplexerJChannelFactory;
import org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.XMLJChannelFactory;
import org.jboss.messaging.core.tx.TransactionRepository;
+import org.jboss.messaging.util.ExceptionUtil;
import org.w3c.dom.Element;
/**
Modified: trunk/src/main/org/jboss/messaging/core/plugin/DefaultPostOfficeService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/DefaultPostOfficeService.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/core/plugin/DefaultPostOfficeService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -27,7 +27,6 @@
import org.jboss.jms.server.JMSConditionFactory;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.selector.SelectorFactory;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.messaging.core.FilterFactory;
import org.jboss.messaging.core.plugin.contract.ConditionFactory;
import org.jboss.messaging.core.plugin.contract.MessageStore;
@@ -35,6 +34,7 @@
import org.jboss.messaging.core.plugin.contract.PersistenceManager;
import org.jboss.messaging.core.plugin.postoffice.DefaultPostOffice;
import org.jboss.messaging.core.tx.TransactionRepository;
+import org.jboss.messaging.util.ExceptionUtil;
/**
* A DefaultPostOfficeService
Modified: trunk/src/main/org/jboss/messaging/core/plugin/JDBCMBeanSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/JDBCMBeanSupport.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/core/plugin/JDBCMBeanSupport.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -32,7 +32,7 @@
import javax.sql.DataSource;
import javax.transaction.TransactionManager;
-import org.jboss.jms.util.ExceptionUtil;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.tm.TransactionManagerServiceMBean;
Modified: trunk/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManagerService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManagerService.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManagerService.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,9 +23,9 @@
import javax.transaction.TransactionManager;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.messaging.core.plugin.contract.MessagingComponent;
import org.jboss.messaging.core.plugin.contract.PersistenceManager;
+import org.jboss.messaging.util.ExceptionUtil;
/**
* A JDBCPersistenceManagerService
Modified: trunk/src/main/org/jboss/messaging/core/plugin/JDBCServiceSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/JDBCServiceSupport.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/core/plugin/JDBCServiceSupport.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -32,8 +32,8 @@
import javax.sql.DataSource;
import javax.transaction.TransactionManager;
-import org.jboss.jms.util.ExceptionUtil;
import org.jboss.messaging.core.plugin.contract.ServerPlugin;
+import org.jboss.messaging.util.ExceptionUtil;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.tm.TransactionManagerServiceMBean;
Deleted: trunk/src/main/org/jboss/messaging/util/ConcurrentHashSet.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/ConcurrentHashSet.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/util/ConcurrentHashSet.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,87 +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.messaging.util;
-
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.Map;
-
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
-
-/**
- *
- * A ConcurrentHashSet.
- *
- * Offers same concurrency as ConcurrentHashMap but for a Set
- *
- * @author <a href="tim.fox at jboss.com">Tim Fox</a>
- * @version $Revision$
- *
- * $Id$
- */
-public class ConcurrentHashSet extends AbstractSet
-{
- private Map theMap;
-
- private static Object dummy = new Object();
-
- public ConcurrentHashSet()
- {
- theMap = new ConcurrentHashMap();
- }
-
- public int size()
- {
- return theMap.size();
- }
-
- public Iterator iterator()
- {
- return theMap.keySet().iterator();
- }
-
- public boolean isEmpty()
- {
- return theMap.isEmpty();
- }
-
- public boolean add(Object o)
- {
- return theMap.put(o, dummy) == dummy;
- }
-
- public boolean contains(Object o)
- {
- return theMap.containsKey(o);
- }
-
- public void clear()
- {
- theMap.clear();
- }
-
- public boolean remove(Object o)
- {
- return theMap.remove(o) == dummy;
- }
-
-}
Copied: trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java (from rev 2680, trunk/src/main/org/jboss/jms/util/ExceptionUtil.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java (rev 0)
+++ trunk/src/main/org/jboss/messaging/util/ExceptionUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,107 @@
+/*
+ * 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.messaging.util;
+
+import javax.jms.JMSException;
+
+import org.jboss.jms.util.MessagingJMSException;
+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);
+ }
+ }
+}
Copied: trunk/src/main/org/jboss/messaging/util/JNDIUtil.java (from rev 2680, trunk/src/main/org/jboss/jms/util/JNDIUtil.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/util/JNDIUtil.java (rev 0)
+++ trunk/src/main/org/jboss/messaging/util/JNDIUtil.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,133 @@
+/*
+ * 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.messaging.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/messaging/util/Lockable.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/Lockable.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/util/Lockable.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,109 +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.messaging.util;
-
-import EDU.oswego.cs.dl.util.concurrent.ReentrantLock;
-import org.jboss.logging.Logger;
-
-/**
- * A simple wrapper around a ReentrantLock that provides a locking mechanism to subclasses.
- *
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class Lockable
-{
- // Constants -----------------------------------------------------
-
- private static final Logger log = Logger.getLogger(Lockable.class);
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private ReentrantLock lock = new ReentrantLock();
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- /**
- * The thread calling this method acquires a reentrant lock on the current instance. The method
- * can wait forever if the lock is being hold by another thread and not released.
- */
- public final void lock()
- {
- while(true)
- {
- try
- {
- lock.acquire();
- if (log.isTraceEnabled()) { log.trace("locked " + this); }
- return;
- }
- catch(InterruptedException e)
- {
- log.warn("failed to acquire " + this + "'s lock", e);
- }
- }
- }
-
- /**
- * The thread calling attempts to acquire the reentrant lock for the specified time.
- * @return true if succesful.
- */
- public final boolean lock(long millisecs)
- {
- long t1 = System.currentTimeMillis();
- while(true)
- {
- try
- {
- boolean locked = lock.attempt(millisecs - System.currentTimeMillis() + t1);
- if (log.isTraceEnabled()) { log.trace((locked ? "locked " : "could not acquire lock on ") + this); }
- return locked;
- }
- catch(InterruptedException e)
- {
- log.warn(e);
- }
- }
- }
-
-
- /**
- * The thread calling it gives up the lock on the current instance, if any.
- */
- public final void unlock()
- {
- lock.release();
- if (log.isTraceEnabled()) { log.trace("unlocked " + this); }
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Copied: trunk/src/main/org/jboss/messaging/util/MessageQueueNameHelper.java (from rev 2680, trunk/src/main/org/jboss/jms/util/MessageQueueNameHelper.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/util/MessageQueueNameHelper.java (rev 0)
+++ trunk/src/main/org/jboss/messaging/util/MessageQueueNameHelper.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -0,0 +1,110 @@
+/*
+ * 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.messaging.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;
+ }
+}
Deleted: trunk/src/main/org/jboss/messaging/util/RotatingPool.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/RotatingPool.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/util/RotatingPool.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,76 +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.messaging.util;
-
-
-/**
- * A RotatingPool
- *
- * This class makes sure requests on the same key always get the same value, and
- * values for a specific key are obtained from a fixed size array of instances in
- * a rotating fashion
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public abstract class RotatingPool
-{
- protected int maxSize;
-
- protected int pos;
-
- protected Object[] entries;
-
- public RotatingPool(int maxSize)
- {
- this.maxSize = maxSize;
-
- this.entries = new Object[maxSize];
- }
-
- public synchronized Object get()
- {
- Object entry = entries[pos];
-
- if (entry == null)
- {
- entry = createEntry();
-
- entries[pos] = entry;
- }
-
- pos++;
-
- if (pos == maxSize)
- {
- pos = 0;
- }
-
- return entry;
- }
-
-
- protected abstract Object createEntry();
-}
Deleted: trunk/src/main/org/jboss/messaging/util/SelectiveIterator.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/SelectiveIterator.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/util/SelectiveIterator.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -1,98 +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.messaging.util;
-
-import java.util.Iterator;
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- */
-public class SelectiveIterator implements Iterator
- {
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- protected Iterator delegate;
- protected Object next;
- protected Class excluded;
-
- // Constructors --------------------------------------------------
-
- public SelectiveIterator(Iterator delegate, Class excluded)
- {
- this.delegate = delegate;
- this.excluded = excluded;
- }
-
- // Iterator implementation ---------------------------------------
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext()
- {
- if (!delegate.hasNext())
- {
- return false;
- }
-
- Object o = delegate.next();
- if (excluded.isInstance(o))
- {
- return hasNext();
- }
- else
- {
- next = o;
- return true;
- }
- }
-
- public Object next()
- {
- if (next != null)
- {
- Object o = next;
- next = null;
- return o;
- }
- return delegate.next();
- }
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Modified: trunk/src/main/org/jboss/messaging/util/Util.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/Util.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/src/main/org/jboss/messaging/util/Util.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,17 +21,19 @@
*/
package org.jboss.messaging.util;
+import java.io.StringReader;
+import java.sql.Connection;
+
+import javax.jms.DeliveryMode;
+import javax.jms.Session;
+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.xml.sax.InputSource;
-import org.jboss.logging.Logger;
-import javax.jms.Session;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import java.io.StringReader;
-import java.sql.Connection;
-
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
@@ -65,28 +67,8 @@
return "...-" + s.substring(idx + 1);
}
- public static 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";
- }
- else if (ackMode == Session.SESSION_TRANSACTED)
- {
- return "SESSION_TRANSACTED";
- }
- return "UNKNOWN: " + ackMode;
- }
-
public static String transactionIsolationToString(int level)
{
return
@@ -109,7 +91,41 @@
Document doc = parser.parse(new InputSource(new StringReader(s)));
return doc.getDocumentElement();
}
+
+ 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 --------------------------------------------------
Modified: trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -33,16 +33,16 @@
import org.jboss.jms.client.delegate.ClientBrowserDelegate;
import org.jboss.jms.client.delegate.ClientConsumerDelegate;
import org.jboss.jms.client.delegate.ClientSessionDelegate;
+import org.jboss.jms.delegate.Ack;
+import org.jboss.jms.delegate.Cancel;
+import org.jboss.jms.delegate.CreateConnectionResult;
+import org.jboss.jms.delegate.DefaultAck;
+import org.jboss.jms.delegate.DefaultCancel;
+import org.jboss.jms.delegate.DeliveryRecovery;
import org.jboss.jms.destination.JBossQueue;
import org.jboss.jms.destination.JBossTemporaryQueue;
import org.jboss.jms.destination.JBossTopic;
import org.jboss.jms.message.JBossMessage;
-import org.jboss.jms.server.endpoint.Ack;
-import org.jboss.jms.server.endpoint.Cancel;
-import org.jboss.jms.server.endpoint.CreateConnectionResult;
-import org.jboss.jms.server.endpoint.DefaultAck;
-import org.jboss.jms.server.endpoint.DefaultCancel;
-import org.jboss.jms.server.endpoint.DeliveryRecovery;
import org.jboss.jms.server.remoting.JMSWireFormat;
import org.jboss.jms.tx.ClientTransaction;
import org.jboss.jms.tx.TransactionRequest;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/connectionmanager/SimpleConnectionManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/connectionmanager/SimpleConnectionManagerTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/connectionmanager/SimpleConnectionManagerTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -31,11 +31,11 @@
import org.jboss.jms.client.JBossConnection;
import org.jboss.jms.client.JBossConnectionFactory;
+import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.delegate.SessionDelegate;
import org.jboss.jms.server.ConnectionManager;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.connectionmanager.SimpleConnectionManager;
-import org.jboss.jms.server.endpoint.ConnectionEndpoint;
import org.jboss.jms.tx.TransactionRequest;
import org.jboss.messaging.core.plugin.IDBlock;
import org.jboss.messaging.core.tx.MessagingXid;
Modified: trunk/tests/src/org/jboss/test/messaging/jms/util/MessageQueueNameHelperTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/util/MessageQueueNameHelperTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/jms/util/MessageQueueNameHelperTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
-import org.jboss.jms.util.MessageQueueNameHelper;
+import org.jboss.messaging.util.MessageQueueNameHelper;
public class MessageQueueNameHelperTest extends TestCase
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 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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.JNDIUtil;
import org.jboss.jms.util.XMLUtil;
import org.jboss.logging.Logger;
+import org.jboss.messaging.util.JNDIUtil;
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 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -12,7 +12,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
-import org.jboss.jms.util.XMLException;
+
import org.jboss.jms.util.XMLUtil;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -378,7 +378,7 @@
}
else
{
- throw new XMLException("Unknown element: " + name);
+ throw new IllegalArgumentException("Unknown element: " + name);
}
}
}
Modified: trunk/tests/src/org/jboss/test/messaging/util/JNDIUtilTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/JNDIUtilTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/util/JNDIUtilTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,14 +21,14 @@
*/
package org.jboss.test.messaging.util;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+
+import org.jboss.messaging.util.JNDIUtil;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.jms.util.JNDIUtil;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Deleted: trunk/tests/src/org/jboss/test/messaging/util/SelectiveIteratorTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/SelectiveIteratorTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/util/SelectiveIteratorTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -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.util;
-
-import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.messaging.util.SelectiveIterator;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collections;
-
-
-/**
- * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
- * @version <tt>$Revision$</tt>
- */
-public class SelectiveIteratorTest extends MessagingTestCase
-{
- // Constructors --------------------------------------------------
-
- public SelectiveIteratorTest(String name)
- {
- super(name);
- }
-
- // Public --------------------------------------------------------
-
- public void setUp() throws Exception
- {
- super.setUp();
- }
-
- public void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- public void testHasNext1()
- {
- List l = new ArrayList();
- l.add("a");
- l.add(new Integer(1));
- l.add("b");
-
- SelectiveIterator si = new SelectiveIterator(l.iterator(), Integer.class);
-
- assertTrue(si.hasNext());
- assertEquals("a", si.next());
- assertTrue(si.hasNext());
- assertEquals("b", si.next());
- assertFalse(si.hasNext());
- }
-
- public void testHasNext2()
- {
- List l = new ArrayList();
- l.add("a");
- l.add("b");
- l.add("c");
-
- SelectiveIterator si = new SelectiveIterator(l.iterator(), String.class);
-
- assertFalse(si.hasNext());
- }
-
- public void testRemove()
- {
- SelectiveIterator si =
- new SelectiveIterator(Collections.EMPTY_LIST.iterator(), String.class);
-
- try
- {
- si.remove();
- fail("If you implement remove(), provide tests");
- }
- catch(UnsupportedOperationException e)
- {
-
- }
- }
-
-}
Modified: trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java 2007-05-15 00:11:58 UTC (rev 2683)
+++ trunk/tests/src/org/jboss/test/messaging/util/XMLUtilTest.java 2007-05-15 07:31:30 UTC (rev 2684)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.messaging.util;
-import org.jboss.jms.util.XMLRuntimeException;
import org.jboss.jms.util.XMLUtil;
import org.jboss.test.messaging.MessagingTestCase;
import org.w3c.dom.Element;
@@ -152,7 +151,7 @@
XMLUtil.assertEquivalent(XMLUtil.stringToElement(s), XMLUtil.stringToElement(s2));
fail("this should throw exception");
}
- catch(XMLRuntimeException e)
+ catch(IllegalArgumentException e)
{
// OK
log.debug("STACK TRACE", e);
@@ -193,7 +192,7 @@
XMLUtil.assertEquivalent(XMLUtil.stringToElement(s), XMLUtil.stringToElement(s2));
fail("this should throw exception");
}
- catch(XMLRuntimeException e)
+ catch(IllegalArgumentException e)
{
// OK
log.debug("STACK TRACE", e);
More information about the jboss-cvs-commits
mailing list