[jboss-cvs] JBoss Messaging SVN: r3141 - in trunk/src: etc/xmdesc and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 26 15:22:42 EDT 2007
Author: ataylor
Date: 2007-09-26 15:22:42 -0400 (Wed, 26 Sep 2007)
New Revision: 3141
Modified:
trunk/src/etc/server/default/deploy/connection-factories-service.xml
trunk/src/etc/xmdesc/ConnectionFactory-xmbean.xml
trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java
trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
trunk/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-1078 - StrictTCK behavior
Modified: trunk/src/etc/server/default/deploy/connection-factories-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/connection-factories-service.xml 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/etc/server/default/deploy/connection-factories-service.xml 2007-09-26 19:22:42 UTC (rev 3141)
@@ -115,7 +115,11 @@
<!- - The class name of the factory used to create the load balancing policy to use on the client side - ->
<attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
-
+
+ <!- - Whether we should be strict TCK compliant, i.e. how we deal with foreign messages, defaults to false- ->
+
+ <attribute name="StrictTck">true</attribute>
+
<!- - The connection factory will be bound in the following places in JNDI - ->
<attribute name="JNDIBindings">
Modified: trunk/src/etc/xmdesc/ConnectionFactory-xmbean.xml
===================================================================
--- trunk/src/etc/xmdesc/ConnectionFactory-xmbean.xml 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/etc/xmdesc/ConnectionFactory-xmbean.xml 2007-09-26 19:22:42 UTC (rev 3141)
@@ -112,6 +112,12 @@
<type>java.lang.String</type>
</attribute>
+ <attribute access="read-write" getMethod="isStrictTck" setMethod="setStrictTck">
+ <description>Does this CF support StrictTCK</description>
+ <name>StrictTck</name>
+ <type>boolean</type>
+ </attribute>
+
<!-- Managed operations -->
<operation>
Modified: trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -213,6 +213,10 @@
//We must set the destination *after* converting from foreign message
messageToSend.setJMSDestination(destination);
+ if(connectionState.getRemotingConnection().isStrictTck())
+ {
+ m.setJMSDestination(destination);
+ }
}
else
{
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -96,7 +96,7 @@
if (trace) log.trace("Trying communication on server(" + server + ")=" + delegates[server].getServerLocatorURI());
try
{
- remoting = new JMSRemotingConnection(delegates[server].getServerLocatorURI(), true);
+ remoting = new JMSRemotingConnection(delegates[server].getServerLocatorURI(), true, delegates[server].getStrictTck());
remoting.start();
currentDelegate = delegates[server];
if (trace) log.trace("Adding callback");
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -74,6 +74,8 @@
private int serverID;
private boolean clientPing;
+
+ private boolean strictTck;
// Static ---------------------------------------------------------------------------------------
@@ -104,7 +106,7 @@
// Constructors ---------------------------------------------------------------------------------
public ClientConnectionFactoryDelegate(String uniqueName, String objectID, int serverID, String serverLocatorURI,
- Version serverVersion, boolean clientPing)
+ Version serverVersion, boolean clientPing, boolean strictTck)
{
super(objectID);
@@ -113,6 +115,7 @@
this.serverLocatorURI = serverLocatorURI;
this.serverVersion = serverVersion;
this.clientPing = clientPing;
+ this.strictTck = strictTck;
}
public ClientConnectionFactoryDelegate()
@@ -146,7 +149,7 @@
try
{
- remotingConnection = new JMSRemotingConnection(serverLocatorURI, clientPing);
+ remotingConnection = new JMSRemotingConnection(serverLocatorURI, clientPing, strictTck);
remotingConnection.start();
@@ -262,8 +265,14 @@
return serverVersion;
}
- public void synchronizeWith(DelegateSupport newDelegate) throws Exception
+
+ public boolean getStrictTck()
{
+ return strictTck;
+ }
+
+ public void synchronizeWith(DelegateSupport newDelegate) throws Exception
+ {
super.synchronizeWith(newDelegate);
}
@@ -316,6 +325,8 @@
serverID = in.readInt();
clientPing = in.readBoolean();
+
+ strictTck = in.readBoolean();
}
public void write(DataOutputStream out) throws Exception
@@ -329,6 +340,8 @@
out.writeInt(serverID);
out.writeBoolean(clientPing);
+
+ out.writeBoolean(strictTck);
}
// Inner Classes --------------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -236,6 +236,7 @@
private boolean clientPing;
private InvokerLocator serverLocator;
private CallbackManager callbackManager;
+ private boolean strictTck;
// When a failover is performed, this flag is set to true
protected boolean failed = false;
@@ -246,10 +247,11 @@
// Constructors ---------------------------------------------------------------------------------
- public JMSRemotingConnection(String serverLocatorURI, boolean clientPing) throws Exception
+ public JMSRemotingConnection(String serverLocatorURI, boolean clientPing, boolean strictTck) throws Exception
{
serverLocator = new InvokerLocator(serverLocatorURI);
this.clientPing = clientPing;
+ this.strictTck = strictTck;
log.trace(this + " created");
}
@@ -337,8 +339,14 @@
return callbackManager;
}
- public synchronized boolean isFailed()
+
+ public boolean isStrictTck()
{
+ return strictTck;
+ }
+
+ public synchronized boolean isFailed()
+ {
return failed;
}
Modified: trunk/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -48,7 +48,8 @@
int dupsOKBatchSize,
boolean supportsFailover,
boolean supportsLoadBalancing,
- LoadBalancingFactory loadBalancingPolicy) throws Exception;
+ LoadBalancingFactory loadBalancingPolicy,
+ boolean strictTck) throws Exception;
void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing) throws Exception;
}
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -73,6 +73,8 @@
private boolean started;
+ private boolean strictTck;
+
// Constructors ---------------------------------------------------------------------------------
public ConnectionFactory()
@@ -150,7 +152,7 @@
locatorURI, enablePing, prefetchSize, slowConsumers,
defaultTempQueueFullSize, defaultTempQueuePageSize,
defaultTempQueueDownCacheSize, dupsOKBatchSize, supportsFailover, supportsLoadBalancing,
- loadBalancingFactory);
+ loadBalancingFactory, strictTck);
InvokerLocator locator = new InvokerLocator(locatorURI);
@@ -363,8 +365,18 @@
return this.dupsOKBatchSize;
}
- // JMX managed operations -----------------------------------------------------------------------
+ public boolean isStrictTck()
+ {
+ return strictTck;
+ }
+ public void setStrictTck(boolean strictTck)
+ {
+ this.strictTck = strictTck;
+ }
+
+ // JMX managed operations -----------------------------------------------------------------------
+
// Public ---------------------------------------------------------------------------------------
// Package protected ----------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-09-26 08:44:19 UTC (rev 3140)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-09-26 19:22:42 UTC (rev 3141)
@@ -114,7 +114,8 @@
int dupsOKBatchSize,
boolean supportsFailover,
boolean supportsLoadBalancing,
- LoadBalancingFactory loadBalancingFactory)
+ LoadBalancingFactory loadBalancingFactory,
+ boolean strictTck)
throws Exception
{
log.debug(this + " registering connection factory '" + uniqueName +
@@ -167,7 +168,7 @@
ClientConnectionFactoryDelegate localDelegate =
new ClientConnectionFactoryDelegate(uniqueName, id, serverPeer.getServerPeerID(),
- locatorURI, version, clientPing);
+ locatorURI, version, clientPing, strictTck);
log.debug(this + " created local delegate " + localDelegate);
More information about the jboss-cvs-commits
mailing list