[jboss-cvs] JBossAS SVN: r77381 - in projects/ejb3/trunk/testsuite: src/test/java/org/jboss/ejb3/test/clusteredsession/unit and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Aug 23 17:29:14 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-08-23 17:29:13 -0400 (Sat, 23 Aug 2008)
New Revision: 77381
Added:
projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-jboss-beans.xml
Removed:
projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-beans.xml
projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-service.xml
Modified:
projects/ejb3/trunk/testsuite/build-test.xml
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ForeignPartitionLocalInterceptorUnitTestCase.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/InvokeLocalTestBase.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ProxyTargetsUnitTestCase.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/SimpleIsLocalInterceptorUnitTestCase.java
projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/StatefulProxyFactoryLoadBalancingTestCase.java
projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/META-INF/ejb-jar.xml
Log:
[EJBTHREE-1469] Clustered session test updates
Modified: projects/ejb3/trunk/testsuite/build-test.xml
===================================================================
--- projects/ejb3/trunk/testsuite/build-test.xml 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/build-test.xml 2008-08-23 21:29:13 UTC (rev 77381)
@@ -4133,7 +4133,7 @@
<copy todir="${build.lib}">
<fileset dir="${resources}/test/clusteredsession/islocal/foreign">
- <include name="testlocal-beans.xml"/>
+ <include name="testlocal-jboss-beans.xml"/>
</fileset>
</copy>
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ForeignPartitionLocalInterceptorUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ForeignPartitionLocalInterceptorUnitTestCase.java 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ForeignPartitionLocalInterceptorUnitTestCase.java 2008-08-23 21:29:13 UTC (rev 77381)
@@ -48,7 +48,7 @@
public static Test suite() throws Exception
{
return getDeploySetup(ForeignPartitionLocalInterceptorUnitTestCase.class,
- "testlocal-beans.xml");
+ "testlocal-jboss-beans.xml");
}
@Override
@@ -77,22 +77,22 @@
public void testClusteredStatefulGoesRemote() throws Exception
{
- stayLocalTest("ClusteredStatefulRemote", false);
+ stayLocalTest("ClusteredStatefulRemote", false, false);
}
public void testClusteredStatelessGoesRemote() throws Exception
{
- stayLocalTest("ClusteredStatelessRemote", false);
+ stayLocalTest("ClusteredStatelessRemote", false, false);
}
public void testNonClusteredStatefulGoesRemote() throws Exception
{
- stayLocalTest("NonClusteredStatefulRemote", false);
+ stayLocalTest("NonClusteredStatefulRemote", false, true);
}
public void testNonClusteredStatelessGoesRemote() throws Exception
{
- stayLocalTest("NonClusteredStatelessRemote", false);
+ stayLocalTest("NonClusteredStatelessRemote", false, true);
}
private void cleanDeployments() throws Exception
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/InvokeLocalTestBase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/InvokeLocalTestBase.java 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/InvokeLocalTestBase.java 2008-08-23 21:29:13 UTC (rev 77381)
@@ -71,7 +71,7 @@
}
- protected void stayLocalTest(String jndiName, boolean expectLocal)
+ protected void stayLocalTest(String jndiName, boolean expectLocal, boolean expectLocalViaLookup)
throws Exception
{
String[] jndiURLs = getNamingURLs();
@@ -108,7 +108,7 @@
passThroughID = tester.getVMIDFromRemoteLookup(jndiURLs[1], jndiName);
assertNotNull("Got the remote VMID", passThroughID);
- if (expectLocal)
+ if (expectLocalViaLookup)
assertEquals("Call stayed local", local, passThroughID);
else
assertFalse("Call went remote", local.equals(passThroughID));
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ProxyTargetsUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ProxyTargetsUnitTestCase.java 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/ProxyTargetsUnitTestCase.java 2008-08-23 21:29:13 UTC (rev 77381)
@@ -48,7 +48,8 @@
private static boolean deployed0 = true;
private static boolean deployed1 = true;
- private static final String NAME_BASE= "jboss.j2ee:jar=";
+ private static final String NAME_BASE= "jboss.j2ee:ear=";
+ private static final String JAR_PREFIX = ",jar=";
private static final String deployment = "clusteredsession-test.jar";
private static final String BEAN_PREFIX = ",name=";
private static final String SLSB = "clusteredStateless";
@@ -72,7 +73,10 @@
private static String getFamilyName(String beanName)
{
- return NAME_BASE + deployment + BEAN_PREFIX + beanName + NAME_QUALIFIER;
+ // This commented out version is correct, but EJB3 isn't generating
+ // it any more, so we use a version that duplicates the deployment name
+// return NAME_BASE + deployment + BEAN_PREFIX + beanName + NAME_QUALIFIER;
+ return NAME_BASE + deployment + JAR_PREFIX + deployment + BEAN_PREFIX + beanName + NAME_QUALIFIER;
}
@Override
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/SimpleIsLocalInterceptorUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/SimpleIsLocalInterceptorUnitTestCase.java 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/SimpleIsLocalInterceptorUnitTestCase.java 2008-08-23 21:29:13 UTC (rev 77381)
@@ -50,22 +50,22 @@
public void testClusteredStatefulStaysLocal() throws Exception
{
- stayLocalTest("ClusteredStatefulRemote" ,true);
+ stayLocalTest("ClusteredStatefulRemote" ,true, true);
}
public void testClusteredStatelessStaysLocal() throws Exception
{
- stayLocalTest("ClusteredStatelessRemote" ,true);
+ stayLocalTest("ClusteredStatelessRemote" ,true, true);
}
public void testNonClusteredStatefulGoesRemote() throws Exception
{
- stayLocalTest("NonClusteredStatefulRemote", false);
+ stayLocalTest("NonClusteredStatefulRemote", false, true);
}
public void testNonClusteredStatelessGoesRemote() throws Exception
{
- stayLocalTest("NonClusteredStatelessRemote", false);
+ stayLocalTest("NonClusteredStatelessRemote", false, true);
}
}
Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/StatefulProxyFactoryLoadBalancingTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/StatefulProxyFactoryLoadBalancingTestCase.java 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/clusteredsession/unit/StatefulProxyFactoryLoadBalancingTestCase.java 2008-08-23 21:29:13 UTC (rev 77381)
@@ -39,7 +39,7 @@
*/
public class StatefulProxyFactoryLoadBalancingTestCase extends JBossClusteredTestCase
{
- public static final String TESTER_JNDI_NAME = "NonClusteredStatelessRemote";
+ public static final String TESTER_JNDI_NAME = "ClusteredStatefulRemote";
/**
* Create a new StatefulProxyFactoryLoadBalancingTestCase.
@@ -69,22 +69,22 @@
VMID create1 = tester1.getCreatorVMID();
// confirm that the bean didn't have to migrate
- assertEquals(create1, tester1.getVMID());
+ assertEquals("bean targeted where created", create1, tester1.getVMID());
// Get another bean from the same server; should target
// a different server from the first
VMTester tester2 = (VMTester) ctx1.lookup(TESTER_JNDI_NAME);
VMID create2 = tester2.getCreatorVMID();
- assertEquals(create2, tester2.getVMID());
- assertFalse(create1.equals(create2));
+ assertEquals("2nd bean targeted where created", create2, tester2.getVMID());
+ assertFalse("creation of 2 beans load balanced", create1.equals(create2));
// A third bean should come from the same as the first
VMTester tester3 = (VMTester) ctx1.lookup(TESTER_JNDI_NAME);
VMID create3 = tester3.getCreatorVMID();
- assertEquals(create3, tester3.getVMID());
- assertEquals(create1, create3);
+ assertEquals("3rd bean targeted where created", create3, tester3.getVMID());
+ assertEquals("creation of 3 beans load balanced", create1, create3);
// Get the next proxy from the other server, but the overall
// bean creation should still be round robin
@@ -96,15 +96,15 @@
VMTester tester4 = (VMTester) ctx2.lookup(TESTER_JNDI_NAME);
VMID create4 = tester4.getCreatorVMID();
- assertEquals(create4, tester4.getVMID());
- assertEquals(create2, create4);
+ assertEquals("4th bean targeted where created", create4, tester4.getVMID());
+ assertEquals("creation of 4 beans load balanced", create2, create4);
// One last time
VMTester tester5 = (VMTester) ctx2.lookup(TESTER_JNDI_NAME);
VMID create5 = tester5.getCreatorVMID();
- assertEquals(create5, tester5.getVMID());
- assertEquals(create1, create5);
+ assertEquals("5th bean targeted where created", create5, tester5.getVMID());
+ assertEquals("creation of 5 beans load balanced", create1, create5);
}
}
Modified: projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/META-INF/ejb-jar.xml 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/META-INF/ejb-jar.xml 2008-08-23 21:29:13 UTC (rev 77381)
@@ -8,28 +8,28 @@
<enterprise-beans>
<session>
<ejb-name>NonClusteredStateless</ejb-name>
- <remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</remote>
+ <business-remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</business-remote>
<ejb-class>org.jboss.ejb3.test.clusteredsession.islocal.VMTesterStatelessBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<ejb-name>ClusteredStateless</ejb-name>
- <remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</remote>
+ <business-remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</business-remote>
<ejb-class>org.jboss.ejb3.test.clusteredsession.islocal.VMTesterStatelessBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<ejb-name>NonClusteredStateful</ejb-name>
- <remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</remote>
+ <business-remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</business-remote>
<ejb-class>org.jboss.ejb3.test.clusteredsession.islocal.VMTesterStatefulBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<ejb-name>ClusteredStateful</ejb-name>
- <remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</remote>
+ <business-remote>org.jboss.ejb3.test.clusteredsession.islocal.VMTester</business-remote>
<ejb-class>org.jboss.ejb3.test.clusteredsession.islocal.VMTesterStatefulBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
Deleted: projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-beans.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-beans.xml 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-beans.xml 2008-08-23 21:29:13 UTC (rev 77381)
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="Ejb3IsLocalTestPartition"
- class="org.jboss.ha.framework.server.ClusterPartition">
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
-
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="cacheManager"><inject bean="CacheManager"/></property>
- <property name="cacheConfigName">ha-partition</property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">Ejb3IsLocalTestPartition</property>
-
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
-
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">30000</property>
-
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">60000</property>
-
- <property name="distributedReplicantManagerImpl">
- <bean name="Ejb3IsLocalTestDistributedReplicantManager"
- class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedReplicantManager,partitionName=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.DistributedReplicantManagerImplMBean.class, registerDirectly=true)</annotation>
- </bean>
- </property>
-
- <property name="distributedStateImpl">
- <bean name="Ejb3IsLocalTestDistributedState"
- class="org.jboss.ha.framework.server.DistributedStateImpl">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedState,partitionName=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.DistributedStateImplMBean.class, registerDirectly=true)</annotation>
- </bean>
- </property>
-
- </bean>
-
-</deployment>
\ No newline at end of file
Copied: projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-jboss-beans.xml (from rev 77255, projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-beans.xml)
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-jboss-beans.xml (rev 0)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-jboss-beans.xml 2008-08-23 21:29:13 UTC (rev 77381)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Ejb3IsLocalTestPartition"
+ class="org.jboss.ha.framework.server.ClusterPartition">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition</property>
+
+ <!-- Name of the partition being built -->
+ <property name="partitionName">Ejb3IsLocalTestPartition</property>
+
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
+
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
+
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">30000</property>
+
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">60000</property>
+
+ <property name="distributedReplicantManagerImpl">
+ <bean name="Ejb3IsLocalTestDistributedReplicantManager"
+ class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedReplicantManager,partitionName=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.DistributedReplicantManagerImplMBean.class, registerDirectly=true)</annotation>
+ </bean>
+ </property>
+
+ <property name="distributedStateImpl">
+ <bean name="Ejb3IsLocalTestDistributedState"
+ class="org.jboss.ha.framework.server.DistributedStateImpl">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedState,partitionName=Ejb3IsLocalTestPartition", exposedInterface=org.jboss.ha.framework.server.DistributedStateImplMBean.class, registerDirectly=true)</annotation>
+ </bean>
+ </property>
+
+ </bean>
+
+</deployment>
\ No newline at end of file
Deleted: projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-service.xml
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-service.xml 2008-08-23 14:35:33 UTC (rev 77380)
+++ projects/ejb3/trunk/testsuite/src/test/resources/test/clusteredsession/islocal/foreign/testlocal-service.xml 2008-08-23 21:29:13 UTC (rev 77381)
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Sample Clustering Service Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<server>
-
- <!-- ==================================================================== -->
- <!-- Cluster Partition: defines cluster -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.ha.framework.server.ClusterPartition"
- name="jboss:service=Ejb3IsLocalTestPartition">
-
- <!-- Name of the partition being built -->
- <attribute name="PartitionName">Ejb3IsLocalTestPartition</attribute>
-
- <!-- The address used to determine the node name -->
- <attribute name="NodeAddress">${jboss.bind.address}</attribute>
-
- <!-- Determine if deadlock detection is enabled -->
- <attribute name="DeadlockDetection">False</attribute>
-
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <attribute name="StateTransferTimeout">30000</attribute>
-
- <!-- The JGroups protocol configuration -->
- <attribute name="PartitionConfig">
- <!--
- The default UDP stack:
- - If you have a multihomed machine, set the UDP protocol's bind_addr attribute to the
- appropriate NIC IP address, e.g bind_addr="192.168.0.2".
- - On Windows machines, because of the media sense feature being broken with multicast
- (even after disabling media sense) set the UDP protocol's loopback attribute to true
- -->
- <Config>
- <UDP mcast_addr="${jboss.partition.udpGroup:228.3.3.3}"
- mcast_port="${jboss.hapartition.mcast_port:44444}"
- tos="8"
- ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
- mcast_recv_buf_size="25000000"
- mcast_send_buf_size="640000"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- use_outgoing_packet_handler="false"
- ip_ttl="${jgroups.udp.ip_ttl:2}"
- down_thread="false" up_thread="false"
- enable_bundling="false"/>
- <PING timeout="2000"
- down_thread="false" up_thread="false" num_initial_members="3"/>
- <MERGE2 max_interval="100000"
- down_thread="false" up_thread="false" min_interval="20000"/>
- <FD_SOCK down_thread="false" up_thread="false"/>
- <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
- <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- down_thread="false" up_thread="false"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"
- down_thread="false" up_thread="false"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- down_thread="false" up_thread="false"
- max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="3000"
- down_thread="false" up_thread="false"
- join_retry_timeout="2000" shun="true"
- view_bundling="true"/>
- <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
- <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
- </Config>
- </attribute>
- <depends>jboss:service=Naming</depends>
- </mbean>
-
-</server>
More information about the jboss-cvs-commits
mailing list