[jboss-cvs] JBossAS SVN: r98939 - in trunk: cluster/src/main/java/org/jboss/invocation/pooled and 19 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Dec 27 23:42:53 EST 2009
Author: bstansberry at jboss.com
Date: 2009-12-27 23:42:52 -0500 (Sun, 27 Dec 2009)
New Revision: 98939
Added:
trunk/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java
trunk/testsuite/src/resources/naming/services/unified-service.xml
Removed:
trunk/cluster/src/main/java/org/jboss/invocation/pooled/server/
trunk/server/src/main/java/org/jboss/invocation/pooled/interfaces/
trunk/server/src/main/java/org/jboss/invocation/pooled/server/
trunk/testsuite/imports/sections/pooled.xml
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/pooled/bean/
trunk/testsuite/src/main/org/jboss/test/pooled/interfaces/
trunk/testsuite/src/main/org/jboss/test/pooled/test/
trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml
trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml
trunk/testsuite/src/resources/naming/services/pooled-service.xml
trunk/testsuite/src/resources/pooled/META-INF/
trunk/testsuite/src/resources/pooled/client.policy
trunk/testsuite/src/resources/pooled/jboss-service.xml
trunk/testsuite/src/resources/test-configs/pooled-invoker/
Modified:
trunk/cluster/src/etc/ha-legacy-jboss-beans.xml
trunk/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml
trunk/server/src/etc/deploy/legacy-invokers-service.xml
trunk/testsuite/build.xml
trunk/testsuite/imports/sections/cluster.xml
trunk/testsuite/imports/sections/naming.xml
trunk/testsuite/imports/server-config.xml
trunk/testsuite/imports/test-jars.xml
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
trunk/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml
trunk/testsuite/src/resources/naming/services/naming-xmbean.xml
trunk/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
trunk/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
Log:
[JBAS-7563] Remove PooledInvoker and PooledInvokerHA
Modified: trunk/cluster/src/etc/ha-legacy-jboss-beans.xml
===================================================================
--- trunk/cluster/src/etc/ha-legacy-jboss-beans.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/cluster/src/etc/ha-legacy-jboss-beans.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -38,39 +38,6 @@
</bean>
<!-- ==================================================================== -->
- <!-- HA Detached Invoker using pooled socket-based transport -->
- <!-- ==================================================================== -->
-
- <bean name="PooledInvokerHA"
- class="org.jboss.invocation.pooled.server.PooledInvokerHA">
-
- <depends>jboss:service=TransactionManager</depends>
- <depends>HAPartition</depends>
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=invoker,type=pooledha", exposedInterface=org.jboss.invocation.pooled.server.PooledInvokerMBean.class, registerDirectly=true)</annotation>
-
- <property name="numAcceptThreads">1</property>
- <property name="maxPoolSize">300</property>
- <property name="clientMaxPoolSize">300</property>
- <property name="socketTimeout">60000</property>
- <property name="serverBindAddress">
- <!-- Get the interface from the ServiceBindingManager -->
- <value-factory bean="ServiceBindingManager" method="getStringBinding"
- parameter="jboss:service=invoker,type=pooledha"/>
- </property>
- <property name="serverBindPort">
- <!-- Get the port from the ServiceBindingManager -->
- <value-factory bean="ServiceBindingManager" method="getIntBinding"
- parameter="jboss:service=invoker,type=pooledha"/>
- </property>
- <property name="clientConnectAddress">${jboss.bind.address}</property>
- <property name="clientConnectPort">0</property>
- <property name="enableTcpNoDelay">false</property>
- <property name="transactionManagerService">jboss:service=TransactionManager</property>
-
- </bean>
-
- <!-- ==================================================================== -->
<!-- HA Detached Invoker using JBoss Remoting for transport -->
<!-- ==================================================================== -->
Modified: trunk/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -159,13 +159,6 @@
<property name="description">Socket for the legacy RMI/JRMP invoker</property>
</bean>
- <!-- Pooled invoker -->
- <bean class="org.jboss.services.binding.ServiceBindingMetadata">
- <property name="serviceName">jboss:service=invoker,type=pooled</property>
- <property name="port">4445</property>
- <property name="description">Socket for the legacy Pooled invoker</property>
- </bean>
-
<!-- ********************* deploy/cluster/hajndi-service.xml ****************** -->
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
Modified: trunk/server/src/etc/deploy/legacy-invokers-service.xml
===================================================================
--- trunk/server/src/etc/deploy/legacy-invokers-service.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/server/src/etc/deploy/legacy-invokers-service.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -31,31 +31,4 @@
<depends>jboss:service=TransactionManager</depends>
</mbean>
- <mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
- name="jboss:service=invoker,type=pooled">
- <attribute name="NumAcceptThreads">1</attribute>
- <attribute name="MaxPoolSize">300</attribute>
- <attribute name="ClientMaxPoolSize">300</attribute>
- <attribute name="SocketTimeout">300000</attribute>
- <attribute name="ServerBindAddress">
- <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=invoker,type=pooled"/>
- </attribute>
- <attribute name="ServerBindPort">
- <value-factory bean="ServiceBindingManager" method="getIntBinding" parameter="jboss:service=invoker,type=pooled"/>
- </attribute>
- <attribute name="ClientConnectAddress">
- <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=invoker,type=pooled"/>
- </attribute>
- <attribute name="ClientConnectPort">0</attribute>
- <attribute name="ClientRetryCount">1</attribute>
- <attribute name="EnableTcpNoDelay">false</attribute>
-
- <!-- Customized socket factory attributes
- <attribute name="ClientSocketFactoryName">custom.client.factory</attribute>
- <attribute name="ServerSocketFactoryName">custom.server.factory</attribute>
- <attribute name="SslDomain">java:/jaas/pooledInvoker</attribute>
- -->
- <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
- </mbean>
-
</server>
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/build.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1241,7 +1241,6 @@
-->
<antcall target="tests-aop-scoped" inheritRefs="true"/>
<antcall target="jrmp-invoker-tests" inheritRefs="true"/>
- <antcall target="pooled-invoker-tests" inheritRefs="true"/>
<antcall target="tests-clustered-profileservice" inheritRefs="true"/>
<antcall target="tests-web-profile" inheritRefs="true"/>
<antcall target="tests-jts" inheritRefs="true"/>
@@ -1522,29 +1521,6 @@
</target>
<!--
- | Tests ejb calls using the pooled invoker
- -->
- <target name="pooled-invoker-tests" depends="init"
- description="EJB tests using the jrmp invoker">
- <!-- Create the jrmp invoker enabled config -->
- <create-config baseconf="default" newconf="pooled-invoker">
- <patternset>
- <include name="conf/**"/>
- <include name="deployers/**"/>
- <include name="deploy/**"/>
- <include name="lib/**"/>
- </patternset>
- </create-config>
- <server:start name="pooled-invoker"/>
-
- <!-- This is pooled but we use the same tests as jrmp -->
- <run-junit junit.patternset="jrmp-invoker.includes"
- junit.configuration="Pooled-Invoker" />
-
- <server:stop name="pooled-invoker"/>
- </target>
-
- <!--
| Tests DeploymentService
-->
<target name="deployment-service-tests"
@@ -3895,37 +3871,7 @@
<test-compatibility client-version="5_1_0_GA" label="16c-16s" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
<test-compatibility client-version="5_2_x" label="16c-16s" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
<test-compatibility client-version="6_0_x" label="16c-16s" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <!-- testing interoperating with clients using the pooled invokers -->
- <test-compatibility-pooled-invokers label="16c-16s" client-version="4_2_3_GA" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="4_2_x" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="5_0_0_GA" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="5_0_1_GA" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="5_0_x" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="5_1_0_GA" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="5_2_x" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
- <test-compatibility-pooled-invokers label="16c-16s" client-version="6_0_x" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
</target>
-
- <macrodef name="test-compatibility-pooled-invokers">
- <attribute name="client-version"/>
- <attribute name="label"/>
- <attribute name="client-jdk"/>
- <attribute name="server-jdk"/>
- <attribute name="client-serialization-flag"/>
- <attribute name="serialization-flag"/>
- <sequential>
- <start-jboss conf="default" jvmargs="-Xmx128m -Xmx512m -XX:MaxPermSize=512m @{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
- <wait-on-host/>
- <antcall target="tests-standard-unit-matrix-version-pooled" inheritRefs="true">
- <param name="matrix-configuration" value="@{client-version}-@{label}"/>
- <param name="junit-jvm-command" value="@{client-jdk}/bin/java"/>
- <param name="current-version-dir" value="${matrix-versions}/@{client-version}"/>
- <param name="client-serialization-flag" value="@{client-serialization-flag}"/>
- </antcall>
- <stop-jboss jvmargs="@{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
- <sleep seconds="240"/>
- </sequential>
- </macrodef>
<macrodef name="test-compatibility">
<attribute name="client-version"/>
@@ -3954,10 +3900,6 @@
<execute-matrix-unit test-name="cmp2" parameter-filter="org/jboss/test/cmp2/**/*TestCase.class"/>
</target>
- <target name="tests-standard-unit-matrix-version-pooled">
- <execute-matrix-unit test-name="pooled-invoker" parameter-filter="org/jboss/test/pooled/test/**/BeanStressTestCase.class"/>
- </target>
-
<macrodef name="execute-matrix-unit">
<attribute name="test-name"/>
<attribute name="parameter-filter"/>
Modified: trunk/testsuite/imports/sections/cluster.xml
===================================================================
--- trunk/testsuite/imports/sections/cluster.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/imports/sections/cluster.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -944,19 +944,6 @@
<include name="cif-ds.xml"/>
</fileset-->
</ear>
-
- <jar destfile="${build.lib}/pooledha.jar">
- <fileset dir="${build.classes}">
- <include name="org/jboss/test/testbean/interfaces/**"/>
- <include name="org/jboss/test/testbean/bean/**"/>
- <include name="org/jboss/test/cluster/ejb2/basic/interfaces/**"/>
- <include name="org/jboss/test/cluster/ejb2/basic/bean/**"/>
- </fileset>
- <zipfileset dir="${build.resources}/cluster/ejb2/basic"
- fullpath="META-INF/ejb-jar.xml" includes="pooledha-ejb-jar.xml"/>
- <zipfileset dir="${build.resources}/cluster/ejb2/basic"
- fullpath="META-INF/jboss.xml" includes="pooledha-jboss.xml"/>
- </jar>
</target>
Modified: trunk/testsuite/imports/sections/naming.xml
===================================================================
--- trunk/testsuite/imports/sections/naming.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/imports/sections/naming.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -93,11 +93,11 @@
</fileset>
</jar>
- <!-- A pooled invoker test sar -->
- <jar destfile="${build.lib}/naming-pooled.sar">
+ <!-- A unified invoker test sar -->
+ <jar destfile="${build.lib}/naming-unified.sar">
<zipfileset dir="${build.resources}/naming/services"
fullpath="META-INF/jboss-service.xml">
- <include name="pooled-service.xml"/>
+ <include name="unified-service.xml"/>
</zipfileset>
<fileset dir="${build.resources}/naming/services">
<include name="naming-xmbean.xml"/>
Deleted: trunk/testsuite/imports/sections/pooled.xml
===================================================================
--- trunk/testsuite/imports/sections/pooled.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/imports/sections/pooled.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,37 +0,0 @@
-<project name="tests-pooled-jars">
-
- <!-- pooled test -->
- <target name="_jars-pooled">
- <mkdir dir="${build.lib}"/>
-
- <!-- build pooledtest.jar -->
- <jar destfile="${build.lib}/pooledtest.jar">
- <fileset dir="${build.classes}">
- <patternset refid="common.test.client.classes"/>
- <include name="org/jboss/test/pooled/interfaces/**"/>
- <include name="org/jboss/test/pooled/test/**"/>
- <include name="org/somepackage/**"/>
- </fileset>
- <fileset dir="${build.resources}/pooled">
- <include name="*.*"/>
- </fileset>
- </jar>
-
- <!-- build pooled.jar -->
- <jar destfile="${build.lib}/pooled.jar">
- <fileset dir="${build.classes}">
- <patternset refid="jboss.test.util.ejb.set"/>
- <include name="org/jboss/test/pooled/interfaces/**"/>
- <include name="org/jboss/test/pooled/bean/**"/>
- <include name="org/somepackage/**"/>
- </fileset>
- <fileset dir="${build.resources}/pooled">
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="${build.resources}/test-configs/tomcat-ssl/conf">
- <include name="localhost.keystore"/>
- </fileset>
- </jar>
-
- </target>
-</project>
Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/imports/server-config.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -774,13 +774,6 @@
<jvmarg value="-XX:-UseGCOverheadLimit" />
<sysproperty key="java.net.preferIPv4Stack" value="true" />
</server>
- <server name="pooled-invoker" host="${node0}">
- <jvmarg value="-Xms128m" />
- <jvmarg value="-Xmx512m" />
- <jvmarg value="-XX:MaxPermSize=128m" />
- <jvmarg value="-XX:-UseGCOverheadLimit" />
- <sysproperty key="java.net.preferIPv4Stack" value="true" />
- </server>
<server name="minimal" host="${node0}" hasWebServer="false">
<sysproperty key="jboss.vfs.forceNoReaper" value="true" />
</server>
Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/imports/test-jars.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -58,7 +58,6 @@
<import file="sections/mdbsessionpoolclear.xml"/>
<import file="sections/naming.xml"/>
<import file="sections/perf.xml"/>
- <import file="sections/pooled.xml"/>
<import file="sections/profileservice.xml"/>
<import file="sections/proxycompiler.xml"/>
<import file="sections/readahead.xml"/>
@@ -154,7 +153,6 @@
_jars-messagedriven,
_jars-naming,
_jars-perf,
- _jars-pooled,
_jars-profileservice,
_jars-proxycompiler,
_jars-readahead,
Deleted: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,272 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.cluster.defaultcfg.ejb2.test;
-
-import java.util.Date;
-import java.util.Properties;
-import java.io.ObjectOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.jboss.test.JBossClusteredTestCase;
-import org.jboss.test.cluster.ejb2.basic.interfaces.NodeAnswer;
-import org.jboss.test.cluster.ejb2.basic.interfaces.StatefulSession;
-import org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSession;
-import org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSessionHome;
-import org.jboss.test.testbean.interfaces.StatefulSessionHome;
-import org.jboss.invocation.pooled.interfaces.PooledInvokerProxy;
-import org.jboss.invocation.pooled.interfaces.ServerAddress;
-import junit.framework.Test;
-
-/**
- * Tests of stateless/stateful HA behavior using the pooled invoker
- *
- * @author <a href="mailto:sacha.labourey at jboss.org">Sacha Labourey</a>.
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PooledHAUnitTestCase extends JBossClusteredTestCase
-{
- static boolean deployed = false;
- static Date startDate = new Date();
-
- protected final String namingFactory =
- System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
-
- protected final String providerURL =
- System.getProperty(Context.PROVIDER_URL);
-
- public PooledHAUnitTestCase (String name)
- {
- super(name);
- }
-
- public static Test suite() throws Exception
- {
- Test t1 = JBossClusteredTestCase.getDeploySetup(PooledHAUnitTestCase.class, "pooledha.jar");
- return t1;
- }
-
- /**
- * Test the equals/hashCode behavior for ServerAddress
- * @throws Exception
- */
- public void testServerAddressHashEquals()
- throws Exception
- {
- ServerAddress sa1 = new ServerAddress("127.0.0.1", 4445, false, 60, null);
- ServerAddress sa2 = new ServerAddress("127.0.0.1", 4445, false, 61, null);
- assertEquals(sa1, sa2);
- assertEquals(sa1.hashCode(), sa2.hashCode());
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(sa1);
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- ObjectInputStream ois = new ObjectInputStream(bais);
- sa2 = (ServerAddress) ois.readObject();
- assertEquals(sa1, sa2);
- assertEquals(sa1.hashCode(), sa2.hashCode());
-
- // Different tcpNoDelay should not be equal
- sa2 = new ServerAddress("127.0.0.1", 4445, true, 61, null);
- assertNotSame(sa1, sa2);
- // Different ports should not be equal
- sa2 = new ServerAddress("127.0.0.1", 4446, false, 60, null);
- assertNotSame(sa1, sa2);
- // Different host should not be equal
- sa2 = new ServerAddress("127.0.0.2", 4445, false, 60, null);
- assertNotSame(sa1, sa2);
- }
-
- public void testStatelessBeanLoadBalancing()
- throws Exception
- {
- log.debug("testStatelessBeanLoadBalancing - Trying the context...");
-
- // Connect to the server0 JNDI
- String[] urls = getNamingURLs();
- Properties env1 = new Properties();
- env1.setProperty(Context.INITIAL_CONTEXT_FACTORY,
- "org.jnp.interfaces.NamingContextFactory");
- env1.setProperty(Context.PROVIDER_URL, urls[0]);
- InitialContext ctx = new InitialContext(env1);
-
- log.debug("Looking up the home pooledha_StatelessSession..."+urls[0]);
- StatelessSessionHome homeHA =
- (StatelessSessionHome) ctx.lookup("pooledha_StatelessSession");
- log.debug("Looking up the home pooled_StatelessSession..."+urls[0]);
- StatelessSessionHome home =
- (StatelessSessionHome) ctx.lookup("pooled_StatelessSession");
-
- // Simple connection count stress test
- PooledInvokerProxy.clearStats();
- PooledInvokerProxy.clearPools();
- for(int n = 0; n < 100; n ++)
- {
- StatelessSession tmp = homeHA.create();
- StatelessSession tmp2 = home.create();
- tmp.getCallCount();
- tmp2.getCallCount();
- tmp.getCallCount();
- tmp2.getCallCount();
- int totalCount = PooledInvokerProxy.getTotalPoolCount();
- // N cluster nodes + 1 for unclustered
- int expectedCount = urls.length + 1;
- assertEquals("TotalPoolCount", expectedCount, totalCount);
- long usedPooled = PooledInvokerProxy.getUsedPooled();
- // iter * Ncalls - expectedCount (for the initial conn creation)
- int expectedUsedPooled = (n+1) * 6 - expectedCount;
- assertEquals("UsedPooled", expectedUsedPooled, usedPooled);
- }
- long inUseCount = PooledInvokerProxy.getInUseCount();
- assertEquals("InUseCount", 0, inUseCount);
-
- log.debug("Calling create on StatelessSessionHome...");
- StatelessSession statelessSession = homeHA.create();
- assertTrue("homeHA.create() != null", statelessSession != null);
- log.debug("Calling getEJBHome() on StatelessSession...");
- assertTrue("statelessSession.getEJBHome() != null", statelessSession.getEJBHome() != null);
-
- log.debug("Reseting the number of calls made on beans (making 2 calls)... ");
- for (int i=0; i<6; i++)
- {
- log.debug("Reseting number... ");
- statelessSession.resetNumberOfCalls ();
- }
-
- log.debug("- "+"Now making 20 calls on this remote... ");
- for (int i=0; i<20; i++)
- {
- log.debug("- "+" Calling remote... ");
- statelessSession.makeCountedCall ();
- }
-
- log.debug("- "+"Getting the number of calls that have been performed on each bean... ");
- long node1 = statelessSession.getCallCount();
- log.debug("- "+"One node has received: " + node1);
-
- long node2 = statelessSession.getCallCount();
- log.debug("- "+"The other node has received: " + node2);
-
- if (node1 == node2 && node1 == 10)
- {
- log.debug("- "+"Test is ok.");
- }
- else if( urls.length > 1 )
- {
- log.debug("- "+"Something wrong has happened! Calls seems not to have been load-balanced.");
- fail ("call count mismatch: "+node1+" != "+node2);
- }
-
- statelessSession.remove();
- log.debug("ok");
- }
-
- public void testStatefulBeanFailover()
- throws Exception
- {
- log.debug("testStatelessBeanLoadBalancing - Trying the context...");
-
- // Connect to the server0 JNDI
- String[] urls = getNamingURLs();
- Properties env1 = new Properties();
- env1.setProperty(Context.INITIAL_CONTEXT_FACTORY,
- "org.jnp.interfaces.NamingContextFactory");
- env1.setProperty(Context.PROVIDER_URL, urls[0]);
- InitialContext ctx = new InitialContext(env1);
-
- log.debug("Looking up the home pooledha_StatefulSession..."+urls[0]);
- StatefulSessionHome homeHA =
- (StatefulSessionHome) ctx.lookup("pooledha_StatefulSession");
- log.debug("Looking up the home pooled_StatelessSession..."+urls[0]);
- StatelessSessionHome home =
- (StatelessSessionHome) ctx.lookup("pooled_StatelessSession");
-
- // Simple connection count stress test
- PooledInvokerProxy.clearStats();
- PooledInvokerProxy.clearPools();
- for(int n = 0; n < 100; n ++)
- {
- StatefulSession tmp = (StatefulSession) homeHA.create();
- tmp.remove();
- tmp = (StatefulSession) homeHA.create();
- StatelessSession tmp2 = home.create();
- tmp.getNodeState();
- tmp2.getCallCount();
- tmp.getNodeState();
- tmp2.getCallCount();
- tmp.remove();
- int totalCount = PooledInvokerProxy.getTotalPoolCount();
- // N cluster nodes + 1 for unclustered
- int expectedCount = urls.length + 1;
- assertEquals("TotalPoolCount", expectedCount, totalCount);
- long usedPooled = PooledInvokerProxy.getUsedPooled();
- // iter * Ncalls - expectedCount (for the initial conn creation)
- int expectedUsedPooled = (n+1) * 9 - expectedCount;
- assertEquals("UsedPooled", expectedUsedPooled, usedPooled);
- }
- long inUseCount = PooledInvokerProxy.getInUseCount();
- assertEquals("InUseCount", 0, inUseCount);
-
- log.debug("Test Stateful Bean Failover");
- log.debug("Looking up the home nextgen.StatefulSession...");
- log.debug("Calling create on StatefulSessionHome...");
- StatefulSession statefulSession =
- (StatefulSession)homeHA.create("Bupple-Dupple");
- assertTrue("statefulSessionHome.create() != null", statefulSession != null);
-
- NodeAnswer node1 = statefulSession.getNodeState ();
- getLog ().debug (node1);
-
- // Now we switch to the other node, simulating a failure on node 1
- System.setProperty ("JBossCluster-DoFail", "once");
- NodeAnswer node2 = statefulSession.getNodeState ();
- log.debug (node2);
- assertEquals("Value is identical on replicated node1", "Bupple-Dupple", node1.answer);
- assertEquals("Value is identical on replicated node2", "Bupple-Dupple", node2.answer);
-
- // we change our name to see if it replicates to node 1
- statefulSession.setName ("Changed");
-
- // now we travel back on node 1
- System.setProperty ("JBossCluster-DoFail", "once");
- node1 = statefulSession.getNodeState ();
- log.debug(node1);
-
- assertEquals("Value is identical on replicated node1", "Changed", node1.answer);
- node2 = statefulSession.getNodeState ();
- log.debug(node2);
- assertEquals("Value is identical on replicated node2", "Changed", node2.answer);
-
- statefulSession.remove();
-
- int totalCount = PooledInvokerProxy.getTotalPoolCount();
- // N cluster nodes + 1 for unclustered
- int expectedCount = urls.length + 1;
- assertEquals("TotalPoolCount", expectedCount, totalCount);
- }
-}
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -63,12 +63,6 @@
haProxyFailoverTest("jmx/HAServiceUnified");
}
- public void testPooledHAProxyFailover()
- throws Exception
- {
- haProxyFailoverTest("jmx/HAServicePooled");
- }
-
public void testHttpHAProxyFailover()
throws Exception
{
Deleted: trunk/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,158 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.naming.test;
-
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NameAlreadyBoundException;
-import javax.naming.NameClassPair;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-import junit.framework.Test;
-import org.jboss.test.JBossTestCase;
-
-/** Simple unit tests for the jndi service using the pooled invoker as the
- * transport detached invoker.
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PooledInvokerUnitTestCase extends JBossTestCase
-{
- /**
- * Constructor for the SimpleUnitTestCase object
- *
- * @param name Test name
- */
- public PooledInvokerUnitTestCase(String name)
- {
- super(name);
- }
-
- /**
- * Tests that the second time you create a subcontext you get an exception.
- *
- * @exception Exception Description of Exception
- */
- public void testCreateSubcontext() throws Exception
- {
- getLog().debug("+++ testCreateSubcontext");
- Properties env = new Properties();
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
- env.setProperty("jnp.disableDiscovery", "true");
- InitialContext ctx = new InitialContext(env);
- ctx.createSubcontext("foo");
- try
- {
- ctx.createSubcontext("foo");
- fail("Second createSubcontext(foo) did NOT fail");
- }
- catch (NameAlreadyBoundException e)
- {
- getLog().debug("Second createSubcontext(foo) failed as expected");
- }
- ctx.createSubcontext("foo/bar");
- ctx.unbind("foo/bar");
- ctx.unbind("foo");
- }
-
- /** Lookup a name to test basic connectivity and lookup of a known name
- *
- * @throws Exception
- */
- public void testLookup() throws Exception
- {
- getLog().debug("+++ testLookup");
- Properties env = new Properties();
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
- env.setProperty("jnp.disableDiscovery", "true");
- InitialContext ctx = new InitialContext(env);
- Object obj = ctx.lookup("");
- getLog().debug("lookup('') = "+obj);
- }
-
- public void testListing() throws Exception
- {
- log.debug("+++ testListing");
- InitialContext ctx = getInitialContext();
- NamingEnumeration names = ctx.list("");
- int count = 0;
- while( names.hasMore() )
- {
- NameClassPair ncp = (NameClassPair) names.next();
- log.info(ncp);
- count ++;
- }
- log.info("list count = "+count);
- assertTrue("list count > 0 ", count > 0);
- }
-
- /** Lookup a name to test basic connectivity and lookup of a known name
- *
- * @throws Exception
- */
- public void testLookupFailures() throws Exception
- {
- log.debug("+++ testLookupFailures");
- // Look a name that does not exist
- Properties env = new Properties();
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
- env.setProperty("jnp.disableDiscovery", "true");
- InitialContext ctx = new InitialContext(env);
- try
- {
- Object obj = ctx.lookup("__bad_name__");
- fail("lookup(__bad_name__) should have thrown an exception, obj="+obj);
- }
- catch(NameNotFoundException e)
- {
- log.debug("lookup(__bad_name__) failed as expected", e);
- }
-
- // Do a lookup on an server port that does not exist
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.PROVIDER_URL, "jnp://localhost:65535/");
- env.setProperty("jnp.disableDiscovery", "true");
- log.debug("Creating InitialContext with env="+env);
- try
- {
- ctx = new InitialContext(env);
- Object obj = ctx.lookup("");
- fail("lookup('') should have thrown an exception, obj="+obj);
- }
- catch(NamingException e)
- {
- log.debug("lookup('') failed as expected", e);
- }
- }
-
- public static Test suite() throws Exception
- {
- return getDeploySetup(PooledInvokerUnitTestCase.class, "naming-pooled.sar");
- }
-
-}
Copied: trunk/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java (from rev 98937, trunk/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java)
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.naming.test;
+
+import java.util.Properties;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+import junit.framework.Test;
+import org.jboss.test.JBossTestCase;
+
+/** Simple unit tests for the jndi service using the pooled invoker as the
+ * transport detached invoker.
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class UnifiedInvokerUnitTestCase extends JBossTestCase
+{
+ /**
+ * Constructor for the SimpleUnitTestCase object
+ *
+ * @param name Test name
+ */
+ public UnifiedInvokerUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ /**
+ * Tests that the second time you create a subcontext you get an exception.
+ *
+ * @exception Exception Description of Exception
+ */
+ public void testCreateSubcontext() throws Exception
+ {
+ getLog().debug("+++ testCreateSubcontext");
+ Properties env = new Properties();
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
+ env.setProperty("jnp.disableDiscovery", "true");
+ InitialContext ctx = new InitialContext(env);
+ ctx.createSubcontext("foo");
+ try
+ {
+ ctx.createSubcontext("foo");
+ fail("Second createSubcontext(foo) did NOT fail");
+ }
+ catch (NameAlreadyBoundException e)
+ {
+ getLog().debug("Second createSubcontext(foo) failed as expected");
+ }
+ ctx.createSubcontext("foo/bar");
+ ctx.unbind("foo/bar");
+ ctx.unbind("foo");
+ }
+
+ /** Lookup a name to test basic connectivity and lookup of a known name
+ *
+ * @throws Exception
+ */
+ public void testLookup() throws Exception
+ {
+ getLog().debug("+++ testLookup");
+ Properties env = new Properties();
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
+ env.setProperty("jnp.disableDiscovery", "true");
+ InitialContext ctx = new InitialContext(env);
+ Object obj = ctx.lookup("");
+ getLog().debug("lookup('') = "+obj);
+ }
+
+ public void testListing() throws Exception
+ {
+ log.debug("+++ testListing");
+ InitialContext ctx = getInitialContext();
+ NamingEnumeration names = ctx.list("");
+ int count = 0;
+ while( names.hasMore() )
+ {
+ NameClassPair ncp = (NameClassPair) names.next();
+ log.info(ncp);
+ count ++;
+ }
+ log.info("list count = "+count);
+ assertTrue("list count > 0 ", count > 0);
+ }
+
+ /** Lookup a name to test basic connectivity and lookup of a known name
+ *
+ * @throws Exception
+ */
+ public void testLookupFailures() throws Exception
+ {
+ log.debug("+++ testLookupFailures");
+ // Look a name that does not exist
+ Properties env = new Properties();
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.PROVIDER_URL, "jnp://localhost:10999/");
+ env.setProperty("jnp.disableDiscovery", "true");
+ InitialContext ctx = new InitialContext(env);
+ try
+ {
+ Object obj = ctx.lookup("__bad_name__");
+ fail("lookup(__bad_name__) should have thrown an exception, obj="+obj);
+ }
+ catch(NameNotFoundException e)
+ {
+ log.debug("lookup(__bad_name__) failed as expected", e);
+ }
+
+ // Do a lookup on an server port that does not exist
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.PROVIDER_URL, "jnp://localhost:65535/");
+ env.setProperty("jnp.disableDiscovery", "true");
+ log.debug("Creating InitialContext with env="+env);
+ try
+ {
+ ctx = new InitialContext(env);
+ Object obj = ctx.lookup("");
+ fail("lookup('') should have thrown an exception, obj="+obj);
+ }
+ catch(NamingException e)
+ {
+ log.debug("lookup('') failed as expected", e);
+ }
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(UnifiedInvokerUnitTestCase.class, "naming-unified.sar");
+ }
+
+}
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -353,13 +353,12 @@
offsets.put(name, getSimpleValue(mv, "portOffset", Integer.class));
hosts.put(name, getSimpleValue(mv, "defaultHostName", String.class));
}
- //FIXME Using a fixed count of expected # of bindings is stupid; it changes whenever
- // new stuff is added or old stuff removed
- IndexedArray indexedArray = checkAddedBinding(properties, 27, 23456, offsets, hosts);
+ checkAddedBinding(properties, 23456, offsets, hosts);
+
}
- private IndexedArray checkAddedBinding(Map<String, ManagedProperty> properties, int bindingCount, int basePort, Map<String, Integer> offsets, Map<String, String> hosts)
+ private IndexedArray checkAddedBinding(Map<String, ManagedProperty> properties, int basePort, Map<String, Integer> offsets, Map<String, String> hosts)
{
// Return the array of standard bindings + the pos of the added binding
IndexedArray result = new IndexedArray();
@@ -372,7 +371,11 @@
assertNotNull("property standardBindings has no value", val);
assertTrue("property standardBindings value is CollectionValue", val instanceof CollectionValue);
MetaValue[] refreshedElements = ((CollectionValue) val).getElements();
- assertEquals(bindingCount, refreshedElements.length);
+ // FIXME Using a fixed count of expected # of bindings is stupid; it changes whenever
+ // new stuff is added or old stuff removed. Here we just confirm there are a
+ // reasonable # of bindings (as of 12/2009 there are > 25) which is also stupid
+ // but a bit less so
+ assertTrue(refreshedElements.length > 10);
result.array = refreshedElements; // pass back to caller
boolean sawAdded = false;
for (int i = 0; i < refreshedElements.length; i++)
Modified: trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -40,6 +40,15 @@
import java.io.IOException;
/**
+ * Test for JBAS-3198.
+ *
+ * NOTE: Brian Stansberry 2009/12/27. This test was originally created for use
+ * with the PooledInvoker as part of a test of https://jira.jboss.org/jira/browse/JBAS-3198.
+ * As part of removing the PooledInvoker I am changing it to use the UnifiedInvoker.
+ * It's possible the correct thing to do is remove the test altogether, but as I'm not
+ * 100% certain there's another UnifiedInvoker test covering this exact usage, I'm
+ * being conservative.
+ *
* @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
*/
public class ScopedBUnitTestCase extends JBossTestCase
Modified: trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java 2009-12-28 04:42:52 UTC (rev 98939)
@@ -21,42 +21,35 @@
*/
package org.jboss.test.scoped.test;
-import org.jboss.deployment.EARDeployerMBean;
-import org.jboss.test.JBossTestCase;
-import org.jboss.test.scoped.interfaces.a.SessionA;
-import org.jboss.test.scoped.interfaces.a.SessionAHome;
-import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
-import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
-import org.jboss.test.scoped.interfaces.b.SessionBHome;
-import org.jboss.test.scoped.interfaces.b.SessionB;
-
-import javax.management.Attribute;
import java.io.File;
-import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.IOException;
-import java.net.URL;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.framework.Test;
-
-import org.jboss.mx.loading.UnifiedLoaderRepository3;
-import org.jboss.mx.loading.RepositoryClassLoader;
-import org.jboss.test.util.ClassMover;
-import org.apache.log4j.Logger;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtField;
-import javassist.Modifier;
import javassist.CtMethod;
import javassist.CtNewMethod;
+import javassist.Modifier;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.scoped.interfaces.a.SessionA;
+import org.jboss.test.scoped.interfaces.a.SessionAHome;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+
/**
+ * Test for JBAS-3198.
+ *
+ * NOTE: Brian Stansberry 2009/12/27. This test was originally created for use
+ * with the PooledInvoker as part of a test of https://jira.jboss.org/jira/browse/JBAS-3198.
+ * As part of removing the PooledInvoker I am changing it to use the UnifiedInvoker.
+ * It's possible the correct thing to do is remove the test altogether, but as I'm not
+ * 100% certain there's another UnifiedInvoker test covering this exact usage, I'm
+ * being conservative.
+ *
* @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
*/
public class ScopedUnitTestCase extends JBossTestCase
@@ -204,9 +197,9 @@
}
- private void isolateDeployments(Boolean value) throws Exception
- {
- //getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("Isolated", value));
- getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("CallByValue", value));
- }
+// private void isolateDeployments(Boolean value) throws Exception
+// {
+// //getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("Isolated", value));
+// getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("CallByValue", value));
+// }
}
Deleted: trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE ejb-jar
- PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
- "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
-
-<ejb-jar>
- <enterprise-beans>
-
- <session>
- <description>Stateless session bean</description>
- <ejb-name>pooledha_StatelessSession</ejb-name>
- <home>org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSessionHome</home>
- <remote>org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSession</remote>
- <ejb-class>org.jboss.test.cluster.ejb2.basic.bean.StatelessSessionBean</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Container</transaction-type>
- </session>
- <session>
- <description>Stateless session bean</description>
- <ejb-name>pooled_StatelessSession</ejb-name>
- <home>org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSessionHome</home>
- <remote>org.jboss.test.cluster.ejb2.basic.interfaces.StatelessSession</remote>
- <ejb-class>org.jboss.test.cluster.ejb2.basic.bean.StatelessSessionBean</ejb-class>
- <session-type>Stateless</session-type>
- <transaction-type>Container</transaction-type>
- </session>
-
- <session>
- <description>Stateful session bean</description>
- <ejb-name>pooledha_StatefulSession</ejb-name>
- <home>org.jboss.test.testbean.interfaces.StatefulSessionHome</home>
- <remote>org.jboss.test.cluster.ejb2.basic.interfaces.StatefulSession</remote>
- <ejb-class>org.jboss.test.cluster.ejb2.basic.bean.StatefulSessionBean</ejb-class>
- <session-type>Stateful</session-type>
- <transaction-type>Container</transaction-type>
- </session>
- </enterprise-beans>
-
- <assembly-descriptor>
-
- <container-transaction>
- <method>
- <ejb-name>pooledha_StatelessSession</ejb-name>
- <method-name>*</method-name>
- </method>
- <method>
- <ejb-name>pooledha_StatefulSession</ejb-name>
- <method-name>*</method-name>
- </method>
- <trans-attribute>Required</trans-attribute>
- </container-transaction>
-
- </assembly-descriptor>
-</ejb-jar>
Deleted: trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss PUBLIC
- "-//JBoss//DTD JBOSS 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
-
-<jboss>
-
- <enterprise-beans>
- <session>
- <ejb-name>pooledha_StatelessSession</ejb-name>
- <configuration-name>Pooled Stateless SessionBean</configuration-name>
- <invoker-bindings>
- <invoker>
- <invoker-proxy-binding-name>pooledha-stateless-invoker</invoker-proxy-binding-name>
- <jndi-name>pooledha_StatelessSession</jndi-name>
- </invoker>
- </invoker-bindings>
- <clustered>true</clustered>
- </session>
- <session>
- <ejb-name>pooled_StatelessSession</ejb-name>
- <invoker-bindings>
- <invoker>
- <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
- <jndi-name>pooled_StatelessSession</jndi-name>
- </invoker>
- </invoker-bindings>
- </session>
- <session>
- <ejb-name>pooledha_StatefulSession</ejb-name>
- <configuration-name>Pooled Stateful SessionBean</configuration-name>
- <invoker-bindings>
- <invoker>
- <invoker-proxy-binding-name>pooledha-stateful-invoker</invoker-proxy-binding-name>
- <jndi-name>pooledha_StatefulSession</jndi-name>
- </invoker>
- </invoker-bindings>
- <clustered>true</clustered>
- </session>
-
- </enterprise-beans>
-
- <invoker-proxy-bindings>
- <!-- Override default clustered invoker bindings -->
- <invoker-proxy-binding>
- <name>pooledha-stateless-invoker</name>
- <invoker-mbean>jboss:service=invoker,type=pooledha</invoker-mbean>
- <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>
- <proxy-factory-config>
- <client-interceptors exposeContainer="true">
- <home>
- <interceptor>org.jboss.ha.framework.test.ExplicitFailoverClientInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </home>
- <bean>
- <interceptor>org.jboss.ha.framework.test.ExplicitFailoverClientInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </bean>
- </client-interceptors>
- </proxy-factory-config>
- </invoker-proxy-binding>
-
- <invoker-proxy-binding>
- <name>pooledha-stateful-invoker</name>
- <invoker-mbean>jboss:service=invoker,type=pooledha</invoker-mbean>
- <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>
- <proxy-factory-config>
- <client-interceptors exposeContainer="true">
- <home>
- <interceptor>org.jboss.ha.framework.test.ExplicitFailoverClientInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </home>
- <bean>
- <interceptor>org.jboss.ha.framework.test.ExplicitFailoverClientInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.StatefulSessionInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </bean>
- </client-interceptors>
- </proxy-factory-config>
- </invoker-proxy-binding>
-
- <invoker-proxy-binding>
- <name>stateless-pooled-invoker</name>
- <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
- <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
- <proxy-factory-config>
- <client-interceptors>
- <home>
- <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </home>
- <bean>
- <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.proxy.ejb.SecurityContextInterceptor</interceptor>
- <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </bean>
- </client-interceptors>
- </proxy-factory-config>
- </invoker-proxy-binding>
-
- </invoker-proxy-bindings>
-
- <container-configurations>
- <container-configuration extends="Clustered Stateless SessionBean">
- <container-name>Pooled Stateless SessionBean</container-name>
- <invoker-proxy-binding-name>pooledha-stateless-invoker</invoker-proxy-binding-name>
- </container-configuration>
- <container-configuration extends="Clustered Stateful SessionBean">
- <container-name>Pooled Stateful SessionBean</container-name>
- <invoker-proxy-binding-name>pooledha-stateful-invoker</invoker-proxy-binding-name>
- </container-configuration>
- </container-configurations>
-</jboss>
Modified: trunk/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -94,47 +94,6 @@
on the service name. -->
<mbean code="org.jboss.proxy.generic.ProxyFactoryHA"
- name="jboss.test:service=ProxyFactory,name=HAService,protocol=pooledha">
-
- <attribute name="Partition"><inject bean="HAPartition"/></attribute>
-
- <depends>jboss:service=invoker,type=pooledha</depends>
- <attribute name="InvokerName">jboss:service=invoker,type=pooledha</attribute>
-
- <attribute name="LoadBalancePolicy">org.jboss.ha.framework.interfaces.RoundRobin</attribute>
-
- <depends optional-attribute-name="TargetName">jboss.test:service=HAService,type=pooledha</depends>
-
- <!-- Directly invoke the target method, not invoke() -->
- <attribute name="InvokeTargetMethod">true</attribute>
-
- <attribute name="JndiName">jmx/HAServicePooled</attribute>
-
- <attribute name="ExportedInterface">org.jboss.test.cluster.invokerha.HAServiceRemote</attribute>
-
- <attribute name="ClientInterceptors">
- <interceptors>
- <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </interceptors>
- </attribute>
- </mbean>
-
- <mbean code="org.jboss.test.cluster.invokerha.HAService"
- name="jboss.test:service=HAService,type=pooledha">
-
- <attribute name="SendRemoteLifecycleNotifications">false</attribute>
- <attribute name="HAPartition"><inject bean="HAPartition"/></attribute>
- <attribute name="ServiceHAName">jboss.test:service=HAService,type=pooledha</attribute>
-
- </mbean>
-
- <!-- Pooled version.
- TODO We shouldn't need a separate service to expose a different
- proxy. We do because of ProxyFactoryHA bases the FamilyClusterInfo name
- on the service name. -->
-
- <mbean code="org.jboss.proxy.generic.ProxyFactoryHA"
name="jboss.test:service=ProxyFactory,name=HAService,protocol=httpha">
<attribute name="Partition"><inject bean="HAPartition"/></attribute>
Modified: trunk/testsuite/src/resources/naming/services/naming-xmbean.xml
===================================================================
--- trunk/testsuite/src/resources/naming/services/naming-xmbean.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/naming/services/naming-xmbean.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -17,7 +17,7 @@
<descriptors>
<interceptors>
<interceptor code="org.jboss.naming.interceptors.ProxyFactoryInterceptor"
- proxyName="jboss.test:service=proxyFactory,type=pooled,target=Naming"/>
+ proxyName="jboss.test:service=proxyFactory,type=unified,target=Naming"/>
<interceptor code="org.jboss.mx.interceptor.PersistenceInterceptor2" />
<interceptor code="org.jboss.mx.interceptor.ModelMBeanInterceptor" />
<interceptor code="org.jboss.mx.interceptor.ObjectReferenceInterceptor" />
Deleted: trunk/testsuite/src/resources/naming/services/pooled-service.xml
===================================================================
--- trunk/testsuite/src/resources/naming/services/pooled-service.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/naming/services/pooled-service.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--DOCTYPE server
- PUBLIC "-//JBoss//DTD MBean Service 3.2//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"
-
-This instance goes beyond the jboss-service_3_2.dtd model
-due to its use of the embedded <interceptors> element in the
-ClientInterceptors attribute of the proxy factory configs.
-$Id$
--->
-
-<server>
-
- <!-- Expose the Naming service interface via the PooledInvoker
- -->
- <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
- name="jboss.test:service=proxyFactory,type=pooled,target=Naming">
- <!-- Use the standard PooledInvoker from conf/jboss-service.xxml -->
- <attribute name="InvokerName">jboss:service=invoker,type=pooled</attribute>
- <attribute name="TargetName">jboss.test:service=Naming,test=pooled</attribute>
- <attribute name="JndiName"></attribute>
- <attribute name="ExportedInterface">org.jnp.interfaces.Naming</attribute>
- <attribute name="ClientInterceptors">
- <interceptors>
- <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
- <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
- <interceptor>org.jboss.naming.interceptors.ExceptionInterceptor</interceptor>
- <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
- </interceptors>
- </attribute>
- <depends>jboss:service=invoker,type=jrmp</depends>
- </mbean>
-
- <!-- A custom deployment of the JBoss JNDI naming service -->
- <mbean code="org.jboss.naming.NamingService"
- name="jboss.test:service=Naming,test=pooled"
- xmbean-dd="naming-xmbean.xml">
- <!-- The bootstrap port used to lookup the Naming proxy -->
- <attribute name="Port">10999</attribute>
- <!-- Don't override the default naming service -->
- <attribute name="InstallGlobalService">false</attribute>
- <!-- The thread pool service used to control the bootstrap lookups -->
- <attribute name="LookupPool">
- <inject bean="LongRunningTasksThreadPool"/>
- </attribute>
- <!-- The detached pooled invoker proxy -->
- <depends optional-attribute-name="InvokerProxyFactory"
- proxy-type="attribute">jboss.test:service=proxyFactory,type=pooled,target=Naming</depends>
- <depends optional-attribute-name="Naming"
- proxy-type="attribute">jboss:service=NamingBeanImpl</depends>
- </mbean>
-
-</server>
Copied: trunk/testsuite/src/resources/naming/services/unified-service.xml (from rev 98937, trunk/testsuite/src/resources/naming/services/pooled-service.xml)
===================================================================
--- trunk/testsuite/src/resources/naming/services/unified-service.xml (rev 0)
+++ trunk/testsuite/src/resources/naming/services/unified-service.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--DOCTYPE server
+ PUBLIC "-//JBoss//DTD MBean Service 3.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"
+
+This instance goes beyond the jboss-service_3_2.dtd model
+due to its use of the embedded <interceptors> element in the
+ClientInterceptors attribute of the proxy factory configs.
+$Id$
+-->
+
+<server>
+
+ <!-- Expose the Naming service interface via the UnifiedInvoker
+ -->
+ <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+ name="jboss.test:service=proxyFactory,type=unified,target=Naming">
+ <!-- Use the standard PooledInvoker from conf/jboss-service.xxml -->
+ <attribute name="InvokerName">jboss:service=invoker,type=unified</attribute>
+ <attribute name="TargetName">jboss.test:service=Naming,test=unified</attribute>
+ <attribute name="JndiName"></attribute>
+ <attribute name="ExportedInterface">org.jnp.interfaces.Naming</attribute>
+ <attribute name="ClientInterceptors">
+ <interceptors>
+ <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+ <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+ <interceptor>org.jboss.naming.interceptors.ExceptionInterceptor</interceptor>
+ <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+ </interceptors>
+ </attribute>
+ <depends>jboss:service=invoker,type=jrmp</depends>
+ </mbean>
+
+ <!-- A custom deployment of the JBoss JNDI naming service -->
+ <mbean code="org.jboss.naming.NamingService"
+ name="jboss.test:service=Naming,test=unified"
+ xmbean-dd="naming-xmbean.xml">
+ <!-- The bootstrap port used to lookup the Naming proxy -->
+ <attribute name="Port">10999</attribute>
+ <!-- Don't override the default naming service -->
+ <attribute name="InstallGlobalService">false</attribute>
+ <!-- The thread pool service used to control the bootstrap lookups -->
+ <attribute name="LookupPool">
+ <inject bean="LongRunningTasksThreadPool"/>
+ </attribute>
+ <!-- The detached pooled invoker proxy -->
+ <depends optional-attribute-name="InvokerProxyFactory"
+ proxy-type="attribute">jboss.test:service=proxyFactory,type=unified,target=Naming</depends>
+ <depends optional-attribute-name="Naming"
+ proxy-type="attribute">jboss:service=NamingBeanImpl</depends>
+ </mbean>
+
+</server>
Deleted: trunk/testsuite/src/resources/pooled/client.policy
===================================================================
--- trunk/testsuite/src/resources/pooled/client.policy 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/pooled/client.policy 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,4 +0,0 @@
-grant {
- // Allow everything for now
- permission java.security.AllPermission;
-};
Deleted: trunk/testsuite/src/resources/pooled/jboss-service.xml
===================================================================
--- trunk/testsuite/src/resources/pooled/jboss-service.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/pooled/jboss-service.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
- <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
- name="jboss.security:service=JaasSecurityDomain,domain=pooled-ssl">
- <constructor>
- <arg type="java.lang.String" value="pooled-ssl"/>
- </constructor>
- <attribute name="KeyStoreURL">resource:localhost.keystore</attribute>
- <attribute name="KeyStorePass">unit-tests-server</attribute>
- <attribute name="TrustStoreURL">resource:localhost.keystore</attribute>
- <attribute name="TrustStorePass">unit-tests-server</attribute>
- <attribute name="Salt">abcdefgh</attribute>
- <attribute name="IterationCount">13</attribute>
- <depends>jboss.security.tests:service=LoginConfig,policy=pooled-ssl</depends>
- </mbean>
-
- <mbean code="org.jboss.invocation.pooled.server.PooledInvoker"
- name="jboss:service=invoker,type=pooled,socketType=SSLSocketFactory,wantsClientAuth=true">
- <attribute name="NumAcceptThreads">1</attribute>
- <attribute name="MaxPoolSize">300</attribute>
- <attribute name="ClientMaxPoolSize">300</attribute>
- <attribute name="SocketTimeout">60000</attribute>
- <attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
- <attribute name="ServerBindPort">0</attribute>
- <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
- <attribute name="ClientConnectPort">0</attribute>
- <attribute name="ClientRetryCount">1</attribute>
- <attribute name="EnableTcpNoDelay">false</attribute>
-
- <!-- Customized socket factory attributes -->
- <attribute name="ClientSocketFactoryName">org.jboss.security.ssl.ClientSocketFactory</attribute>
- <attribute name="ServerSocketFactory"
- attributeClass="org.jboss.security.ssl.DomainServerSocketFactory"
- serialDataType="javaBean">
- <property name="bindAddress">${jboss.bind.address}</property>
- <property name="securityDomain">java:/jaas/pooled-ssl</property>
- <property name="wantsClientAuth">true</property>
- <property name="needsClientAuth">true</property>
- <property name="CiperSuites">TLS_DHE_DSS_WITH_AES_128_CBC_SHA</property>
- <property name="Protocols">SSLv2Hello,SSLv3,TLSv1</property>
- </attribute>
- <depends>jboss.security:service=JaasSecurityDomain,domain=pooled-ssl</depends>
- </mbean>
-
- <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
- name="jboss.security.tests:service=LoginConfig,policy=pooled-ssl">
- <attribute name="PolicyConfig" serialDataType="jbxb">
- <jaas:policy
- xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd"
- xmlns:jaas="urn:jboss:security-config:4.1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- >
- <jaas:application-policy name="pooled-ssl">
- <jaas:authentication>
- <jaas:login-module code="org.jboss.security.auth.spi.BaseCertLoginModule"
- flag = "required">
- <jaas:module-option name="password-stacking">useFirstPass</jaas:module-option>
- <jaas:module-option name="securityDomain">java:/jaas/pooled-ssl</jaas:module-option>
- </jaas:login-module>
- <jaas:login-module code="org.jboss.security.auth.spi.XMLLoginModule"
- flag="required">
- <jaas:module-option name="password-stacking">useFirstPass</jaas:module-option>
- <jaas:module-option name="userInfo">
- <ur:users
- xsi:schemaLocation="urn:jboss:user-roles:1.0 resource:user-roles_1_0.xsd"
- xmlns:ur="urn:jboss:user-roles:1.0">
- <ur:user name="CN=unit-tests-client, OU=JBoss Inc., O=JBoss Inc., ST=Washington, C=US" password="">
- <ur:role name="Echo"/>
- </ur:user>
- </ur:users>
- </jaas:module-option>
- <jaas:module-option name="unauthenticatedIdentity">guest</jaas:module-option>
- </jaas:login-module>
- </jaas:authentication>
- </jaas:application-policy>
- </jaas:policy>
- </attribute>
- <depends optional-attribute-name="LoginConfigService">
- jboss.security:service=XMLLoginConfig
- </depends>
- <depends optional-attribute-name="SecurityManagerService">
- jboss.security:service=JaasSecurityManager
- </depends>
- </mbean>
-
-</server>
Modified: trunk/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
+<!--
+ NOTE: Brian Stansberry 2009/12/27. This config was originally created for use
+ with the PooledInvoker as part of a test of https://jira.jboss.org/jira/browse/JBAS-3198.
+ As part of removing the PooledInvoker I am changing it to use the UnifiedInvoker.
+ It's possible the correct thing to do is remove the test altogether, but as I'm not
+ 100% certain there's another UnifiedInvoker test covering this exact usage, I'm
+ being conservative.
+ -->
<jboss>
<enterprise-beans>
<session>
<ejb-name>SessionA</ejb-name>
- <configuration-name>Pooled Stateless SessionBean</configuration-name>
+ <configuration-name>Test Stateless SessionBean</configuration-name>
<invoker-bindings>
<invoker>
- <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+ <invoker-proxy-binding-name>stateless-test-invoker</invoker-proxy-binding-name>
<jndi-name>SessionA</jndi-name>
</invoker>
</invoker-bindings>
@@ -39,8 +47,8 @@
<!--</invoker-proxy-binding>-->
<invoker-proxy-binding>
- <name>stateless-pooled-invoker</name>
- <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
+ <name>stateless-test-invoker</name>
+ <invoker-mbean>jboss:service=invoker,type=unified</invoker-mbean>
<proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
<proxy-factory-config>
<client-interceptors>
@@ -70,8 +78,8 @@
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
- <container-name>Pooled Stateless SessionBean</container-name>
- <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+ <container-name>Test Stateless SessionBean</container-name>
+ <invoker-proxy-binding-name>stateless-test-invoker</invoker-proxy-binding-name>
</container-configuration>
</container-configurations>
Modified: trunk/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml 2009-12-27 21:23:40 UTC (rev 98938)
+++ trunk/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml 2009-12-28 04:42:52 UTC (rev 98939)
@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
+<!--
+ NOTE: Brian Stansberry 2009/12/27. This config was originally created for use
+ with the PooledInvoker as part of a test of https://jira.jboss.org/jira/browse/JBAS-3198.
+ As part of removing the PooledInvoker I am changing it to use the UnifiedInvoker.
+ It's possible the correct thing to do is remove the test altogether, but as I'm not
+ 100% certain there's another UnifiedInvoker test covering this exact usage, I'm
+ being conservative.
+ -->
<jboss>
<enterprise-beans>
<session>
<ejb-name>SessionB</ejb-name>
- <configuration-name>Pooled Stateless SessionBean</configuration-name>
+ <configuration-name>Test Stateless SessionBean</configuration-name>
<invoker-bindings>
<invoker>
- <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+ <invoker-proxy-binding-name>stateless-test-invoker</invoker-proxy-binding-name>
<jndi-name>SessionB</jndi-name>
</invoker>
</invoker-bindings>
@@ -39,8 +47,8 @@
<!--</invoker-proxy-binding>-->
<invoker-proxy-binding>
- <name>stateless-pooled-invoker</name>
- <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
+ <name>stateless-test-invoker</name>
+ <invoker-mbean>jboss:service=invoker,type=unified</invoker-mbean>
<proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
<proxy-factory-config>
<client-interceptors>
@@ -70,8 +78,8 @@
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
- <container-name>Pooled Stateless SessionBean</container-name>
- <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+ <container-name>Test Stateless SessionBean</container-name>
+ <invoker-proxy-binding-name>stateless-test-invoker</invoker-proxy-binding-name>
</container-configuration>
</container-configurations>
More information about the jboss-cvs-commits
mailing list