[jboss-cvs] JBoss Messaging SVN: r5330 - in trunk: src/main/org/jboss/messaging/core/client and 14 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 10 14:17:57 EST 2008
Author: timfox
Date: 2008-11-10 14:17:56 -0500 (Mon, 10 Nov 2008)
New Revision: 5330
Removed:
trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionProducerCloseMessage.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
Modified:
trunk/examples/messaging/src/org/jboss/messaging/example/ManagementClient.java
trunk/examples/messaging/src/org/jboss/messaging/example/SSLClient.java
trunk/examples/messaging/src/org/jboss/messaging/example/ScheduledMessageExample.java
trunk/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java
trunk/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java
trunk/examples/messaging/src/org/jboss/messaging/example/WildCardClient.java
trunk/src/main/org/jboss/messaging/core/client/ClientSession.java
trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerInternal.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionInternal.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionSendMessage.java
trunk/src/main/org/jboss/messaging/core/server/ServerSession.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionPacketHandler.java
trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/basic/CoreClientTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientExitTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/CrashClient.java
trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/GracefulClient.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ActivationTimeoutTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailBackupServerTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverExpiredMessageTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverManagementTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverNoSessionsFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverScheduledMessageTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/MultiThreadRandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/RandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleAutomaticFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleManualFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/consumer/ConsumerTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/scheduling/ScheduledMessageTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/ssl/CoreClientOverSSL.java
trunk/tests/src/org/jboss/messaging/tests/integration/xa/BasicXaRecoveryTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java
trunk/tests/src/org/jboss/messaging/tests/stress/paging/MultipleDestinationPagingTest.java
Log:
Simplified producers
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/ManagementClient.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/ManagementClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/ManagementClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -48,7 +48,7 @@
{
SimpleString replytoQueue = new SimpleString("replyto.adminQueue");
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- final ClientSession clientSession = sessionFactory.createSession(false, true, true, false);
+ final ClientSession clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
sendMessages(clientSession, queue);
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/SSLClient.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/SSLClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/SSLClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -48,7 +48,7 @@
ClientSessionFactory sessionFactory =
new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
sessionFactory.getTransportParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
- clientSession = sessionFactory.createSession(false, true, true, false);
+ clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
ClientProducer clientProducer = clientSession.createProducer(queue);
ClientMessage message = clientSession.createClientMessage(JBossTextMessage.TYPE, false, 0,
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/ScheduledMessageExample.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/ScheduledMessageExample.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/ScheduledMessageExample.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -52,7 +52,7 @@
{
ClientSessionFactory sessionFactory =
new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- clientSession = sessionFactory.createSession(false, true, true, false);
+ clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
ClientProducer clientProducer = clientSession.createProducer(queue);
ClientMessage message = clientSession.createClientMessage(JBossTextMessage.TYPE, false, 0,
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -46,7 +46,7 @@
{
ClientSessionFactory sessionFactory =
new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- clientSession = sessionFactory.createSession(false, true, true, false);
+ clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
ClientProducer clientProducer = clientSession.createProducer(queue);
ClientMessage message = clientSession.createClientMessage(JBossTextMessage.TYPE, false, 0,
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -59,7 +59,7 @@
//then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- clientSession = sessionFactory.createSession(false, true, true, false);
+ clientSession = sessionFactory.createSession(false, true, true);
SimpleString atestq = new SimpleString("atestq");
clientSession.createQueue(atestq, atestq, null, false, true);
ClientProducer clientProducer = clientSession.createProducer(atestq);
Modified: trunk/examples/messaging/src/org/jboss/messaging/example/WildCardClient.java
===================================================================
--- trunk/examples/messaging/src/org/jboss/messaging/example/WildCardClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/examples/messaging/src/org/jboss/messaging/example/WildCardClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -48,7 +48,7 @@
{
ClientSessionFactory sessionFactory =
new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- clientSession = sessionFactory.createSession(false, true, true, false);
+ clientSession = sessionFactory.createSession(false, true, true);
SimpleString queue = new SimpleString("queuejms.testQueue");
SimpleString queue2 = new SimpleString("queuejms.MyQueue");
Modified: trunk/src/main/org/jboss/messaging/core/client/ClientSession.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientSession.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientSession.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -93,8 +93,6 @@
boolean isBlockOnAcknowledge();
- boolean isCacheProducers();
-
boolean isXA();
ClientMessage createClientMessage(final byte type,
Modified: trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -36,14 +36,13 @@
*/
public interface ClientSessionFactory
{
- ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean cacheProducers) throws MessagingException;
+ ClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks) throws MessagingException;
ClientSession createSession(String username,
String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
- boolean cacheProducers,
int ackBatchSize) throws MessagingException;
void setConsumerWindowSize(int size);
@@ -77,9 +76,9 @@
boolean isAutoGroup();
void setAutoGroup(boolean autoGroup);
-
+
int getAckBatchSize();
-
+
void setAckBatchSize(int ackBatchSize);
ConnectorFactory getConnectorFactory();
@@ -91,8 +90,8 @@
Map<String, Object> getBackupTransportParams();
long getPingPeriod();
-
- long getCallTimeout();
-
+
+ long getCallTimeout();
+
int getMaxConnections();
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -18,7 +18,6 @@
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.message.impl.MessageImpl;
import org.jboss.messaging.core.remoting.Channel;
-import org.jboss.messaging.core.remoting.impl.wireformat.SessionProducerCloseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionSendMessage;
import org.jboss.messaging.util.SimpleString;
import org.jboss.messaging.util.TokenBucketLimiter;
@@ -44,8 +43,6 @@
private final SimpleString address;
- private final long id;
-
private final ClientSessionInternal session;
private final Channel channel;
@@ -66,8 +63,7 @@
// Constructors ---------------------------------------------------------------------------------
- public ClientProducerImpl(final ClientSessionInternal session,
- final long id,
+ public ClientProducerImpl(final ClientSessionInternal session,
final SimpleString address,
final TokenBucketLimiter rateLimiter,
final boolean blockOnNonPersistentSend,
@@ -78,9 +74,7 @@
this.channel = channel;
this.session = session;
-
- this.id = id;
-
+
this.address = address;
this.rateLimiter = rateLimiter;
@@ -137,14 +131,7 @@
return;
}
- try
- {
- channel.sendBlocking(new SessionProducerCloseMessage(id));
- }
- finally
- {
- doCleanup();
- }
+ doCleanup();
}
public void cleanUp()
@@ -177,13 +164,6 @@
return rateLimiter == null ? -1 : rateLimiter.getRate();
}
- // ClientProducerInternal implementation --------------------------------------------------------
-
- public long getID()
- {
- return id;
- }
-
// Public ---------------------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
@@ -224,7 +204,7 @@
boolean sendBlocking = msg.isDurable() ? blockOnPersistentSend : blockOnNonPersistentSend;
- SessionSendMessage message = new SessionSendMessage(id, msg, sendBlocking);
+ SessionSendMessage message = new SessionSendMessage(msg, sendBlocking);
if (sendBlocking)
{
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerInternal.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerInternal.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerInternal.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -33,7 +33,5 @@
*/
public interface ClientProducerInternal extends ClientProducer
{
- long getID();
-
void cleanUp();
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -234,19 +234,17 @@
final String password,
final boolean xa,
final boolean autoCommitSends,
- final boolean autoCommitAcks,
- final boolean cacheProducers,
+ final boolean autoCommitAcks,
final int ackBatchSize) throws MessagingException
{
- return createSessionInternal(username, password, xa, autoCommitSends, autoCommitAcks, cacheProducers, ackBatchSize);
+ return createSessionInternal(username, password, xa, autoCommitSends, autoCommitAcks, ackBatchSize);
}
public ClientSession createSession(final boolean xa,
final boolean autoCommitSends,
- final boolean autoCommitAcks,
- final boolean cacheProducers) throws MessagingException
+ final boolean autoCommitAcks) throws MessagingException
{
- return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, cacheProducers, ackBatchSize);
+ return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, ackBatchSize);
}
public int getConsumerWindowSize()
@@ -531,8 +529,7 @@
final String password,
final boolean xa,
final boolean autoCommitSends,
- final boolean autoCommitAcks,
- final boolean cacheProducers,
+ final boolean autoCommitAcks,
final int ackBatchSize) throws MessagingException
{
synchronized (createSessionLock)
@@ -613,8 +610,7 @@
ClientSessionInternal session = new ClientSessionImpl(this,
name,
- xa,
- cacheProducers,
+ xa,
autoCommitSends,
autoCommitAcks,
blockOnAcknowledge,
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -21,9 +21,6 @@
*/
package org.jboss.messaging.core.client.impl;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATEPRODUCER;
-
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -76,6 +73,7 @@
import org.jboss.messaging.core.remoting.impl.wireformat.SessionXASetTimeoutResponseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionXAStartMessage;
import org.jboss.messaging.core.remoting.spi.MessagingBuffer;
+import org.jboss.messaging.util.ConcurrentHashSet;
import org.jboss.messaging.util.ExecutorFactory;
import org.jboss.messaging.util.IDGenerator;
import org.jboss.messaging.util.JBMThreadFactory;
@@ -120,20 +118,16 @@
private final boolean xa;
- private final boolean cacheProducers;
-
private final Executor executor;
private volatile RemotingConnection remotingConnection;
private volatile RemotingConnection backupConnection;
- private final Map<Long, ClientProducerInternal> producers = new ConcurrentHashMap<Long, ClientProducerInternal>();
+ private final Set<ClientProducerInternal> producers = new ConcurrentHashSet<ClientProducerInternal>();
private final Map<Long, ClientConsumerInternal> consumers = new ConcurrentHashMap<Long, ClientConsumerInternal>();
- private final Map<SimpleString, ClientProducerInternal> producerCache;
-
private volatile boolean closed;
private final boolean autoCommitAcks;
@@ -162,7 +156,6 @@
public ClientSessionImpl(final ClientSessionFactoryInternal sessionFactory,
final String name,
final boolean xa,
- final boolean cacheProducers,
final boolean autoCommitSends,
final boolean autoCommitAcks,
final boolean blockOnAcknowledge,
@@ -181,21 +174,10 @@
this.backupConnection = backupConnection;
- this.cacheProducers = cacheProducers;
-
executor = executorFactory.getExecutor();
this.xa = xa;
- if (cacheProducers)
- {
- producerCache = new HashMap<SimpleString, ClientProducerInternal>();
- }
- else
- {
- producerCache = null;
- }
-
this.autoCommitAcks = autoCommitAcks;
this.autoCommitSends = autoCommitSends;
@@ -319,16 +301,14 @@
{
checkClosed();
- SessionCreateConsumerMessage request = new SessionCreateConsumerMessage(queueName,
- filterString,
- browseOnly);
+ SessionCreateConsumerMessage request = new SessionCreateConsumerMessage(queueName, filterString, browseOnly);
channel.sendBlocking(request);
// The actual windows size that gets used is determined by the user since
// could be overridden on the queue settings
// The value we send is just a hint
-
+
int clientWindowSize;
if (windowSize == -1)
{
@@ -393,35 +373,15 @@
{
checkClosed();
- ClientProducerInternal producer = null;
+ ClientProducerInternal producer = new ClientProducerImpl(this,
+ address,
+ maxRate == -1 ? null
+ : new TokenBucketLimiterImpl(maxRate, false),
+ autoCommitSends && blockOnNonPersistentSend,
+ autoCommitSends && blockOnPersistentSend,
+ autoGroup,
+ channel);
- if (cacheProducers)
- {
- producer = producerCache.remove(address);
- }
-
- if (producer == null)
- {
- Packet request = new PacketImpl(SESS_CREATEPRODUCER);
-
- channel.sendBlocking(request);
-
- // maxRate and windowSize can be overridden by the server
-
- // If the producer is not auto-commit sends then messages are never
- // sent blocking - there is no point
- // since commit, prepare or rollback will flush any messages sent.
-
- producer = new ClientProducerImpl(this,
- idGenerator.generateID(),
- address,
- maxRate == -1 ? null : new TokenBucketLimiterImpl(maxRate, false),
- autoCommitSends && blockOnNonPersistentSend,
- autoCommitSends && blockOnPersistentSend,
- autoGroup,
- channel);
- }
-
addProducer(producer);
return producer;
@@ -518,11 +478,6 @@
return blockOnAcknowledge;
}
- public boolean isCacheProducers()
- {
- return cacheProducers;
- }
-
public boolean isXA()
{
return xa;
@@ -608,7 +563,7 @@
public void addProducer(final ClientProducerInternal producer)
{
- producers.put(producer.getID(), producer);
+ producers.add(producer);
}
public void removeConsumer(final ClientConsumerInternal consumer) throws MessagingException
@@ -618,29 +573,9 @@
public void removeProducer(final ClientProducerInternal producer)
{
- producers.remove(producer.getID());
-
- if (cacheProducers && !producerCache.containsKey(producer.getAddress()))
- {
- producerCache.put(producer.getAddress(), producer);
- }
+ producers.remove(producer);
}
- public Set<ClientProducerInternal> getProducers()
- {
- return new HashSet<ClientProducerInternal>(producers.values());
- }
-
- public Set<ClientConsumerInternal> getConsumers()
- {
- return new HashSet<ClientConsumerInternal>(consumers.values());
- }
-
- public Map<SimpleString, ClientProducerInternal> getProducerCache()
- {
- return new HashMap<SimpleString, ClientProducerInternal>(producerCache);
- }
-
public void handleReceiveMessage(final long consumerID, final ClientMessage message) throws Exception
{
ClientConsumerInternal consumer = consumers.get(consumerID);
@@ -1071,11 +1006,6 @@
private void doCleanup()
{
- if (cacheProducers)
- {
- producerCache.clear();
- }
-
remotingConnection.removeFailureListener(this);
synchronized (this)
@@ -1097,7 +1027,7 @@
consumer.cleanUp();
}
- Set<ClientProducerInternal> producersClone = new HashSet<ClientProducerInternal>(producers.values());
+ Set<ClientProducerInternal> producersClone = new HashSet<ClientProducerInternal>(producers);
for (ClientProducerInternal producer : producersClone)
{
@@ -1114,7 +1044,7 @@
consumer.close();
}
- Set<ClientProducer> producersClone = new HashSet<ClientProducer>(producers.values());
+ Set<ClientProducer> producersClone = new HashSet<ClientProducer>(producers);
for (ClientProducer producer : producersClone)
{
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionInternal.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionInternal.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionInternal.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -12,14 +12,10 @@
package org.jboss.messaging.core.client.impl;
-import java.util.Map;
-import java.util.Set;
-
import org.jboss.messaging.core.client.ClientMessage;
import org.jboss.messaging.core.client.ClientSession;
import org.jboss.messaging.core.exception.MessagingException;
import org.jboss.messaging.core.remoting.RemotingConnection;
-import org.jboss.messaging.util.SimpleString;
/**
* A ClientSessionInternal
@@ -42,12 +38,6 @@
void removeProducer(ClientProducerInternal producer);
- Set<ClientProducerInternal> getProducers();
-
- Set<ClientConsumerInternal> getConsumers();
-
- Map<SimpleString, ClientProducerInternal> getProducerCache();
-
void handleReceiveMessage(long consumerID, ClientMessage message) throws Exception;
void handleFailover();
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -32,13 +32,11 @@
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_COMMIT;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CONSUMER_CLOSE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATECONSUMER;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATEPRODUCER;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATEQUEUE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_DELETE_QUEUE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_EXPIRED;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_FAILOVER_COMPLETE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_FLOWTOKEN;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_PRODUCER_CLOSE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_QUEUEQUERY;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_QUEUEQUERY_RESP;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_RECEIVE_MSG;
@@ -113,7 +111,6 @@
import org.jboss.messaging.core.remoting.impl.wireformat.SessionDeleteQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionExpiredMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionFailoverCompleteMessage;
-import org.jboss.messaging.core.remoting.impl.wireformat.SessionProducerCloseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryResponseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionReceiveMessage;
@@ -586,11 +583,6 @@
packet = new SessionCreateConsumerMessage();
break;
}
- case SESS_CREATEPRODUCER:
- {
- packet = new PacketImpl(SESS_CREATEPRODUCER);
- break;
- }
case SESS_ACKNOWLEDGE:
{
packet = new SessionAcknowledgeMessage();
@@ -761,11 +753,6 @@
packet = new SessionConsumerCloseMessage();
break;
}
- case SESS_PRODUCER_CLOSE:
- {
- packet = new SessionProducerCloseMessage();
- break;
- }
case NULL_RESPONSE:
{
packet = new NullResponseMessage();
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -68,8 +68,6 @@
// Session
public static final byte SESS_CREATECONSUMER = 40;
- public static final byte SESS_CREATEPRODUCER = 42;
-
public static final byte SESS_ACKNOWLEDGE = 44;
public static final byte SESS_EXPIRED = 45;
@@ -138,8 +136,6 @@
public static final byte SESS_CONSUMER_CLOSE = 77;
- public static final byte SESS_PRODUCER_CLOSE = 78;
-
public static final byte SESS_RECEIVE_MSG = 79;
public static final byte SESS_FAILOVER_COMPLETE = 80;
Deleted: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionProducerCloseMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionProducerCloseMessage.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionProducerCloseMessage.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * 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.core.remoting.impl.wireformat;
-
-import org.jboss.messaging.core.remoting.spi.MessagingBuffer;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- * @version <tt>$Revision$</tt>
- */
-public class SessionProducerCloseMessage extends PacketImpl
-{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private long producerID;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public SessionProducerCloseMessage(final long producerID)
- {
- super(SESS_PRODUCER_CLOSE);
-
- this.producerID = producerID;
- }
-
- public SessionProducerCloseMessage()
- {
- super(SESS_PRODUCER_CLOSE);
- }
-
- // Public --------------------------------------------------------
-
- public long getProducerID()
- {
- return producerID;
- }
-
- public void encodeBody(final MessagingBuffer buffer)
- {
- buffer.putLong(producerID);
- }
-
- public void decodeBody(final MessagingBuffer buffer)
- {
- producerID = buffer.getLong();
- }
-
- @Override
- public String toString()
- {
- return getParentString() + ", producerID=" + producerID + "]";
- }
-
- public boolean equals(Object other)
- {
- if (other instanceof SessionProducerCloseMessage == false)
- {
- return false;
- }
-
- SessionProducerCloseMessage r = (SessionProducerCloseMessage)other;
-
- return super.equals(other) && this.producerID == r.producerID;
- }
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
-
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionSendMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionSendMessage.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionSendMessage.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -42,8 +42,6 @@
// Attributes ----------------------------------------------------
- private long producerID;
-
private ClientMessage clientMessage;
private ServerMessage serverMessage;
@@ -54,12 +52,10 @@
// Constructors --------------------------------------------------
- public SessionSendMessage(final long producerID, final ClientMessage message, final boolean requiresResponse)
+ public SessionSendMessage(final ClientMessage message, final boolean requiresResponse)
{
super(SESS_SEND);
- this.producerID = producerID;
-
this.clientMessage = message;
this.requiresResponse = requiresResponse;
@@ -70,12 +66,10 @@
super(SESS_SEND);
}
- protected SessionSendMessage(final byte type, final long producerID, final ClientMessage message, final boolean requiresResponse)
+ protected SessionSendMessage(final byte type, final ClientMessage message, final boolean requiresResponse)
{
super(type);
- this.producerID = producerID;
-
this.clientMessage = message;
this.requiresResponse = requiresResponse;
@@ -88,11 +82,6 @@
// Public --------------------------------------------------------
- public long getProducerID()
- {
- return producerID;
- }
-
public ClientMessage getClientMessage()
{
return clientMessage;
@@ -110,8 +99,7 @@
public void encodeBody(final MessagingBuffer buffer)
{
- buffer.putLong(producerID);
-
+
if (clientMessage != null)
{
clientMessage.encode(buffer);
@@ -129,8 +117,6 @@
{
//TODO can be optimised
- producerID = buffer.getLong();
-
serverMessage = new ServerMessageImpl();
serverMessage.decode(buffer);
Modified: trunk/src/main/org/jboss/messaging/core/server/ServerSession.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/ServerSession.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/server/ServerSession.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -34,7 +34,6 @@
import org.jboss.messaging.core.remoting.impl.wireformat.SessionCreateQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionDeleteQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionExpiredMessage;
-import org.jboss.messaging.core.remoting.impl.wireformat.SessionProducerCloseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionRemoveDestinationMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionReplicateDeliveryMessage;
@@ -67,14 +66,10 @@
void removeConsumer(ServerConsumer consumer) throws Exception;
- void removeProducer(ServerProducer producer) throws Exception;
-
void close() throws Exception;
void promptDelivery(Queue queue);
- void send(ServerMessage msg) throws Exception;
-
void handleAcknowledge(final SessionAcknowledgeMessage packet);
void handleExpired(final SessionExpiredMessage packet);
@@ -121,19 +116,15 @@
void handleCreateConsumer(SessionCreateConsumerMessage packet);
- void handleCreateProducer(Packet packet);
-
void handleExecuteQueueQuery(SessionQueueQueryMessage packet);
void handleExecuteBindingQuery(SessionBindingQueryMessage packet);
void handleCloseConsumer(SessionConsumerCloseMessage packet);
- void handleCloseProducer(SessionProducerCloseMessage packet);
-
void handleReceiveConsumerCredits(SessionConsumerFlowCreditMessage packet);
- void handleSendProducerMessage(SessionSendMessage packet);
+ void handleSend(SessionSendMessage packet);
void handleFailedOver(Packet packet);
Deleted: trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * 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.core.server.impl;
-
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.server.ServerMessage;
-import org.jboss.messaging.core.server.ServerProducer;
-import org.jboss.messaging.core.server.ServerSession;
-
-/**
- *
- * A ServerProducerImpl
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @author <a href="mailto:andy.taylor at jboss.org>Andy Taylor</a>
- *
- */
-public class ServerProducerImpl implements ServerProducer
-{
- private static final Logger log = Logger.getLogger(ServerProducerImpl.class);
-
- private final long id;
-
- private final ServerSession session;
-
- // Constructors ----------------------------------------------------------------
-
- public ServerProducerImpl(final long id, final ServerSession session) throws Exception
- {
- this.id = id;
-
- this.session = session;
- }
-
- // ServerProducer implementation --------------------------------------------
-
- public long getID()
- {
- return id;
- }
-
- public void close() throws Exception
- {
- session.removeProducer(this);
- }
-
- public void send(final ServerMessage message) throws Exception
- {
- session.send(message);
- }
-}
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -59,7 +59,6 @@
import org.jboss.messaging.core.remoting.impl.wireformat.SessionCreateQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionDeleteQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionExpiredMessage;
-import org.jboss.messaging.core.remoting.impl.wireformat.SessionProducerCloseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryResponseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionRemoveDestinationMessage;
@@ -86,7 +85,6 @@
import org.jboss.messaging.core.server.SendLock;
import org.jboss.messaging.core.server.ServerConsumer;
import org.jboss.messaging.core.server.ServerMessage;
-import org.jboss.messaging.core.server.ServerProducer;
import org.jboss.messaging.core.server.ServerSession;
import org.jboss.messaging.core.settings.HierarchicalRepository;
import org.jboss.messaging.core.settings.impl.QueueSettings;
@@ -131,8 +129,6 @@
private final Map<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
- private final Map<Long, ServerProducer> producers = new ConcurrentHashMap<Long, ServerProducer>();
-
private final Executor executor;
private Transaction tx;
@@ -253,14 +249,6 @@
}
}
- public void removeProducer(final ServerProducer producer) throws Exception
- {
- if (producers.remove(producer.getID()) == null)
- {
- throw new IllegalStateException("Cannot find producer with id " + producer.getID() + " to remove");
- }
- }
-
public void close() throws Exception
{
rollback();
@@ -273,16 +261,7 @@
}
consumers.clear();
-
- Set<ServerProducer> producersClone = new HashSet<ServerProducer>(producers.values());
-
- for (ServerProducer producer : producersClone)
- {
- producer.close();
- }
-
- producers.clear();
-
+
server.removeSession(name);
}
@@ -290,47 +269,6 @@
{
queue.deliverAsync(executor);
}
-
- public void send(final ServerMessage msg) throws Exception
- {
- // check the user has write access to this address.
- doSecurity(msg);
-
- Long scheduledDeliveryTime = (Long)msg.getProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME);
-
- if (autoCommitSends)
- {
- if (!pager.page(msg))
- {
- List<MessageReference> refs = postOffice.route(msg);
-
- if (msg.getDurableRefCount() != 0)
- {
- storageManager.storeMessage(msg);
- }
-
- for (MessageReference ref : refs)
- {
- if (scheduledDeliveryTime != null)
- {
- ref.setScheduledDeliveryTime(scheduledDeliveryTime.longValue());
-
- if (ref.getMessage().isDurable() && ref.getQueue().isDurable())
- {
- storageManager.updateScheduledDeliveryTime(ref);
- }
- }
-
- ref.getQueue().addLast(ref);
- }
- }
- }
- else
- {
- tx.addMessage(msg);
- }
- }
-
public void doHandleCreateConsumer(final SessionCreateConsumerMessage packet)
{
@@ -395,7 +333,7 @@
consumers.put(consumer.getID(), consumer);
- response = new NullResponseMessage();
+ response = new NullResponseMessage();
}
catch (Exception e)
{
@@ -786,67 +724,6 @@
channel.send(response);
}
- /**
- * Create a producer for the specified address
- *
- * @param address The address to produce too
- * @param windowSize - the producer window size to use for flow control. Specify -1 to disable flow control
- * completely The actual window size used may be less than the specified window size if it is overridden by
- * any producer-window-size specified on the queue
- */
- public void handleCreateProducer(final Packet packet)
- {
- DelayedResult result = channel.replicatePacket(packet);
-
- if (result == null)
- {
- doHandleCreateProducer(packet);
- }
- else
- {
- //Don't process until result has come back from backup
- result.setResultRunner(new Runnable()
- {
- public void run()
- {
- doHandleCreateProducer(packet);
- }
- });
- }
- }
-
- public void doHandleCreateProducer(final Packet packet)
- {
- Packet response = null;
-
- try
- {
- ServerProducerImpl producer = new ServerProducerImpl(idGenerator.generateID(),
- this);
-
- producers.put(producer.getID(), producer);
-
- response = new NullResponseMessage();
- }
- catch (Exception e)
- {
- log.error("Failed to create producer", e);
-
- if (e instanceof MessagingException)
- {
- response = new MessagingExceptionMessage((MessagingException)e);
- }
- else
- {
- response = new MessagingExceptionMessage(new MessagingException(MessagingException.INTERNAL_ERROR));
- }
- }
-
- channel.confirm(packet);
-
- channel.send(response);
- }
-
public void handleAcknowledge(final SessionAcknowledgeMessage packet)
{
DelayedResult result = channel.replicatePacket(packet);
@@ -2174,56 +2051,7 @@
consumer.handleClose(packet);
}
- public void handleCloseProducer(final SessionProducerCloseMessage packet)
- {
- DelayedResult result = channel.replicatePacket(packet);
-
- if (result == null)
- {
- doHandleCloseProducer(packet);
- }
- else
- {
- //Don't process until result has come back from backup
- result.setResultRunner(new Runnable()
- {
- public void run()
- {
- doHandleCloseProducer(packet);
- }
- });
- }
- }
-
- public void doHandleCloseProducer(final SessionProducerCloseMessage packet)
- {
- Packet response = null;
-
- try
- {
- producers.get(packet.getProducerID()).close();
-
- response = new NullResponseMessage();
- }
- catch (Exception e)
- {
- log.error("Failed to close producer", e);
-
- if (e instanceof MessagingException)
- {
- response = new MessagingExceptionMessage((MessagingException)e);
- }
- else
- {
- response = new MessagingExceptionMessage(new MessagingException(MessagingException.INTERNAL_ERROR));
- }
- }
-
- channel.confirm(packet);
-
- channel.send(response);
- }
-
+
public void handleReceiveConsumerCredits(final SessionConsumerFlowCreditMessage packet)
{
DelayedResult result = channel.replicatePacket(packet);
@@ -2231,6 +2059,7 @@
try
{
//Note we don't wait for response before handling this
+
consumers.get(packet.getConsumerID()).receiveCredits(packet.getCredits());
}
catch (Exception e)
@@ -2254,7 +2083,7 @@
}
}
- public void handleSendProducerMessage(final SessionSendMessage packet)
+ public void handleSend(final SessionSendMessage packet)
{
//With a send we must make sure it is replicated to backup before being processed on live
//or can end up with delivery being processed on backup before original send
@@ -2317,11 +2146,11 @@
{
//It's a management message
- doHandleManagementMessage(message);
+ handleManagementMessage(message);
}
else
{
- producers.get(packet.getProducerID()).send(message);
+ send(message);
}
if (packet.isRequiresResponse())
@@ -2354,8 +2183,10 @@
}
}
- private void doHandleManagementMessage(final ServerMessage message) throws Exception
+ private void handleManagementMessage(final ServerMessage message) throws Exception
{
+ doSecurity(message);
+
if (message.containsProperty(ManagementHelper.HDR_JMX_SUBSCRIBE_TO_NOTIFICATIONS))
{
boolean subscribe = (Boolean)message.getProperty(ManagementHelper.HDR_JMX_SUBSCRIBE_TO_NOTIFICATIONS);
@@ -2572,34 +2403,46 @@
tx = new TransactionImpl(storageManager, postOffice);
}
-// private void doAck(final MessageReference ref) throws Exception
-// {
-// ServerMessage message = ref.getMessage();
-//
-// Queue queue = ref.getQueue();
-//
-// if (message.decrementRefCount() == 0)
-// {
-// pager.messageDone(message);
-// }
-//
-// if (message.isDurable() && queue.isDurable())
-// {
-// int count = message.decrementDurableRefCount();
-//
-// if (count == 0)
-// {
-// storageManager.storeDelete(message.getMessageID());
-// }
-// else
-// {
-// storageManager.storeAcknowledge(queue.getPersistenceID(), message.getMessageID());
-// }
-// }
-//
-// queue.referenceAcknowledged(ref);
-// }
+ private void send(final ServerMessage msg) throws Exception
+ {
+ // check the user has write access to this address.
+ doSecurity(msg);
+
+ Long scheduledDeliveryTime = (Long)msg.getProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME);
+ if (autoCommitSends)
+ {
+ if (!pager.page(msg))
+ {
+ List<MessageReference> refs = postOffice.route(msg);
+
+ if (msg.getDurableRefCount() != 0)
+ {
+ storageManager.storeMessage(msg);
+ }
+
+ for (MessageReference ref : refs)
+ {
+ if (scheduledDeliveryTime != null)
+ {
+ ref.setScheduledDeliveryTime(scheduledDeliveryTime.longValue());
+
+ if (ref.getMessage().isDurable() && ref.getQueue().isDurable())
+ {
+ storageManager.updateScheduledDeliveryTime(ref);
+ }
+ }
+
+ ref.getQueue().addLast(ref);
+ }
+ }
+ }
+ else
+ {
+ tx.addMessage(msg);
+ }
+ }
+
private void doSecurity(final ServerMessage msg) throws Exception
{
try
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionPacketHandler.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionPacketHandler.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionPacketHandler.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -12,7 +12,6 @@
package org.jboss.messaging.core.server.impl;
-
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_ACKNOWLEDGE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_ADD_DESTINATION;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_BINDINGQUERY;
@@ -20,13 +19,11 @@
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_COMMIT;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CONSUMER_CLOSE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATECONSUMER;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATEPRODUCER;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_CREATEQUEUE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_DELETE_QUEUE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_EXPIRED;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_FAILOVER_COMPLETE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_FLOWTOKEN;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_PRODUCER_CLOSE;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_QUEUEQUERY;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_REMOVE_DESTINATION;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.SESS_REPLICATE_DELIVERY;
@@ -60,7 +57,6 @@
import org.jboss.messaging.core.remoting.impl.wireformat.SessionCreateQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionDeleteQueueMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionExpiredMessage;
-import org.jboss.messaging.core.remoting.impl.wireformat.SessionProducerCloseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionQueueQueryMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionRemoveDestinationMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.SessionReplicateDeliveryMessage;
@@ -143,11 +139,6 @@
session.handleExecuteBindingQuery(request);
break;
}
- case SESS_CREATEPRODUCER:
- {
- session.handleCreateProducer(packet);
- break;
- }
case SESS_ACKNOWLEDGE:
{
SessionAcknowledgeMessage message = (SessionAcknowledgeMessage)packet;
@@ -277,12 +268,6 @@
session.handleCloseConsumer(message);
break;
}
- case SESS_PRODUCER_CLOSE:
- {
- SessionProducerCloseMessage message = (SessionProducerCloseMessage)packet;
- session.handleCloseProducer(message);
- break;
- }
case SESS_FLOWTOKEN:
{
SessionConsumerFlowCreditMessage message = (SessionConsumerFlowCreditMessage)packet;
@@ -292,7 +277,7 @@
case SESS_SEND:
{
SessionSendMessage message = (SessionSendMessage)packet;
- session.handleSendProducerMessage(message);
+ session.handleSend(message);
break;
}
case SESS_REPLICATE_DELIVERY:
Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -18,7 +18,7 @@
* 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.jms.client;
@@ -66,86 +66,89 @@
*
* $Id$
*/
-public class JBossConnection implements
- Connection, QueueConnection, TopicConnection,
- XAConnection, XAQueueConnection, XATopicConnection
+public class JBossConnection implements Connection, QueueConnection, TopicConnection, XAConnection, XAQueueConnection,
+ XATopicConnection
{
// Constants ------------------------------------------------------------------------------------
-
+
private static final Logger log = Logger.getLogger(JBossConnection.class);
public static final int TYPE_GENERIC_CONNECTION = 0;
-
+
public static final int TYPE_QUEUE_CONNECTION = 1;
-
+
public static final int TYPE_TOPIC_CONNECTION = 2;
-
+
public static final SimpleString CONNECTION_ID_PROPERTY_NAME = new SimpleString("__JBM_CID");
-
+
// Static ---------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
private final int connectionType;
-
+
private final Set<JBossSession> sessions = new ConcurrentHashSet<JBossSession>();
-
+
private final Set<SimpleString> tempAddresses = new ConcurrentHashSet<SimpleString>();
-
+
private final Set<SimpleString> tempQueues = new ConcurrentHashSet<SimpleString>();
-
+
private volatile boolean hasNoLocal;
-
+
private volatile ExceptionListener exceptionListener;
-
- private volatile boolean justCreated = true;
-
+
+ private volatile boolean justCreated = true;
+
private volatile ConnectionMetaData metaData;
-
+
private volatile boolean closed;
-
+
private volatile boolean started;
-
+
private String clientID;
-
+
private final ClientSessionFactory sessionFactory;
-
+
private final SimpleString uid;
-
+
private final String username;
-
+
private final String password;
-
+
private final FailureListener listener = new JMSFailureListener();
-
+
private final Version thisVersion;
-
+
private final int dupsOKBatchSize;
-
+
private final int transactionBatchSize;
-
+
// Constructors ---------------------------------------------------------------------------------
- public JBossConnection(final String username, final String password, final int connectionType,
- final String clientID, final int dupsOKBatchSize, final int transactionBatchSize,
+ public JBossConnection(final String username,
+ final String password,
+ final int connectionType,
+ final String clientID,
+ final int dupsOKBatchSize,
+ final int transactionBatchSize,
final ClientSessionFactory sessionFactory)
- {
+ {
this.username = username;
-
+
this.password = password;
-
+
this.connectionType = connectionType;
-
+
this.clientID = clientID;
-
+
this.sessionFactory = sessionFactory;
-
- uid = UUIDGenerator.getInstance().generateSimpleStringUUID();
-
+
+ uid = UUIDGenerator.getInstance().generateSimpleStringUUID();
+
thisVersion = VersionLoader.getVersion();
-
+
this.dupsOKBatchSize = dupsOKBatchSize;
-
+
this.transactionBatchSize = transactionBatchSize;
}
@@ -154,28 +157,28 @@
public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException
{
checkClosed();
-
- return createSessionInternal(transacted, acknowledgeMode, false, TYPE_GENERIC_CONNECTION, false);
+
+ return createSessionInternal(transacted, acknowledgeMode, false, TYPE_GENERIC_CONNECTION);
}
-
+
public String getClientID() throws JMSException
{
checkClosed();
-
+
justCreated = false;
-
+
return clientID;
}
public void setClientID(final String clientID) throws JMSException
{
checkClosed();
-
+
if (this.clientID != null)
{
throw new IllegalStateException("Client id has already been set");
}
-
+
if (!justCreated)
{
throw new IllegalStateException("setClientID can only be called directly after the connection is created");
@@ -185,11 +188,11 @@
justCreated = false;
}
-
+
public ConnectionMetaData getMetaData() throws JMSException
{
checkClosed();
-
+
justCreated = false;
if (metaData == null)
@@ -199,20 +202,20 @@
return metaData;
}
-
+
public ExceptionListener getExceptionListener() throws JMSException
{
checkClosed();
-
+
justCreated = false;
-
+
return exceptionListener;
}
public void setExceptionListener(final ExceptionListener listener) throws JMSException
{
checkClosed();
-
+
exceptionListener = listener;
justCreated = false;
}
@@ -220,8 +223,8 @@
public void start() throws JMSException
{
checkClosed();
-
- for (JBossSession session: sessions)
+
+ for (JBossSession session : sessions)
{
session.start();
}
@@ -234,12 +237,12 @@
{
checkClosed();
- for (JBossSession session: sessions)
+ for (JBossSession session : sessions)
{
session.stop();
}
-
- justCreated = false;
+
+ justCreated = false;
started = false;
}
@@ -249,33 +252,32 @@
{
return;
}
-
+
try
{
- for (JBossSession session: new HashSet<JBossSession>(sessions))
+ for (JBossSession session : new HashSet<JBossSession>(sessions))
{
- session.close();
+ session.close();
}
-
- //TODO may be a better way of doing this that doesn't involve creating a new session
-
+
+ // TODO may be a better way of doing this that doesn't involve creating a new session
+
if (!tempAddresses.isEmpty() || !tempQueues.isEmpty())
{
ClientSession session = null;
try
{
- session =
- sessionFactory.createSession(username, password, false, true, true, false, 0);
-
- //Remove any temporary queues and addresses
-
- for (SimpleString address: tempAddresses)
- {
+ session = sessionFactory.createSession(username, password, false, true, true, 0);
+
+ // Remove any temporary queues and addresses
+
+ for (SimpleString address : tempAddresses)
+ {
session.removeDestination(address, false);
}
-
- for (SimpleString queueName: tempQueues)
- {
+
+ for (SimpleString queueName : tempQueues)
+ {
session.deleteQueue(queueName);
}
}
@@ -285,14 +287,14 @@
{
session.close();
}
- }
+ }
}
-
+
closed = true;
}
catch (MessagingException e)
{
- throw JMSExceptionHelper.convertFromMessagingException(e);
+ throw JMSExceptionHelper.convertFromMessagingException(e);
}
}
@@ -318,46 +320,44 @@
String msg = "Cannot create a durable connection consumer on a QueueConnection";
throw new javax.jms.IllegalStateException(msg);
}
-
- //TODO
+
+ // TODO
return null;
}
// QueueConnection implementation ---------------------------------------------------------------
- public QueueSession createQueueSession(final boolean transacted,
- final int acknowledgeMode) throws JMSException
+ public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException
{
checkClosed();
- return createSessionInternal(transacted, acknowledgeMode, false,
- JBossSession.TYPE_QUEUE_SESSION, false);
+ return createSessionInternal(transacted, acknowledgeMode, false, JBossSession.TYPE_QUEUE_SESSION);
}
- public ConnectionConsumer createConnectionConsumer(final Queue queue, final String messageSelector,
+ public ConnectionConsumer createConnectionConsumer(final Queue queue,
+ final String messageSelector,
final ServerSessionPool sessionPool,
final int maxMessages) throws JMSException
{
checkClosed();
-
+
return null;
}
// TopicConnection implementation ---------------------------------------------------------------
- public TopicSession createTopicSession(final boolean transacted,
- final int acknowledgeMode) throws JMSException
+ public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException
{
checkClosed();
- return createSessionInternal(transacted, acknowledgeMode, false,
- JBossSession.TYPE_TOPIC_SESSION, false);
+ return createSessionInternal(transacted, acknowledgeMode, false, JBossSession.TYPE_TOPIC_SESSION);
}
-
- public ConnectionConsumer createConnectionConsumer(final Topic topic, final String messageSelector,
+
+ public ConnectionConsumer createConnectionConsumer(final Topic topic,
+ final String messageSelector,
final ServerSessionPool sessionPool,
final int maxMessages) throws JMSException
{
checkClosed();
-
+
return null;
}
@@ -366,183 +366,139 @@
public XASession createXASession() throws JMSException
{
checkClosed();
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_GENERIC_SESSION, false);
+ return createSessionInternal(true, Session.SESSION_TRANSACTED, true, JBossSession.TYPE_GENERIC_SESSION);
}
-
+
// XAQueueConnection implementation -------------------------------------------------------------
public XAQueueSession createXAQueueSession() throws JMSException
{
checkClosed();
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_QUEUE_SESSION, false);
+ return createSessionInternal(true, Session.SESSION_TRANSACTED, true, JBossSession.TYPE_QUEUE_SESSION);
}
-
// XATopicConnection implementation -------------------------------------------------------------
public XATopicSession createXATopicSession() throws JMSException
{
checkClosed();
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_TOPIC_SESSION, false);
+ return createSessionInternal(true, Session.SESSION_TRANSACTED, true, JBossSession.TYPE_TOPIC_SESSION);
}
-
+
// Public ---------------------------------------------------------------------------------------
public void addTemporaryAddress(final SimpleString tempAddress)
{
tempAddresses.add(tempAddress);
}
-
+
public void addTemporaryQueue(final SimpleString queueName)
{
tempQueues.add(queueName);
}
-
+
public void removeTemporaryAddress(final SimpleString tempAddress)
{
tempAddresses.remove(tempAddress);
}
-
+
public void removeTemporaryQueue(final SimpleString queueName)
{
tempQueues.remove(queueName);
}
-
+
public boolean hasNoLocal()
{
return hasNoLocal;
}
-
+
public void setHasNoLocal()
{
this.hasNoLocal = true;
}
-
+
public SimpleString getUID()
{
return uid;
}
-
- // We provide some overloaded createSession methods to allow the value of cacheProducers to be specified
-
- public Session createSession(final boolean transacted, final int acknowledgeMode,
- final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(transacted, acknowledgeMode, false, TYPE_GENERIC_CONNECTION, cacheProducers);
- }
-
- public QueueSession createQueueSession(final boolean transacted,
- final int acknowledgeMode, final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(transacted, acknowledgeMode, false,
- JBossSession.TYPE_QUEUE_SESSION, cacheProducers);
- }
-
- public TopicSession createTopicSession(final boolean transacted,
- final int acknowledgeMode, final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(transacted, acknowledgeMode, false,
- JBossSession.TYPE_TOPIC_SESSION, cacheProducers);
- }
- public XASession createXASession(final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_GENERIC_SESSION, cacheProducers);
- }
-
- public XAQueueSession createXAQueueSession(final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_QUEUE_SESSION, cacheProducers);
- }
-
- public XATopicSession createXATopicSession(final boolean cacheProducers) throws JMSException
- {
- return createSessionInternal(true, Session.SESSION_TRANSACTED, true,
- JBossSession.TYPE_TOPIC_SESSION, cacheProducers);
- }
-
public void removeSession(final JBossSession session)
{
sessions.remove(session);
}
-
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
-
+
// In case the user forgets to close the connection manually
protected void finalize() throws Throwable
{
close();
}
- protected JBossSession createSessionInternal(final boolean transacted, int acknowledgeMode,
- final boolean isXA, final int type, final boolean cacheProducers) throws JMSException
+ protected JBossSession createSessionInternal(final boolean transacted,
+ int acknowledgeMode,
+ final boolean isXA,
+ final int type) throws JMSException
{
if (transacted)
{
acknowledgeMode = Session.SESSION_TRANSACTED;
}
-
+
try
{
ClientSession session;
-
- if (acknowledgeMode == Session.SESSION_TRANSACTED)
- {
- session =
- sessionFactory.createSession(username, password, isXA, false, false, cacheProducers, transactionBatchSize);
- }
- else if (acknowledgeMode == Session.AUTO_ACKNOWLEDGE)
+
+ if (acknowledgeMode == Session.SESSION_TRANSACTED)
{
- session = sessionFactory.createSession(username, password, isXA, true, true, cacheProducers, 0);
+ session = sessionFactory.createSession(username, password, isXA, false, false, transactionBatchSize);
}
+ else if (acknowledgeMode == Session.AUTO_ACKNOWLEDGE)
+ {
+ session = sessionFactory.createSession(username, password, isXA, true, true, 0);
+ }
else if (acknowledgeMode == Session.DUPS_OK_ACKNOWLEDGE)
{
- session = sessionFactory.createSession(username, password, isXA, true, true, cacheProducers, dupsOKBatchSize);
+ session = sessionFactory.createSession(username, password, isXA, true, true, dupsOKBatchSize);
}
else if (acknowledgeMode == Session.CLIENT_ACKNOWLEDGE)
{
- session =
- sessionFactory.createSession(username, password, isXA, true, false, cacheProducers, transactionBatchSize);
- }
+ session = sessionFactory.createSession(username, password, isXA, true, false, transactionBatchSize);
+ }
else
{
- throw new IllegalArgumentException("Invalid ackmode: " + acknowledgeMode);
+ throw new IllegalArgumentException("Invalid ackmode: " + acknowledgeMode);
}
justCreated = false;
-
- //Setting multiple times on different sessions doesn't matter since RemotingConnection maintains
- //a set (no duplicates)
+
+ // Setting multiple times on different sessions doesn't matter since RemotingConnection maintains
+ // a set (no duplicates)
session.addFailureListener(listener);
-
+
JBossSession jbs = new JBossSession(this, transacted, isXA, acknowledgeMode, session, type);
-
+
sessions.add(jbs);
-
+
if (started)
{
session.start();
}
-
+
return jbs;
}
catch (MessagingException e)
{
- throw JMSExceptionHelper.convertFromMessagingException(e);
- }
+ throw JMSExceptionHelper.convertFromMessagingException(e);
+ }
}
// Private --------------------------------------------------------------------------------------
-
+
private void checkClosed() throws JMSException
{
if (closed)
@@ -552,7 +508,7 @@
}
// Inner classes --------------------------------------------------------------------------------
-
+
private class JMSFailureListener implements FailureListener
{
public void connectionFailed(final MessagingException me)
@@ -571,6 +527,6 @@
exceptionListener.onException(je);
}
}
-
+
}
}
Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -318,7 +318,7 @@
try
{
- sess = sessionFactory.createSession(username, password, false, false, false, false, 0);
+ sess = sessionFactory.createSession(username, password, false, false, false, 0);
}
catch (MessagingException e)
{
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -36,6 +36,7 @@
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.exception.MessagingException;
+import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.server.MessagingService;
import org.jboss.messaging.core.server.impl.GroupingRoundRobinDistributionPolicy;
import org.jboss.messaging.core.server.impl.MessagingServiceImpl;
@@ -48,6 +49,8 @@
*/
public class AutoGroupClientTest extends TestCase
{
+ private static final Logger log = Logger.getLogger(AutoGroupClientTest.class);
+
public void testGroupIdAutomaticallySet() throws Exception
{
final SimpleString QUEUE = new SimpleString("testGroupQueue");
@@ -67,7 +70,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
sf.setAutoGroup(true);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -78,7 +81,10 @@
MyMessageHandler myMessageHandler = new MyMessageHandler(latch);
MyMessageHandler myMessageHandler2 = new MyMessageHandler(latch);
+ log.info("creating consuimer");
+
ClientConsumer consumer = session.createConsumer(QUEUE);
+ log.info("created consumer");
consumer.setMessageHandler(myMessageHandler);
ClientConsumer consumer2 = session.createConsumer(QUEUE);
consumer2.setMessageHandler(myMessageHandler2);
@@ -125,7 +131,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
sf.setAutoGroup(true);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -193,7 +199,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/basic/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/basic/CoreClientTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/basic/CoreClientTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -78,7 +78,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(connectorFactoryClassName));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -107,7 +107,7 @@
Process p = SpawnedVMSupport.spawnVM(CrashClient.class.getName(),
new String[] { Integer.toString(numberOfConnectionsOnTheClient) });
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
ClientConsumer consumer = session.createConsumer(QUEUE);
ClientProducer producer = session.createProducer(QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientExitTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientExitTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientExitTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -105,7 +105,7 @@
messagingService.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- session = sf.createSession(false, true, true, false);
+ session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
consumer = session.createConsumer(QUEUE);
session.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/CrashClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/CrashClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/CrashClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -70,7 +70,7 @@
int numberOfConnections = Integer.parseInt(args[0]);
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
ClientProducer producer = session.createProducer(QUEUE);
ClientConsumer consumer = session.createConsumer(QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/GracefulClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/GracefulClient.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/GracefulClient.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -57,7 +57,7 @@
try
{
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
ClientProducer producer = session.createProducer(QUEUE);
ClientConsumer consumer = session.createConsumer(QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ActivationTimeoutTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ActivationTimeoutTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ActivationTimeoutTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -94,7 +94,7 @@
sf1.setSendWindowSize(32 * 1024);
sf2.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -118,7 +118,7 @@
ClientConsumer consumer1 = session1.createConsumer(ADDRESS);
- ClientSession session2 = sf2.createSession(false, true, true, false);
+ ClientSession session2 = sf2.createSession(false, true, true);
//Create another consumer so we have two consumers on the queue
ClientConsumer consumer2 = session2.createConsumer(ADDRESS);
@@ -181,7 +181,7 @@
sf1.setSendWindowSize(32 * 1024);
sf2.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -204,7 +204,7 @@
log.info("Sent messages");
- ClientSession session2 = sf2.createSession(false, true, true, false);
+ ClientSession session2 = sf2.createSession(false, true, true);
ClientConsumer consumer1 = session2.createConsumer(ADDRESS);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailBackupServerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailBackupServerTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailBackupServerTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -89,7 +89,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverExpiredMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverExpiredMessageTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverExpiredMessageTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -91,7 +91,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -172,7 +172,7 @@
session1.close();
//Make sure no more messages
- ClientSession session2 = sf1.createSession(false, true, true, false);
+ ClientSession session2 = sf1.createSession(false, true, true);
session2.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverManagementTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverManagementTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverManagementTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -92,7 +92,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -166,7 +166,7 @@
session1.close();
//Make sure no more messages
- ClientSession session2 = sf1.createSession(false, true, true, false);
+ ClientSession session2 = sf1.createSession(false, true, true);
session2.start();
@@ -187,7 +187,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -251,7 +251,7 @@
session1.close();
//Make sure no more messages
- ClientSession session2 = sf1.createSession(false, true, true, false);
+ ClientSession session2 = sf1.createSession(false, true, true);
session2.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverNoSessionsFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverNoSessionsFailoverTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverNoSessionsFailoverTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -85,7 +85,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -136,7 +136,7 @@
sf2.setSendWindowSize(32 * 1024);
- ClientSession session2 = sf2.createSession(false, true, true, false);
+ ClientSession session2 = sf2.createSession(false, true, true);
ClientProducer producer2 = session2.createProducer(ADDRESS);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverScheduledMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverScheduledMessageTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/FailoverScheduledMessageTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -94,7 +94,7 @@
sf1.setSendWindowSize(32 * 1024);
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
session1.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -166,7 +166,7 @@
session1.close();
//Make sure no more messages
- ClientSession session2 = sf1.createSession(false, true, true, false);
+ ClientSession session2 = sf1.createSession(false, true, true);
session2.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/MultiThreadRandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/MultiThreadRandomFailoverTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/MultiThreadRandomFailoverTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -241,7 +241,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -254,7 +254,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.start();
@@ -267,7 +267,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -323,7 +323,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -336,7 +336,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -347,7 +347,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -410,7 +410,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -423,7 +423,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.start();
@@ -436,7 +436,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -515,7 +515,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -528,7 +528,7 @@
{
SimpleString subName = new SimpleString(threadNum + " sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -539,7 +539,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -652,7 +652,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -665,7 +665,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.start();
@@ -678,7 +678,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -710,7 +710,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -723,7 +723,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -734,7 +734,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -771,7 +771,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -784,7 +784,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.start();
@@ -797,7 +797,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -847,7 +847,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -860,7 +860,7 @@
{
SimpleString subName = new SimpleString(threadNum + "sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -871,7 +871,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -924,11 +924,11 @@
protected void doTestI(final ClientSessionFactory sf, final int threadNum) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, new SimpleString(threadNum + ADDRESS.toString()), null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.start();
@@ -960,11 +960,11 @@
protected void doTestJ(final ClientSessionFactory sf, final int threadNum) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, new SimpleString(threadNum + ADDRESS.toString()), null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.start();
@@ -996,7 +996,7 @@
protected void doTestK(final ClientSessionFactory sf, final int threadNum) throws Exception
{
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
s.createQueue(ADDRESS, new SimpleString(threadNum + ADDRESS.toString()), null, false, false);
@@ -1016,13 +1016,13 @@
protected void doTestL(final ClientSessionFactory sf) throws Exception
{
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numSessions = 100;
for (int i = 0; i < numSessions; i++)
{
- ClientSession session = sf.createSession(false, false, false, false);
+ ClientSession session = sf.createSession(false, false, false);
session.close();
}
@@ -1148,11 +1148,11 @@
protected void doTestN(final ClientSessionFactory sf, final int threadNum) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, new SimpleString(threadNum + ADDRESS.toString()), null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.stop();
@@ -1240,7 +1240,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, false, false, false);
+ ClientSession session = sf.createSession(false, false, false);
Failer failer = startFailer(1000, session);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/RandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/RandomFailoverTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/RandomFailoverTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -232,7 +232,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, false, false, false);
+ ClientSession session = sf.createSession(false, false, false);
Failer failer = startFailer(1000, session);
@@ -265,7 +265,7 @@
log.info("starting================");
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -278,7 +278,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.start();
@@ -291,7 +291,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -384,7 +384,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -397,7 +397,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -408,7 +408,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -497,7 +497,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -510,7 +510,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.start();
@@ -523,7 +523,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -650,7 +650,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -663,7 +663,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -674,7 +674,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -808,7 +808,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -821,7 +821,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.start();
@@ -834,7 +834,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -898,7 +898,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -911,7 +911,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, true, true, false);
+ ClientSession sessConsume = sf.createSession(false, true, true);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -922,7 +922,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, true, true, false);
+ ClientSession sessSend = sf.createSession(false, true, true);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -998,7 +998,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -1011,7 +1011,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.start();
@@ -1024,7 +1024,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -1137,7 +1137,7 @@
{
long start = System.currentTimeMillis();
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numMessages = 100;
@@ -1150,7 +1150,7 @@
{
SimpleString subName = new SimpleString("sub" + i);
- ClientSession sessConsume = sf.createSession(false, false, false, false);
+ ClientSession sessConsume = sf.createSession(false, false, false);
sessConsume.createQueue(ADDRESS, subName, null, false, false);
@@ -1161,7 +1161,7 @@
sessions.add(sessConsume);
}
- ClientSession sessSend = sf.createSession(false, false, false, false);
+ ClientSession sessSend = sf.createSession(false, false, false);
ClientProducer producer = sessSend.createProducer(ADDRESS);
@@ -1278,11 +1278,11 @@
protected void doTestI(final ClientSessionFactory sf) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, ADDRESS, null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.start();
@@ -1314,11 +1314,11 @@
protected void doTestJ(final ClientSessionFactory sf) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, ADDRESS, null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.start();
@@ -1350,7 +1350,7 @@
protected void doTestK(final ClientSessionFactory sf) throws Exception
{
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
s.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -1370,13 +1370,13 @@
protected void doTestL(final ClientSessionFactory sf) throws Exception
{
- ClientSession s = sf.createSession(false, false, false, false);
+ ClientSession s = sf.createSession(false, false, false);
final int numSessions = 100;
for (int i = 0; i < numSessions; i++)
{
- ClientSession session = sf.createSession(false, false, false, false);
+ ClientSession session = sf.createSession(false, false, false);
session.close();
}
@@ -1387,11 +1387,11 @@
protected void doTestN(final ClientSessionFactory sf) throws Exception
{
- ClientSession sessCreate = sf.createSession(false, true, true, false);
+ ClientSession sessCreate = sf.createSession(false, true, true);
sessCreate.createQueue(ADDRESS, new SimpleString(ADDRESS.toString()), null, false, false);
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sess.stop();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -100,7 +100,7 @@
assertEquals(0, backupService.getServer().getRemotingService().getConnections().size());
- ClientSession session1 = sf1.createSession(false, true, true, false);
+ ClientSession session1 = sf1.createSession(false, true, true);
// One connection
assertEquals(1, liveService.getServer().getRemotingService().getConnections().size());
@@ -116,7 +116,7 @@
assertEquals(0, backupService.getServer().getRemotingService().getConnections().size());
- session1 = sf1.createSession(false, true, true, false);
+ session1 = sf1.createSession(false, true, true);
assertEquals(1, liveService.getServer().getRemotingService().getConnections().size());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleAutomaticFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleAutomaticFailoverTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleAutomaticFailoverTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -88,7 +88,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -144,7 +144,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -187,7 +187,7 @@
session.close();
- session = sf.createSession(false, true, true, false);
+ session = sf.createSession(false, true, true);
consumer = session.createConsumer(ADDRESS);
@@ -225,7 +225,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -271,7 +271,7 @@
sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory",
backupParams));
- session = sf.createSession(false, true, true, false);
+ session = sf.createSession(false, true, true);
consumer = session.createConsumer(ADDRESS);
@@ -309,7 +309,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -355,7 +355,7 @@
sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory",
backupParams));
- session = sf.createSession(false, true, true, false);
+ session = sf.createSession(false, true, true);
consumer = session.createConsumer(ADDRESS);
@@ -380,7 +380,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -424,11 +424,11 @@
sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory",
backupParams));
- ClientSession session1 = sf.createSession(false, true, true, false);
+ ClientSession session1 = sf.createSession(false, true, true);
- ClientSession session2 = sf.createSession(false, true, true, false);
+ ClientSession session2 = sf.createSession(false, true, true);
- ClientSession session3 = sf.createSession(false, true, true, false);
+ ClientSession session3 = sf.createSession(false, true, true);
session.close();
@@ -453,7 +453,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
@@ -515,7 +515,7 @@
sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory",
backupParams));
- session = sf.createSession(false, true, true, false);
+ session = sf.createSession(false, true, true);
consumer = session.createConsumer(ADDRESS);
@@ -548,7 +548,7 @@
for (int i = 0; i < numSessions; i++)
{
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
SimpleString queueName = new SimpleString("subscription" + i);
@@ -563,7 +563,7 @@
consumers.add(consumer);
}
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
ClientProducer producer = session.createProducer(ADDRESS);
@@ -637,7 +637,7 @@
for (int i = 0; i < numSessions; i++)
{
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sessions.add(sess);
}
@@ -670,7 +670,7 @@
for (int i = 0; i < numSessions; i++)
{
- ClientSession sess = sf.createSession(false, true, true, false);
+ ClientSession sess = sf.createSession(false, true, true);
sessions.add(sess);
}
@@ -702,7 +702,7 @@
sf.setSendWindowSize(32 * 1024);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleManualFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleManualFailoverTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/SimpleManualFailoverTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -82,7 +82,7 @@
private ClientSession sendAndConsume(final ClientSessionFactory sf) throws Exception
{
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(ADDRESS, ADDRESS, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/consumer/ConsumerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/consumer/ConsumerTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/consumer/ConsumerTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -75,7 +75,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -120,7 +120,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -166,7 +166,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -202,7 +202,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -239,7 +239,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -283,7 +283,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -316,7 +316,7 @@
{
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -351,7 +351,7 @@
{
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/scheduling/ScheduledMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/scheduling/ScheduledMessageTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/scheduling/ScheduledMessageTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -167,7 +167,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage message = createMessage(session, "m1");
@@ -209,7 +209,7 @@
messagingService.getServer().getQueueSettingsRepository().addMatch(atestq2.toString(), qs);
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
session.createQueue(atestq, atestq2, null, true, true);
ClientProducer producer = session.createProducer(atestq);
@@ -264,7 +264,7 @@
messagingService.getServer().getQueueSettingsRepository().addMatch(atestq2.toString(), qs);
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
session.createQueue(atestq, atestq2, null, true, true);
ClientProducer producer = session.createProducer(atestq);
@@ -292,7 +292,7 @@
messagingService = MessagingServiceImpl.newNioStorageMessagingServer(configuration, journalDir, bindingsDir);
messagingService.start();
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(false, true, true, false);
+ session = sessionFactory.createSession(false, true, true);
consumer = session.createConsumer(atestq);
consumer2 = session.createConsumer(atestq2);
session.start();
@@ -324,7 +324,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage message = session.createClientMessage(JBossTextMessage.TYPE,
@@ -350,7 +350,7 @@
messagingService = MessagingServiceImpl.newNioStorageMessagingServer(configuration, journalDir, bindingsDir);
messagingService.start();
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(false, true, true, false);
+ session = sessionFactory.createSession(false, true, true);
}
ClientConsumer consumer = session.createConsumer(atestq);
@@ -380,7 +380,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage m1 = createMessage(session, "m1");
@@ -416,7 +416,7 @@
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(false, true, true, false);
+ session = sessionFactory.createSession(false, true, true);
}
ClientConsumer consumer = session.createConsumer(atestq);
@@ -466,7 +466,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage m1 = createMessage(session, "m1");
@@ -503,7 +503,7 @@
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(false, true, true, false);
+ session = sessionFactory.createSession(false, true, true);
}
consumer = session.createConsumer(atestq);
@@ -553,7 +553,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(false, true, false, false);
+ ClientSession session = sessionFactory.createSession(false, true, false);
session.createQueue(atestq, atestq, null, true, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage m1 = createMessage(session, "m1");
@@ -586,7 +586,7 @@
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(false, true, true, false);
+ session = sessionFactory.createSession(false, true, true);
}
consumer = session.createConsumer(atestq);
@@ -632,7 +632,7 @@
messagingService.start();
// then we create a client as normal
ClientSessionFactory sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- ClientSession session = sessionFactory.createSession(true, false, false, false);
+ ClientSession session = sessionFactory.createSession(true, false, false);
session.createQueue(atestq, atestq, null, true, false);
session.start(xid, XAResource.TMNOFLAGS);
ClientProducer producer = session.createProducer(atestq);
@@ -661,7 +661,7 @@
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- session = sessionFactory.createSession(true, false, false, false);
+ session = sessionFactory.createSession(true, false, false);
}
session.commit(xid, true);
ClientConsumer consumer = session.createConsumer(atestq);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/ssl/CoreClientOverSSL.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/ssl/CoreClientOverSSL.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/ssl/CoreClientOverSSL.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -70,7 +70,7 @@
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.netty.NettyConnectorFactory"));
sf.getTransportParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, sslEnabled);
- ClientSession session = sf.createSession(false, true, true, false);
+ ClientSession session = sf.createSession(false, true, true);
ClientProducer producer = session.createProducer(CoreClientOverSSLTest.QUEUE);
ClientMessage message = session.createClientMessage(JBossTextMessage.TYPE, false, 0,
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/xa/BasicXaRecoveryTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/xa/BasicXaRecoveryTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/xa/BasicXaRecoveryTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -93,7 +93,7 @@
messagingService.start();
//then we create a client as normal
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- clientSession = sessionFactory.createSession(true, false, false, false);
+ clientSession = sessionFactory.createSession(true, false, false);
clientSession.createQueue(atestq, atestq, null, true, true);
clientProducer = clientSession.createProducer(atestq);
clientConsumer = clientSession.createConsumer(atestq);
@@ -555,7 +555,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(false, false, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, false, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -615,7 +615,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(true, false, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(true, false, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientSession2.start(xid2, XAResource.TMNOFLAGS);
clientProducer2.send(m1);
@@ -689,7 +689,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(true, false, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(true, false, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientSession2.start(xid2, XAResource.TMNOFLAGS);
clientProducer2.send(m1);
@@ -741,7 +741,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(true, false, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(true, false, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientSession2.start(xid2, XAResource.TMNOFLAGS);
clientProducer2.send(m1);
@@ -804,7 +804,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(true, false, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(true, false, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientSession2.start(xid, XAResource.TMNOFLAGS);
clientProducer2.send(m1);
@@ -873,7 +873,7 @@
ClientMessage m2 = createTextMessage("m2");
ClientMessage m3 = createTextMessage("m3");
ClientMessage m4 = createTextMessage("m4");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -931,7 +931,7 @@
ClientMessage m2 = createTextMessage("m2");
ClientMessage m3 = createTextMessage("m3");
ClientMessage m4 = createTextMessage("m4");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -1004,7 +1004,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
SimpleString anewtestq = new SimpleString("anewtestq");
clientSession.createQueue(anewtestq, anewtestq, null, true, true);
@@ -1018,7 +1018,7 @@
clientProducer3.send(m7);
clientProducer3.send(m8);
clientSession2.close();
- clientSession2 = sessionFactory.createSession(true, false, false, false);
+ clientSession2 = sessionFactory.createSession(true, false, false);
ClientConsumer clientConsumer2 = clientSession2.createConsumer(anewtestq);
clientSession2.start(xid2, XAResource.TMNOFLAGS);
clientSession2.start();
@@ -1094,7 +1094,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
SimpleString anewtestq = new SimpleString("anewtestq");
clientSession.createQueue(anewtestq, anewtestq, null, true, true);
@@ -1108,7 +1108,7 @@
clientProducer3.send(m7);
clientProducer3.send(m8);
clientSession2.close();
- clientSession2 = sessionFactory.createSession(true, false, false, false);
+ clientSession2 = sessionFactory.createSession(true, false, false);
ClientConsumer clientConsumer2 = clientSession2.createConsumer(anewtestq);
clientSession2.start(xid2, XAResource.TMNOFLAGS);
clientSession2.start();
@@ -1241,7 +1241,7 @@
throws MessagingException
{
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- clientSession = sessionFactory.createSession(true, false, true, false);
+ clientSession = sessionFactory.createSession(true, false, true);
clientProducer = clientSession.createProducer(atestq);
clientConsumer = clientSession.createConsumer(atestq);
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -84,7 +84,7 @@
messagingService.start();
//then we create a client as normal
sessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(CONNECTOR_FACTORY));
- clientSession = sessionFactory.createSession(true, false, false, false);
+ clientSession = sessionFactory.createSession(true, false, false);
clientSession.createQueue(atestq, atestq, null, true, true);
clientProducer = clientSession.createProducer(atestq);
clientConsumer = clientSession.createConsumer(atestq);
@@ -155,7 +155,7 @@
ClientMessage m2 = createTextMessage("m2");
ClientMessage m3 = createTextMessage("m3");
ClientMessage m4 = createTextMessage("m4");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -193,7 +193,7 @@
}
clientSession.setTransactionTimeout(0);
clientConsumer.close();
- clientSession2 = sessionFactory.createSession(false, true, true, false);
+ clientSession2 = sessionFactory.createSession(false, true, true);
ClientConsumer consumer = clientSession2.createConsumer(atestq);
clientSession2.start();
m = consumer.receive(500);
@@ -227,7 +227,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -269,7 +269,7 @@
}
clientSession.setTransactionTimeout(0);
clientConsumer.close();
- clientSession2 = sessionFactory.createSession(false, true, true, false);
+ clientSession2 = sessionFactory.createSession(false, true, true);
ClientConsumer consumer = clientSession2.createConsumer(atestq);
clientSession2.start();
m = consumer.receive(500);
@@ -305,7 +305,7 @@
ClientMessage m6 = createTextMessage("m6");
ClientMessage m7 = createTextMessage("m7");
ClientMessage m8 = createTextMessage("m8");
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientProducer clientProducer2 = clientSession2.createProducer(atestq);
clientProducer2.send(m1);
clientProducer2.send(m2);
@@ -342,7 +342,7 @@
clientSession.setTransactionTimeout(0);
clientConsumer.close();
- clientSession2 = sessionFactory.createSession(false, true, true, false);
+ clientSession2 = sessionFactory.createSession(false, true, true);
ClientConsumer consumer = clientSession2.createConsumer(atestq);
clientSession2.start();
m = consumer.receive(500);
@@ -415,7 +415,7 @@
Thread.sleep(2600);
clientSession.prepare(xid);
clientSession.commit(xid, true);
- ClientSession clientSession2 = sessionFactory.createSession(false, true, true, false);
+ ClientSession clientSession2 = sessionFactory.createSession(false, true, true);
ClientConsumer consumer = clientSession2.createConsumer(atestq);
clientSession2.start();
ClientMessage m = consumer.receive(500);
@@ -446,7 +446,7 @@
ClientSession[] clientSessions = new ClientSession[xids.length];
for (int i = 0; i < clientSessions.length; i++)
{
- clientSessions[i] = sessionFactory.createSession(true, false, false, false);
+ clientSessions[i] = sessionFactory.createSession(true, false, false);
}
ClientProducer[] clientProducers = new ClientProducer[xids.length];
Modified: trunk/tests/src/org/jboss/messaging/tests/stress/paging/MultipleDestinationPagingTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/stress/paging/MultipleDestinationPagingTest.java 2008-11-10 17:53:01 UTC (rev 5329)
+++ trunk/tests/src/org/jboss/messaging/tests/stress/paging/MultipleDestinationPagingTest.java 2008-11-10 19:17:56 UTC (rev 5330)
@@ -85,9 +85,8 @@
try
{
+ session = factory.createSession(false, false, false);
- session = factory.createSession(false, false, false, false);
-
SimpleString address = new SimpleString("page-adr");
SimpleString queue[] = new SimpleString[] { new SimpleString("queue1"), new SimpleString("queue2") };
More information about the jboss-cvs-commits
mailing list