[jboss-cvs] JBossAS SVN: r99032 - in branches/vfs3-int: aspects and 57 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 5 10:40:52 EST 2010
Author: johnbailey
Date: 2010-01-05 10:40:49 -0500 (Tue, 05 Jan 2010)
New Revision: 99032
Added:
branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainerMBean.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java
branches/vfs3-int/testsuite/src/resources/naming/services/unified-service.xml
branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/security/RemoteHostValve.java
Removed:
branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/pooled/server/
branches/vfs3-int/server/src/main/java/org/jboss/invocation/pooled/interfaces/
branches/vfs3-int/server/src/main/java/org/jboss/invocation/pooled/server/
branches/vfs3-int/testsuite/imports/sections/pooled.xml
branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/pooled/bean/
branches/vfs3-int/testsuite/src/main/org/jboss/test/pooled/interfaces/
branches/vfs3-int/testsuite/src/main/org/jboss/test/pooled/test/
branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml
branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml
branches/vfs3-int/testsuite/src/resources/naming/services/pooled-service.xml
branches/vfs3-int/testsuite/src/resources/pooled/META-INF/
branches/vfs3-int/testsuite/src/resources/pooled/client.policy
branches/vfs3-int/testsuite/src/resources/pooled/jboss-service.xml
branches/vfs3-int/testsuite/src/resources/test-configs/pooled-invoker/
Modified:
branches/vfs3-int/aspects/pom.xml
branches/vfs3-int/build.sh
branches/vfs3-int/build/VersionRelease.java
branches/vfs3-int/build/build.xml
branches/vfs3-int/build/pom.xml
branches/vfs3-int/cluster/pom.xml
branches/vfs3-int/cluster/src/etc/ha-legacy-jboss-beans.xml
branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/interfaces/HttpInvokerProxyHA.java
branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/server/HttpInvokerHA.java
branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/unified/server/UnifiedInvokerHA.java
branches/vfs3-int/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
branches/vfs3-int/component-matrix/pom.xml
branches/vfs3-int/connector/pom.xml
branches/vfs3-int/ejb3/pom.xml
branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
branches/vfs3-int/hibernate-int/pom.xml
branches/vfs3-int/iiop/pom.xml
branches/vfs3-int/pom.xml
branches/vfs3-int/security/src/main/java/org/jboss/security/plugins/SecurityConfig.java
branches/vfs3-int/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml
branches/vfs3-int/server/src/etc/deploy/legacy-invokers-service.xml
branches/vfs3-int/server/src/etc/deploy/naming-jboss-beans.xml
branches/vfs3-int/server/src/etc/deployers/core-naming-jboss-beans.xml
branches/vfs3-int/server/src/etc/deployers/jsr77-deployers-jboss-beans.xml
branches/vfs3-int/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARStructure.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/Container.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/ContainerMBean.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/EjbUtil50.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainer.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/PreSecurityInterceptor.java
branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/SecurityActions.java
branches/vfs3-int/server/src/main/java/org/jboss/invocation/InvocationStatistics.java
branches/vfs3-int/server/src/main/java/org/jboss/tm/usertx/client/ClientUserTransaction.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
branches/vfs3-int/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java
branches/vfs3-int/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java
branches/vfs3-int/testsuite/build.xml
branches/vfs3-int/testsuite/imports/sections/cluster.xml
branches/vfs3-int/testsuite/imports/sections/naming.xml
branches/vfs3-int/testsuite/imports/server-config.xml
branches/vfs3-int/testsuite/imports/test-jars.xml
branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/jca/test/TxConnectionManagerStressTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java
branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
branches/vfs3-int/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml
branches/vfs3-int/testsuite/src/resources/naming/services/naming-xmbean.xml
branches/vfs3-int/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
branches/vfs3-int/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
branches/vfs3-int/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml
branches/vfs3-int/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
branches/vfs3-int/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml
branches/vfs3-int/tomcat/pom.xml
branches/vfs3-int/varia/pom.xml
branches/vfs3-int/varia/src/assembly/deployment-service-sar.xml
branches/vfs3-int/varia/src/assembly/foe-deployer-3.2-sar.xml
branches/vfs3-int/varia/src/assembly/http-invoker-sar.xml
branches/vfs3-int/varia/src/assembly/httpha-invoker-sar.xml
branches/vfs3-int/varia/src/assembly/mbean-configurator-sar.xml
branches/vfs3-int/varia/src/assembly/persistent-service-sar.xml
branches/vfs3-int/varia/src/assembly/snmp-adaptor-sar.xml
branches/vfs3-int/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java
branches/vfs3-int/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
Log:
[JBAS-7342] - Merged latest changes from jbossas trunk onto VFS3 branch
Modified: branches/vfs3-int/aspects/pom.xml
===================================================================
--- branches/vfs3-int/aspects/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/aspects/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -124,10 +124,6 @@
<artifactId>jboss-as-system-jmx</artifactId>
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-transaction-spi</artifactId>
</dependency>
Modified: branches/vfs3-int/build/VersionRelease.java
===================================================================
--- branches/vfs3-int/build/VersionRelease.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/build/VersionRelease.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -185,7 +185,8 @@
throw new FileNotFoundException("Not a JarFile: "+file);
}
- this.mf = jarFile.getManifest();
+ Manifest tmpMf = jarFile.getManifest();
+ this.mf = tmpMf == null ? new Manifest() : tmpMf;
Attributes mfAttrs = mf.getMainAttributes();
String sealedAttr = mfAttrs.getValue(Attributes.Name.SEALED);
Modified: branches/vfs3-int/build/build.xml
===================================================================
--- branches/vfs3-int/build/build.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/build/build.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1377,10 +1377,10 @@
</copy>
<mkdir dir="${install.examples}/jmx/persistent-service.sar"/>
- <unjar src="${varia.module.output}/jboss-as-varia-persistent-service-sar.jar" dest="${install.examples}/jmx/persistent-service.sar"/>
+ <unjar src="${varia.module.output}/jboss-as-varia-persistent-service.sar" dest="${install.examples}/jmx/persistent-service.sar"/>
<mkdir dir="${install.examples.varia}/deployment-service"/>
- <copy file="${varia.module.output}/jboss-as-varia-deployment-service-sar.jar"
+ <copy file="${varia.module.output}/jboss-as-varia-deployment-service.sar"
tofile="${install.examples.varia}/deployment-service/deployment-service.sar"/>
<copy todir="${install.examples.varia}/deployment-service">
<fileset dir="${varia.module.output}/resources/services/deployment">
@@ -1390,7 +1390,7 @@
<!-- MBean Configurator sar for setting mbean attributes when registered -->
<mkdir dir="${install.examples}/jmx/mbean-configurator.sar"/>
- <unjar src="${varia.module.output}/jboss-as-varia-mbean-configurator-sar.jar" dest="${install.examples}/jmx/mbean-configurator.sar"/>
+ <unjar src="${varia.module.output}/jboss-as-varia-mbean-configurator.sar" dest="${install.examples}/jmx/mbean-configurator.sar"/>
<!-- Client jars -->
<mkdir dir="${install.client}"/>
@@ -1420,7 +1420,7 @@
<!-- copy snmp-adaptor.sar unpacked to deploy -->
<mkdir dir="${install.server}/all/deploy/snmp-adaptor.sar"/>
- <unjar src="${varia.module.output}/jboss-as-varia-snmp-adaptor-sar.jar"
+ <unjar src="${varia.module.output}/jboss-as-varia-snmp-adaptor.sar"
dest="${install.server}/all/deploy/snmp-adaptor.sar">
<mapper type="glob" from="jboss-as-varia-*.jar" to="*.jar"/>
</unjar>
@@ -1432,7 +1432,7 @@
<!-- Include the HTTP invoker service unpacked -->
<mkdir dir="${install.server}/all/deploy/httpha-invoker.sar"/>
- <unjar src="${varia.module.output}/jboss-as-varia-httpha-invoker-sar.jar" dest="${install.server}/all/deploy/httpha-invoker.sar"/>
+ <unjar src="${varia.module.output}/jboss-as-varia-httpha-invoker.sar" dest="${install.server}/all/deploy/httpha-invoker.sar"/>
<!-- copy the ant jmx client -->
<mkdir dir="${install.client}"/>
@@ -1510,7 +1510,7 @@
</fileset>
</copy>
- <unjar src="${project.root}/varia/target/jboss-as-varia-http-invoker-sar.jar"
+ <unjar src="${project.root}/varia/target/jboss-as-varia-http-invoker.sar"
dest="${install.default}/deploy/http-invoker.sar"/>
</target>
@@ -1924,7 +1924,10 @@
<!-- Copy the profileservice beans to an optional file -->
<copy todir="${install.server}/all/deploy/"
file="${profileservice.module.output}/resources/profileservice-jboss-beans.xml" />
-
+ <!-- Copy the profileservice client jar. -->
+ <copy file="${profileservice.module.output}/jboss-as-profileservice-client.jar"
+ tofile="${install.client}/jboss-profileservice-client.jar" filtering="no" />
+
</target>
<!-- ========================================================================== -->
@@ -1980,6 +1983,7 @@
<fileset refid="jboss.jbossts:jbossjts-integration:jar"/>
<fileset refid="org.jboss.remoting:jboss-remoting:jar"/>
<fileset refid="jboss:jboss-serialization:jar"/>
+ <fileset refid="org.jboss.javaee:jboss-ejb-api_3.1:jar"/>
<fileset refid="org.jboss.ejb3:jboss-ejb3-cache:jar"/>
<fileset refid="org.jboss.ejb3:jboss-ejb3-common:jar"/>
<fileset refid="org.jboss.ejb3:jboss-ejb3-core:jar"/>
Modified: branches/vfs3-int/build/pom.xml
===================================================================
--- branches/vfs3-int/build/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/build/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -347,6 +347,10 @@
<artifactId>jbosscache-pojo</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api_3.1</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-common</artifactId>
<classifier>client</classifier>
Modified: branches/vfs3-int/build.sh
===================================================================
--- branches/vfs3-int/build.sh 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/build.sh 2010-01-05 15:40:49 UTC (rev 99032)
@@ -18,6 +18,9 @@
# Ignore user's MAVEN_HOME if it is set
MAVEN_HOME=""
+MAVEN_OPTS="$MAVEN_OPTS -Xmx512M"
+export MAVEN_OPTS
+
# the default search path for maven
MAVEN_SEARCH_PATH="\
tools
Modified: branches/vfs3-int/cluster/pom.xml
===================================================================
--- branches/vfs3-int/cluster/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -212,11 +212,6 @@
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
Modified: branches/vfs3-int/cluster/src/etc/ha-legacy-jboss-beans.xml
===================================================================
--- branches/vfs3-int/cluster/src/etc/ha-legacy-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/src/etc/ha-legacy-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/interfaces/HttpInvokerProxyHA.java
===================================================================
--- branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/interfaces/HttpInvokerProxyHA.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/interfaces/HttpInvokerProxyHA.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -29,7 +29,10 @@
import java.net.URL;
import java.rmi.ServerException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
import org.jboss.ha.framework.interfaces.ClusteringTargetsRepository;
import org.jboss.ha.framework.interfaces.GenericClusteringException;
@@ -42,7 +45,10 @@
import org.jboss.invocation.InvokerProxyHA;
import org.jboss.invocation.MarshalledInvocation;
import org.jboss.invocation.PayloadKey;
+import org.jboss.invocation.ServiceUnavailableException;
import org.jboss.logging.Logger;
+import org.jboss.tm.TransactionPropagationContextFactory;
+import org.jboss.tm.TransactionPropagationContextUtil;
/** The client side Http invoker proxy that posts an invocation to the
InvokerServlet using the HttpURLConnection created from a target url.
@@ -64,6 +70,8 @@
* @since 1.1.4.5
*/
private static final long serialVersionUID = -7081220026780794383L;
+
+ public static final Map<Object, Object> txFailoverAuthorizations = Collections.synchronizedMap(new WeakHashMap<Object, Object>());
// Attributes ----------------------------------------------------
@@ -118,7 +126,7 @@
public void forbidTransactionFailover(Object tpc)
{
- log.debug("Transaction failover authorization not supported for HttpInvokerProxyHA - see JBAS-6196");
+ txFailoverAuthorizations.put(tpc, null);
}
public String getProxyFamilyName()
@@ -182,11 +190,12 @@
MarshalledInvocation mi = new MarshalledInvocation(invocation);
mi.setValue("CLUSTER_VIEW_ID", new Long(familyClusterInfo.getCurrentViewId()));
String target = (String) getRemoteTarget(invocation);
+ boolean failoverAuthorized = true;
URL externalURL = Util.resolveURL(target);
Exception lastException = null;
- while( externalURL != null )
+ while( externalURL != null && failoverAuthorized)
{
- boolean definitivlyRemoveNodeOnFailure = true;
+ boolean definitivelyRemoveNodeOnFailure = true;
invocation.setValue("FAILOVER_COUNTER", new Integer(failoverCounter), PayloadKey.AS_IS);
try
{
@@ -197,28 +206,15 @@
if (rsp.newReplicants != null)
updateClusterInfo(rsp.newReplicants, rsp.currentViewId);
+
+ invocationHasReachedAServer (invocation);
+
return rsp.response;
}
catch(GenericClusteringException e)
{
- // this is a generic clustering exception that contain the
- // completion status: usefull to determine if we are authorized
- // to re-issue a query to another node
- //
- if( e.getCompletionStatus() == GenericClusteringException.COMPLETED_NO )
- {
- // we don't want to remove the node from the list of targets
- // UNLESS there is a risk to loop
- if (totalNumberOfTargets() >= failoverCounter)
- {
- if( e.isDefinitive() == false )
- definitivlyRemoveNodeOnFailure = false;
- }
- }
- else
- {
- throw new ServerException("Cannot proceed beyond target="+externalURL, e);
- }
+ definitivelyRemoveNodeOnFailure = handleGenericClusteringException(invocation, failoverCounter,
+ definitivelyRemoveNodeOnFailure, e);
}
catch(InvocationException e)
{
@@ -227,27 +223,12 @@
if (cause instanceof GenericClusteringException)
{
GenericClusteringException gce = (GenericClusteringException) cause;
- // this is a generic clustering exception that contain the
- // completion status: usefull to determine if we are authorized
- // to re-issue a query to another node
- //
- if( gce.getCompletionStatus() == GenericClusteringException.COMPLETED_NO )
- {
- // we don't want to remove the node from the list of targets
- // UNLESS there is a risk to loop
- if (totalNumberOfTargets() >= failoverCounter)
- {
- if( gce.isDefinitive() == false )
- definitivlyRemoveNodeOnFailure = false;
- }
- }
- else
- {
- throw new ServerException("Cannot proceed beyond target="+externalURL, gce);
- }
+ definitivelyRemoveNodeOnFailure = handleGenericClusteringException(invocation, failoverCounter,
+ definitivelyRemoveNodeOnFailure, gce);
}
else
{
+ invocationHasReachedAServer(invocation);
if( cause instanceof Exception )
throw (Exception) cause;
else if (cause instanceof Error)
@@ -255,30 +236,101 @@
throw new InvocationTargetException(cause);
}
}
- catch(IOException e)
+ catch (java.net.ConnectException e)
{
- if( trace )
- log.trace("Invoke failed, target="+externalURL, e);
lastException = e;
}
+ catch (java.net.UnknownHostException e)
+ {
+ lastException = e;
+ }
catch(Exception e)
{
+ if( trace )
+ log.trace("Invoke failed, target="+externalURL, e);
+ invocationHasReachedAServer(invocation);
// Rethrow for the application to handle
throw e;
}
// If we reach here, this means that we must fail-over
remoteTargetHasFailed(target);
- if( definitivlyRemoveNodeOnFailure )
+ if( definitivelyRemoveNodeOnFailure )
resetView();
+ failoverAuthorized = txContextAllowsFailover (invocation);
target = (String) getRemoteTarget(invocation);
externalURL = Util.resolveURL(target);
failoverCounter ++;
}
+
// if we get here this means list was exhausted
- throw new ServerException("Service unavailable last exception:", lastException);
+ String msg = failoverAuthorized ? "Service unavailable." : "Service unavailable (failover not possible inside a user transaction).";
+ throw new ServiceUnavailableException(msg, lastException);
}
+ private boolean handleGenericClusteringException(Invocation invocation, int failoverCounter,
+ boolean definitivlyRemoveNodeOnFailure, GenericClusteringException gce) throws ServerException
+ {
+ // this is a generic clustering exception that contain the
+ // completion status: usefull to determine if we are authorized
+ // to re-issue a query to another node
+ //
+ if( gce.getCompletionStatus() == GenericClusteringException.COMPLETED_NO )
+ {
+ // we don't want to remove the node from the list of targets
+ // UNLESS there is a risk to loop
+ if (totalNumberOfTargets() >= failoverCounter)
+ {
+ if( gce.isDefinitive() == false )
+ definitivlyRemoveNodeOnFailure = false;
+ }
+ }
+ else
+ {
+ invocationHasReachedAServer(invocation);
+ throw new ServerException("Clustering error", gce);
+ }
+ return definitivlyRemoveNodeOnFailure;
+ }
+
+ public void invocationHasReachedAServer (Invocation invocation)
+ {
+ Object tpc = getTransactionPropagationContext();
+ if (tpc != null)
+ {
+ forbidTransactionFailover(tpc);
+ }
+ }
+
+
+ /**
+ * Overriden method to rethrow any potential SystemException arising from it.
+ * Looking at the parent implementation, none of the methods called actually
+ * throw SystemException.
+ */
+ public Object getTransactionPropagationContext()
+ {
+ TransactionPropagationContextFactory tpcFactory = TransactionPropagationContextUtil.getTPCFactoryClientSide();
+ return (tpcFactory == null) ? null : tpcFactory.getTransactionPropagationContext();
+ }
+
+ public boolean txContextAllowsFailover (Invocation invocation)
+ {
+ Object tpc = getTransactionPropagationContext();
+ if (tpc != null)
+ {
+ if (trace)
+ {
+ log.trace("Checking tx failover authorisation map with tpc " + tpc);
+ }
+
+ /* If the map contains the tpc, then we can't allow a failover */
+ return ! txFailoverAuthorizations.containsKey(tpc);
+ }
+
+ return true;
+ }
+
/** Externalize this instance.
*/
@SuppressWarnings("unchecked")
Modified: branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/server/HttpInvokerHA.java
===================================================================
--- branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/server/HttpInvokerHA.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/http/server/HttpInvokerHA.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -25,8 +25,9 @@
import java.util.ArrayList;
import java.util.HashMap;
-import javax.management.JMException;
+import javax.management.InstanceNotFoundException;
import javax.management.ObjectName;
+import javax.management.ReflectionException;
import org.jboss.mx.util.JMXExceptionDecoder;
import org.jboss.ha.framework.interfaces.HARMIResponse;
@@ -167,18 +168,20 @@
// Return the raw object and let the http layer marshall it
return rsp;
}
- catch (Exception e)
+ catch (InstanceNotFoundException e)
{
- // Unwrap any JMX exceptions
- e = (Exception) JMXExceptionDecoder.decode(e);
- // Don't send JMX exception back to client to avoid needing jmx
- if( e instanceof JMException )
- e = new GenericClusteringException (GenericClusteringException.COMPLETED_NO, e.getMessage());
+ throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);
+ }
+ catch (ReflectionException e)
+ {
+ throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);
+ }
+ catch(Exception e)
+ {
+ JMXExceptionDecoder.rethrow(e);
- // Only log errors if trace is enabled
- if( log.isTraceEnabled() )
- log.trace("operation failed", e);
- throw e;
+ // the compiler does not know an exception is thrown by the above
+ throw new org.jboss.util.UnreachableStatementException();
}
finally
{
Modified: branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/unified/server/UnifiedInvokerHA.java
===================================================================
--- branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/unified/server/UnifiedInvokerHA.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/src/main/java/org/jboss/invocation/unified/server/UnifiedInvokerHA.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -25,8 +25,11 @@
import java.util.ArrayList;
import java.util.HashMap;
+import javax.management.InstanceNotFoundException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
+import javax.management.ReflectionException;
+
import org.jboss.ha.framework.interfaces.GenericClusteringException;
import org.jboss.ha.framework.interfaces.HARMIResponse;
import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
@@ -47,7 +50,7 @@
*/
public class UnifiedInvokerHA extends UnifiedInvoker implements InvokerHA
{
- private HashMap beanMap = new HashMap();
+ private HashMap<Integer, HATarget> beanMap = new HashMap<Integer, HATarget>();
public UnifiedInvokerHA()
{
@@ -157,29 +160,29 @@
if(clientViewId != target.getCurrentViewId())
{
- haResponse.newReplicants = new ArrayList(target.getReplicants());
+ haResponse.newReplicants = new ArrayList<Object>(target.getReplicants());
haResponse.currentViewId = target.getCurrentViewId();
}
haResponse.response = obj;
/** End Clustering **/
- return new MarshalledObject(haResponse);
+ return new MarshalledObject<HARMIResponse>(haResponse);
}
+ catch (InstanceNotFoundException e)
+ {
+ throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);
+ }
+ catch (ReflectionException e)
+ {
+ throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);
+ }
catch(Exception e)
{
- Throwable th = JMXExceptionDecoder.decode(e);
- if(log.isTraceEnabled())
- {
- log.trace("Failed to invoke on mbean: " + mbean, th);
- }
+ JMXExceptionDecoder.rethrow(e);
- if(th instanceof Exception)
- {
- e = (Exception) th;
- }
-
- throw e;
+ // the compiler does not know an exception is thrown by the above
+ throw new org.jboss.util.UnreachableStatementException();
}
finally
{
Modified: branches/vfs3-int/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
===================================================================
--- branches/vfs3-int/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -56,7 +56,7 @@
import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationReadAction;
import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationRemoteAction;
import org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationWriteAction;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* {@link RepositoryClusteringHandler} implementation that uses {@link HAPartition}.
Modified: branches/vfs3-int/component-matrix/pom.xml
===================================================================
--- branches/vfs3-int/component-matrix/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/component-matrix/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -59,7 +59,7 @@
<version.org.hibernate.entity.manager>3.5.0-Beta-2</version.org.hibernate.entity.manager>
<version.org.hibernate.validator>4.0.2.GA</version.org.hibernate.validator>
<version.org.hibernate>3.5.0-Beta-2</version.org.hibernate>
- <version.org.jboss.aop>2.1.6.GA</version.org.jboss.aop>
+ <version.org.jboss.aop>2.1.0-SNAPSHOT</version.org.jboss.aop>
<version.org.jboss.aspects.currentinvocation>1.0.1</version.org.jboss.aspects.currentinvocation>
<version.org.jboss.aspects.remoting>1.0.1.GA</version.org.jboss.aspects.remoting>
<version.org.jboss.aspects.security>1.0.1</version.org.jboss.aspects.security>
@@ -75,13 +75,14 @@
<version.org.jboss.bootstrap.spi.mc>2.0.0-alpha-2</version.org.jboss.bootstrap.spi.mc>
<version.org.jboss.cache.core>3.2.1.GA</version.org.jboss.cache.core>
<version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
- <version.org.jboss.cl>2.0.8.GA</version.org.jboss.cl>
+ <version.org.jboss.cl>2.2.0-SNAPSHOT</version.org.jboss.cl>
<version.org.jboss.cluster.cache.jbc>2.1.1.BETA2</version.org.jboss.cluster.cache.jbc>
<version.org.jboss.cluster.cache.spi>2.0.0.GA</version.org.jboss.cluster.cache.spi>
<version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
<version.org.jboss.cluster.server.api>1.1.1.GA</version.org.jboss.cluster.server.api>
- <version.org.jboss.common.core>2.2.16.GA</version.org.jboss.common.core>
- <version.org.jboss.deployers>2.0.9.GA</version.org.jboss.deployers>
+ <version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
+ <version.org.jboss.deployers>2.2.0-SNAPSHOT</version.org.jboss.deployers>
+ <version.org.jboss.ejb.api>1.0-alpha-1</version.org.jboss.ejb.api>
<version.org.jboss.ejb3.common.client>1.0.1</version.org.jboss.ejb3.common.client>
<version.org.jboss.ejb3.core.client>1.1.22</version.org.jboss.ejb3.core.client>
<version.org.jboss.ejb3.endpoint.deployer>0.1.4</version.org.jboss.ejb3.endpoint.deployer>
@@ -95,7 +96,7 @@
<version.org.jboss.ejb3>1.0.0</version.org.jboss.ejb3>
<version.org.jboss.integration>5.1.0.SP1</version.org.jboss.integration>
<version.org.jboss.jbossxb>2.0.2.Beta3</version.org.jboss.jbossxb>
- <version.org.jboss.jpa.deployers>1.0.1</version.org.jboss.jpa.deployers>
+ <version.org.jboss.jpa.deployers>1.0.2-SNAPSHOT</version.org.jboss.jpa.deployers>
<version.org.jboss.jpa.impl>2.0.0</version.org.jboss.jpa.impl>
<version.org.jboss.jpa.spi>1.0.0</version.org.jboss.jpa.spi>
<version.org.jboss.logging>2.2.0.CR1</version.org.jboss.logging>
@@ -103,23 +104,23 @@
<version.org.jboss.man>2.1.1.GA</version.org.jboss.man>
<version.org.jboss.mc-int>2.2.0.Alpha2</version.org.jboss.mc-int>
<version.org.jboss.mdr>2.0.2.GA</version.org.jboss.mdr>
- <version.org.jboss.metadata.common>2.0.0.Alpha8</version.org.jboss.metadata.common>
- <version.org.jboss.metadata.client>2.0.0.Alpha</version.org.jboss.metadata.client>
- <version.org.jboss.metadata.ear>2.0.0.Alpha</version.org.jboss.metadata.ear>
- <version.org.jboss.metadata.ejb>2.0.0-alpha-2</version.org.jboss.metadata.ejb>
- <version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
- <version.org.jboss.metadata.war>2.0.0.Alpha13</version.org.jboss.metadata.war>
+ <version.org.jboss.metadata.common>2.0.0-SNAPSHOT</version.org.jboss.metadata.common>
+ <version.org.jboss.metadata.client>2.0.0-SNAPSHOT</version.org.jboss.metadata.client>
+ <version.org.jboss.metadata.ear>2.0.0-SNAPSHOT</version.org.jboss.metadata.ear>
+ <version.org.jboss.metadata.ejb>2.0.0-SNAPSHOT</version.org.jboss.metadata.ejb>
+ <version.org.jboss.metadata.rar>2.0.0-SNAPSHOT</version.org.jboss.metadata.rar>
+ <version.org.jboss.metadata.war>2.0.0-SNAPSHOT</version.org.jboss.metadata.war>
<version.org.jboss.microcontainer>2.0.9.GA</version.org.jboss.microcontainer>
<version.org.jboss.mod_cluster>1.1.0.Beta1</version.org.jboss.mod_cluster>
<version.org.jboss.mx>6.0.0.Beta1</version.org.jboss.mx>
<version.org.jboss.naming>5.0.4.GA</version.org.jboss.naming>
<version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
<version.org.jboss.reloaded.naming>0.1.0-alpha-1</version.org.jboss.reloaded.naming>
- <version.org.jboss.remoting>2.5.0.SP2</version.org.jboss.remoting>
- <version.org.jboss.security>2.1.0.20090318</version.org.jboss.security>
+ <version.org.jboss.remoting>2.5.2.SP1</version.org.jboss.remoting>
+ <version.org.jboss.security>2.1.0.20091223</version.org.jboss.security>
<version.org.jboss.service.binding>1.0.0.GA</version.org.jboss.service.binding>
<version.org.jboss.threads>1.0.0.GA</version.org.jboss.threads>
- <version.org.jboss.vfs>2.2.0.Alpha1</version.org.jboss.vfs>
+ <version.org.jboss.vfs>3.0.0.CR1-SNAPSHOT</version.org.jboss.vfs>
<version.org.jboss.security.negotiation>2.0.3.SP1</version.org.jboss.security.negotiation>
<version.org.jboss.slf4j>1.0.2.GA</version.org.jboss.slf4j>
<version.org.jboss.xnio.metadata>1.0.1.GA</version.org.jboss.xnio.metadata>
@@ -508,18 +509,6 @@
</dependency>
<dependency>
- <groupId>javax.security</groupId>
- <artifactId>jacc</artifactId>
- <version>1.0</version>
- </dependency>
-
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- </dependency>
-
- <dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-brew</version>
@@ -565,6 +554,10 @@
<version>${version.org.jboss.aspects.security}</version>
<exclusions>
<exclusion>
+ <groupId>javax.security</groupId>
+ <artifactId>jacc</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.jboss.aop</groupId>
<artifactId>jboss-aop</artifactId>
</exclusion>
@@ -1180,8 +1173,12 @@
<version>${version.org.hibernate}</version>
<exclusions>
<exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
@@ -1249,6 +1246,10 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -1737,6 +1738,12 @@
</dependency>
<dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api_3.1</artifactId>
+ <version>${version.org.jboss.ejb.api}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-common</artifactId>
<version>${version.org.jboss.ejb3.common.client}</version>
@@ -2531,6 +2538,8 @@
<excludes>
<exclude>jboss:jboss-common</exclude>
<exclude>javax.el:el-api</exclude>
+ <exclude>javax.transaction:jta</exclude>
+ <exclude>javax.security:jacc</exclude>
<exclude>bsh:bsh</exclude>
<exclude>bsf:bsf</exclude>
<exclude>javax.xml.stream:stax-api</exclude>
@@ -2568,6 +2577,13 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>com.googlecode.maven-overview-plugin</groupId>
+ <artifactId>maven-overview-plugin</artifactId>
+ <version>RELEASE</version>
+ </plugin>
+
</plugins>
</build>
</profile>
Modified: branches/vfs3-int/connector/pom.xml
===================================================================
--- branches/vfs3-int/connector/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/connector/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -127,10 +127,6 @@
<artifactId>mail</artifactId>
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</dependency>
Modified: branches/vfs3-int/ejb3/pom.xml
===================================================================
--- branches/vfs3-int/ejb3/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/ejb3/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -141,11 +141,6 @@
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
</dependency>
Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/client/ClientContainer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -59,7 +59,7 @@
import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
import org.jboss.metadata.javaee.spec.RemoteEnvironment;
import org.jboss.util.NotImplementedException;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* Injection of the application client main class is handled from here.
Modified: branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/ejb3/src/main/java/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -31,12 +31,11 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.FilterVirtualFileVisitor;
+import org.jboss.vfs.util.SuffixesExcludeFilter;
/**
* Comment
Modified: branches/vfs3-int/hibernate-int/pom.xml
===================================================================
--- branches/vfs3-int/hibernate-int/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/hibernate-int/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -106,10 +106,6 @@
<artifactId>jboss-j2se</artifactId>
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-transaction-spi</artifactId>
</dependency>
Modified: branches/vfs3-int/iiop/pom.xml
===================================================================
--- branches/vfs3-int/iiop/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/iiop/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -136,11 +136,6 @@
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
Modified: branches/vfs3-int/pom.xml
===================================================================
--- branches/vfs3-int/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -124,6 +124,13 @@
</manifestSections>
</archive>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>${version.jboss.packaging.maven.plugin}</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -216,7 +223,15 @@
</goals>
</execution>
</executions>
+
</plugin>
+
+ <plugin>
+ <groupId>com.googlecode.maven-overview-plugin</groupId>
+ <artifactId>maven-overview-plugin</artifactId>
+ <version>RELEASE</version>
+ </plugin>
+
</plugins>
</build>
@@ -227,6 +242,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test</groupId>
+ <artifactId>jboss-test</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<!-- Dependency Management -->
Modified: branches/vfs3-int/security/src/main/java/org/jboss/security/plugins/SecurityConfig.java
===================================================================
--- branches/vfs3-int/security/src/main/java/org/jboss/security/plugins/SecurityConfig.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/security/src/main/java/org/jboss/security/plugins/SecurityConfig.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -155,8 +155,7 @@
@ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
public void stopService() throws Exception
{
- if (this.loginConfigStack.empty() == false)
- popLoginConfig();
+ this.popLoginConfig();
}
/**
@@ -204,11 +203,29 @@
@ManagementOperation(description = "Uninstall the current Configuration", impact = Impact.WriteOnly)
public synchronized void popLoginConfig() throws JMException
{
+ if(this.loginConfigStack.isEmpty())
+ {
+ if (super.log.isDebugEnabled())
+ super.log.debug("Unable to pop configuration: configuration stack is empty");
+ return;
+ }
+
// remove the current configuration from the stack.
- this.loginConfigStack.pop();
- // if there is a previous configuration, install it as the current instance.
- if (!loginConfigStack.empty())
- Configuration.setConfiguration(this.loginConfigStack.peek());
+ Configuration currentConfig = this.loginConfigStack.pop();
+ if (!this.loginConfigStack.empty())
+ {
+ // if there is a previous configuration, install it as the current instance.
+ Configuration previousConfig = this.loginConfigStack.peek();
+ if (super.log.isDebugEnabled())
+ super.log.debug("Installing previous configuration " + previousConfig.getClass().getName());
+ Configuration.setConfiguration(previousConfig);
+ }
+ else
+ {
+ if(super.log.isDebugEnabled())
+ super.log.debug("No previous configuration found. Configuration " + currentConfig.getClass().getName() +
+ " is still active");
+ }
}
/**
Modified: branches/vfs3-int/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml
===================================================================
--- branches/vfs3-int/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/conf/all/bindingservice.beans/META-INF/bindings-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/server/src/etc/deploy/legacy-invokers-service.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deploy/legacy-invokers-service.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/deploy/legacy-invokers-service.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/server/src/etc/deploy/naming-jboss-beans.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deploy/naming-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/deploy/naming-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,8 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <!-- JNDI util and legacy beans: $Id:$ -->
+ <!-- ==================================================================== -->
+ <!-- Remote interface to JNDI, JNDI util and legacy beans: $Id:$ -->
+ <!-- ==================================================================== -->
+ <bean name="LookupPool">
+ <constructor factoryMethod="newFixedThreadPool"
+ factoryClass="java.util.concurrent.Executors">
+ <!-- At least 2 threads are required -->
+ <parameter>2</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="RemoteNamingBean" class="org.jnp.server.Main">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=Naming", exposedInterface=org.jnp.server.MainMBean, registerDirectly=true)</annotation>
+
+ <property name="namingInfo"><inject bean="LocalNamingBean" /></property>
+
+ <!-- The call by value mode. true if all lookups are unmarshalled using
+ the caller's TCL, false if in VM lookups return the value by reference. -->
+ <property name="callByValue">false</property>
+
+ <!-- The listening port for the bootstrap JNP service. Set this to -1
+ to run the NamingService without the JNP invoker listening port. -->
+ <property name="port">
+ <value-factory bean="ServiceBindingManager"
+ method="getIntBinding">
+ <parameter>jboss:service=Naming</parameter>
+ <parameter>Port</parameter>
+ </value-factory>
+ </property>
+
+ <!-- The bootstrap JNP server bind address. This also sets the default
+ RMI service bind address. Empty == all addresses -->
+ <property name="bindAddress">${jboss.bind.address:localhost}</property>
+
+ <!-- The port of the RMI naming service, 0 == anonymous -->
+ <property name="rmiPort">
+ <value-factory bean="ServiceBindingManager" method="getIntBinding">
+ <parameter>jboss:service=Naming</parameter>
+ <parameter>RmiPort</parameter>
+ </value-factory>
+ </property>
+
+ <!-- The RMI service bind address. Empty == all addresses -->
+ <property name="rmiBindAddress">${jboss.bind.address:localhost}</property>
+
+ <!-- Set the java.rmi.server.hostname system property to rmiBindAddress -->
+ <property name="enableRmiServerHostname">true</property>
+
+ <!-- The thread pool service used to control the bootstrap lookups -->
+ <property name="lookupExector"><inject bean="LookupPool"/></property>
+ </bean>
+
<bean name="JndiViewBean" class="org.jboss.naming.JNDIView">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=JNDIView", exposedInterface=org.jboss.naming.JNDIViewMBean, registerDirectly=true)</annotation>
Modified: branches/vfs3-int/server/src/etc/deployers/core-naming-jboss-beans.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deployers/core-naming-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/deployers/core-naming-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -5,14 +5,6 @@
<!-- JNDI -->
<!-- ==================================================================== -->
- <bean name="LookupPool">
- <constructor factoryMethod="newFixedThreadPool"
- factoryClass="java.util.concurrent.Executors">
- <!-- At least 2 threads are required -->
- <parameter>2</parameter>
- </constructor>
- </bean>
-
<bean name="LocalNamingBean" class="org.jnp.server.NamingBeanImpl">
<!-- Install this bean as the global JVM NamingServer -->
<property name="installGlobalService">true</property>
@@ -21,46 +13,5 @@
</bean>
<bean name="NameSpaces" class="org.jboss.reloaded.naming.service.NameSpaces"/>
-
- <bean name="RemoteNamingBean" class="org.jnp.server.Main">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=Naming", exposedInterface=org.jnp.server.MainMBean, registerDirectly=true)</annotation>
-
- <property name="namingInfo"><inject bean="LocalNamingBean" /></property>
-
- <!-- The call by value mode. true if all lookups are unmarshalled using
- the caller's TCL, false if in VM lookups return the value by reference. -->
- <property name="callByValue">false</property>
-
- <!-- The listening port for the bootstrap JNP service. Set this to -1
- to run the NamingService without the JNP invoker listening port. -->
- <property name="port">
- <value-factory bean="ServiceBindingManager"
- method="getIntBinding">
- <parameter>jboss:service=Naming</parameter>
- <parameter>Port</parameter>
- </value-factory>
- </property>
-
- <!-- The bootstrap JNP server bind address. This also sets the default
- RMI service bind address. Empty == all addresses -->
- <property name="bindAddress">${jboss.bind.address:localhost}</property>
-
- <!-- The port of the RMI naming service, 0 == anonymous -->
- <property name="rmiPort">
- <value-factory bean="ServiceBindingManager" method="getIntBinding">
- <parameter>jboss:service=Naming</parameter>
- <parameter>RmiPort</parameter>
- </value-factory>
- </property>
-
- <!-- The RMI service bind address. Empty == all addresses -->
- <property name="rmiBindAddress">${jboss.bind.address:localhost}</property>
-
- <!-- Set the java.rmi.server.hostname system property to rmiBindAddress -->
- <property name="enableRmiServerHostname">true</property>
-
- <!-- The thread pool service used to control the bootstrap lookups -->
- <property name="lookupExector"><inject bean="LookupPool"/></property>
- </bean>
</deployment>
Modified: branches/vfs3-int/server/src/etc/deployers/jsr77-deployers-jboss-beans.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deployers/jsr77-deployers-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/deployers/jsr77-deployers-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -7,7 +7,7 @@
<bean name="LocalJBossServerDomain" class="org.jboss.management.j2ee.deployers.LocalJBossServerDomain">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.management.local:j2eeType=J2EEDomain,name=Manager", exposedInterface=org.jboss.management.j2ee.deployers.LocalJBossServerDomainMBean.class, registerDirectly=true)</annotation>
- <property name="JNDIService">jboss:service=Naming</property>
+ <property name="JNDIService">jboss:service=NamingBeanImpl</property>
<property name="JTAService">jboss:service=TransactionManager</property>
<property name="userTransactionService">jboss:service=DistributedTransactionManager</property>
<property name="mailService">jboss:service=Mail</property>
Modified: branches/vfs3-int/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -235,6 +235,10 @@
<key>ejb-jar_3_0.xsd</key>
<value>org.jboss.metadata.ejb.spec.EjbJar30MetaData</value>
</entry>
+ <entry>
+ <key>ejb-jar_3_1.xsd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar31MetaData</value>
+ </entry>
<!-- JBossMetaData -->
<entry>
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -71,7 +71,7 @@
import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
import org.jboss.deployers.spi.annotations.Element;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* A POST_CLASSLOADER deployer which generates metadata from annotations.
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -33,10 +33,10 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
/**
* A VirtualFileVisitor that traverses unit root and determines the
@@ -95,17 +95,10 @@
public void visit(VirtualFile file)
{
- try
+ if(file.isLeaf())
{
- if(file.isLeaf())
- {
- accepts(file);
- }
+ accepts(file);
}
- catch (IOException e)
- {
- throw new Error("Error visiting " + file, e);
- }
}
public boolean accepts(VirtualFile file)
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotationMetaDataDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -48,8 +48,8 @@
import org.jboss.metadata.web.spec.Web25MetaData;
import org.jboss.metadata.web.spec.Web30MetaData;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
/**
* A POST_CLASSLOADER deployer which generates metadata from
@@ -160,15 +160,7 @@
return;
}
VirtualFile root = unit.getRoot();
- boolean isLeaf = true;
- try
- {
- isLeaf = root.isLeaf();
- }
- catch(IOException ignore)
- {
- }
- if(isLeaf == true)
+ if(root.isLeaf() == true)
return;
List<VirtualFile> classpath = unit.getClassPath();
@@ -334,16 +326,9 @@
return null;
}
- try
- {
- Manifest mf = VFSUtils.readManifest(file);
- Attributes attrs = mf.getMainAttributes();
- return attrs.getValue(Attributes.Name.MAIN_CLASS);
- }
- finally
- {
- file.close();
- }
+ Manifest mf = VFSUtils.readManifest(file);
+ Attributes attrs = mf.getMainAttributes();
+ return attrs.getValue(Attributes.Name.MAIN_CLASS);
}
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AppParsingDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -32,7 +32,7 @@
import org.jboss.metadata.ear.spec.ModulesMetaData;
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARContentsDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -41,8 +41,8 @@
import org.jboss.metadata.ear.spec.ModuleMetaData;
import org.jboss.metadata.ear.spec.ModulesMetaData;
import org.jboss.metadata.ear.spec.WebModuleMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
/**
* An implicit application.xml type of deployer. This deployer runs if
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARStructure.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARStructure.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/EARStructure.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -41,10 +41,10 @@
import org.jboss.metadata.ear.spec.ModuleMetaData;
import org.jboss.metadata.ear.spec.ModulesMetaData;
import org.jboss.metadata.ear.spec.WebModuleMetaData;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.SuffixMatchFilter;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
@@ -205,28 +205,19 @@
for (VirtualFile archive : archives)
{
addClassPath(structureContext, archive, true, true, context);
- try
+ // add any jars with persistence.xml as a deployment
+ if (archive.getChild("META-INF/persistence.xml") != null)
{
- // add any jars with persistence.xml as a deployment
- if (archive.getChild("META-INF/persistence.xml") != null)
+ log.trace(archive.getName() + " in ear lib directory has persistence units");
+ if (structureContext.determineChildStructure(archive) == false)
{
- log.trace(archive.getName() + " in ear lib directory has persistence units");
- if (structureContext.determineChildStructure(archive) == false)
- {
- throw new RuntimeException(archive.getName()
- + " in lib directory has persistence.xml but is not a recognized deployment, .ear: "
- + file.getName());
- }
+ throw new RuntimeException(archive.getName()
+ + " in lib directory has persistence.xml but is not a recognized deployment, .ear: "
+ + file.getName());
}
- else if (trace)
- log.trace(archive.getPathName() + " does not contain META-INF/persistence.xml");
-
}
- catch(IOException e)
- {
- // TODO - should we throw this fwd?
- log.warn("Exception searching for META-INF/persistence.xml in " + archive.getPathName() + ", " + e);
- }
+ else if (trace)
+ log.trace(archive.getPathName() + " does not contain META-INF/persistence.xml");
}
}
else if (trace)
@@ -264,24 +255,17 @@
if (log.isTraceEnabled())
log.trace("Checking application.xml module: " + fileName);
- try
+ VirtualFile module = file.getChild(fileName);
+ if (module == null)
{
- VirtualFile module = file.getChild(fileName);
- if (module == null)
- {
- throw new RuntimeException(fileName + " module listed in application.xml does not exist within .ear " + file.toURI());
- }
- // Ask the deployers to analyze this
- if(structureContext.determineChildStructure(module) == false)
- {
- throw new RuntimeException(fileName
- + " module listed in application.xml is not a recognized deployment, .ear: "
- + file.getName());
- }
+ throw new RuntimeException(fileName + " module listed in application.xml does not exist within .ear " + file.toURI());
}
- catch (IOException e)
+ // Ask the deployers to analyze this
+ if(structureContext.determineChildStructure(module) == false)
{
- throw new RuntimeException("Exception looking for " + fileName + " module listed in application.xml, .ear " + file.getName(), e);
+ throw new RuntimeException(fileName
+ + " module listed in application.xml is not a recognized deployment, .ear: "
+ + file.getName());
}
}
}
@@ -428,13 +412,7 @@
private VirtualFile getMetaDataFile(VirtualFile file, String path)
{
VirtualFile metaFile = null;
- try
- {
- metaFile = file.getChild(path);
- }
- catch(IOException ignored)
- {
- }
+ metaFile = file.getChild(path);
return metaFile;
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/EarLibExcludeDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -30,8 +30,8 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
/**
* Exclude ear's lib from AnnotationEnvironmentDeployer / OptAnnotationMetaDataDeployer processing.
@@ -94,7 +94,7 @@
{
try
{
- VirtualFile file = VFS.getRoot(rc.getUrl());
+ VirtualFile file = VFS.getChild(rc.getUrl());
while (file != null)
{
if (url.equals(file.toURL())) // our parent is the lib
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -25,8 +25,8 @@
import java.util.Set;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
/**
* Exclude virtual file by file name and path.
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/JBossEjbParsingDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -30,8 +30,8 @@
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
/**
* An ObjectModelFactoryDeployer for translating jboss.xml descriptors into
@@ -133,7 +133,7 @@
standardJBossXmlPath = new URL(configUrl, "standardjboss.xml");
}
- VirtualFile stdJBoss = VFS.getRoot(standardJBossXmlPath);
+ VirtualFile stdJBoss = VFS.getChild(standardJBossXmlPath);
if (stdJBoss == null && ignoreMissingStandardJBossXml == false)
{
throw new DeploymentException("standardjboss.xml not found in config dir: " + standardJBossXmlPath);
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -46,7 +46,7 @@
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* A POST_CLASSLOADER deployer which generates metadata from annotations.
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/TldParsingDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -24,7 +24,7 @@
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.web.spec.TldMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* An ObjectModelFactoryDeployer for translating tag library descriptors into
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/WebAppFragmentParsingDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -28,7 +28,7 @@
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.web.spec.WebFragmentMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* An ObjectModelFactoryDeployer for translating web-fragment.xml descriptors into
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/Container.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/Container.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/Container.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -189,7 +189,7 @@
/** SecurityManagement Instance - holder of all security managers */
protected ISecurityManagement securityManagement;
-
+
/** PolicyRegistration - Holds Authorization Policies */
protected PolicyRegistration policyRegistration;
@@ -241,8 +241,8 @@
/** The JACC context id for the container */
protected String jaccContextID;
- /**
- * Flag to denote whether a JACC configuration has been fitted for authorization
+ /**
+ * Flag to denote whether a JACC configuration has been fitted for authorization
*/
protected boolean isJaccEnabled = false;
@@ -289,7 +289,7 @@
/**
* Whether the bean is call by value
- *
+ *
* @return true for call by value
*/
public boolean isCallByValue()
@@ -339,7 +339,7 @@
public void setSecurityManagement(ISecurityManagement securityManagement)
{
this.securityManagement = securityManagement;
- }
+ }
public PolicyRegistration getPolicyRegistration()
{
@@ -413,7 +413,7 @@
// There's no factory thread local which means this is probably
// a local invocation. Just use the first (usually only)
// proxy factory.
- // TODO: define a default factory in the meta data or
+ // TODO: define a default factory in the meta data or
// even better, let the return over the original transport
// plugin the transport layer for the generated proxy
if (factory == null && remoteInterface != null)
@@ -476,9 +476,9 @@
this.timerService = timerService;
}
- /**
- * Get the flag whether JACC is enabled
- * @return
+ /**
+ * Get the flag whether JACC is enabled
+ * @return
*/
public boolean isJaccEnabled()
{
@@ -486,9 +486,9 @@
}
/**
- * Set the flag that JACC is enabled
- *
- * @param isJaccEnabled
+ * Set the flag that JACC is enabled
+ *
+ * @param isJaccEnabled
*/
public void setJaccEnabled(boolean isJaccEnabled)
{
@@ -506,6 +506,14 @@
}
/**
+ * Gets the deployment unit name that contains this container.
+ */
+ public String getDeploymentName()
+ {
+ return ejbModule.name;
+ }
+
+ /**
* Gets the number of create invocations that have been made
* @jmx.managed-attribute
*/
@@ -531,7 +539,62 @@
return invokeStats;
}
+
/**
+ * Converts the method invocation stats into a detyped nested map structure.
+ * The format is:
+ *
+ * {methodName => {statisticTypeName => longValue}}
+ *
+ * @return A map indexed by method name with map values indexed by statistic type
+ */
+ public Map<String, Map<String, Long>> getDetypedInvocationStatistics()
+ {
+ return invokeStats.toDetypedMap();
+ }
+
+ /**
+ * Return the current instance pool associate with this container if
+ * supported by the underlying container implementation.
+ *
+ * @return instance pool
+ * @throws UnsupportedOperationException if the container does not support an instance pool
+ */
+ protected InstancePool getInstancePool()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Get current pool size of the pool associated with this container,
+ * also known as the method ready count
+ *
+ * @throws UnsupportedOperationException if the container type does not support an instance pool
+ */
+ public int getCurrentPoolSize()
+ {
+ return getInstancePool().getCurrentSize();
+ }
+
+ /**
+ * Get current pool size of the pool associated with this container.
+ *
+ * @throws UnsupportedOperationException if the container type does not support an instance pool
+ */
+ public int getMaxPoolSize()
+ {
+ return getInstancePool().getMaxSize();
+ }
+
+ /**
+ * Resets the current invocation stats
+ */
+ public void resetInvocationStats()
+ {
+ invokeStats.resetStats();
+ }
+
+ /**
* Sets the class loader for this container. All the classes and resources
* used by the bean in this container will use this classloader.
*
@@ -643,7 +706,7 @@
}
else if (m.equals(EJB_TIMEOUT))
{
- // No role is required to access the ejbTimeout as this is
+ // No role is required to access the ejbTimeout as this is
permissions = new HashSet<Principal>();
permissions.add(AnybodyPrincipal.ANYBODY_PRINCIPAL);
methodPermissionsCache.put(m, permissions);
@@ -658,7 +721,7 @@
{
for (String role : roles)
permissions.add(new SimplePrincipal(role));
- }
+ }
methodPermissionsCache.put(m, permissions);
}
@@ -945,7 +1008,7 @@
public abstract void addInterceptor(Interceptor in);
/** The detached invoker operation.
- *
+ *
* @jmx.managed-operation
*
* @param mi - the method invocation context
@@ -1431,11 +1494,11 @@
if (securityDomain == null)
securityDomain = metaData.getApplicationMetaData().getSecurityDomain();
if (securityDomain != null)
- {
+ {
//JBAS-6060: Tolerate a Security Domain configuration without the java:/jaas prefix
if(securityDomain.startsWith(SecurityConstants.JAAS_CONTEXT_ROOT) == false)
securityDomain = SecurityConstants.JAAS_CONTEXT_ROOT + "/" + securityDomain;
-
+
log.debug("Binding securityDomain: " + securityDomain + " to JDNI ENC as: security/security-domain");
Util.bind(envCtx, "security/security-domain", new LinkRef(securityDomain));
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/ContainerMBean.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/ContainerMBean.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/ContainerMBean.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -27,16 +27,18 @@
import org.jboss.invocation.Invocation;
+import java.util.Map;
+
/**
* MBean interface.
*/
public interface ContainerMBean extends org.jboss.system.ServiceMBean
{
- /**
- * @return Gets the application deployment unit for this container. All the bean containers within the same application unit share the same instance.
- */
- EjbModule getEjbModule();
+ /**
+ * Gets the deployment name of the deployment unit that contains this container.
+ */
+ String getDeploymentName();
/**
* Gets the type of bean (Session, Entity, etc)
@@ -46,10 +48,45 @@
String getBeanTypeName();
/**
+ * @return Gets the application deployment unit for this container. All the bean containers within the same application unit share the same instance.
+ */
+ EjbModule getEjbModule();
+
+ /**
* @return Gets the number of create invocations that have been made
*/
long getCreateCount();
+ /**
+ * Converts the method invocation stats into a detyped nested map structure.
+ * The format is:
+ *
+ * {methodName => {statisticTypeName => longValue}}
+ *
+ * @return A map indexed by method name with map values indexed by statistic type
+ */
+ Map<String, Map<String, Long>> getDetypedInvocationStatistics();
+
+ /**
+ * Get current pool size of the pool associated with this container,
+ * also known as the method ready count
+ *
+ * @throws UnsupportedOperationException if the container type does not support an instance pool
+ */
+ int getCurrentPoolSize();
+
+ /**
+ * Gets the max pool size of the pool associated with this container
+ *
+ * @throws UnsupportedOperationException if the container type does not support an instance pool
+ */
+ int getMaxPoolSize();
+
+ /**
+ * Resets the current invocation stats
+ */
+ void resetInvocationStats();
+
/**
* @return Gets the number of remove invocations that have been made
*/
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/EjbUtil50.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/EjbUtil50.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/EjbUtil50.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -26,7 +26,6 @@
import java.util.Iterator;
import java.util.StringTokenizer;
-import org.jboss.deployers.structure.spi.DeploymentContext;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
import org.jboss.logging.Logger;
@@ -177,8 +176,7 @@
DeploymentUnit targetUnit = null;
try
{
- DeploymentContext ctx = server.getDeploymentContext(target.toString());
- targetUnit = ctx.getDeploymentUnit();
+ targetUnit = server.getDeploymentUnit(target.toString());
}
catch (Exception e)
{
@@ -362,8 +360,7 @@
DeploymentUnit targetUnit = null;
try
{
- DeploymentContext ctx = server.getDeploymentContext(target.toString());
- targetUnit = ctx.getDeploymentUnit();
+ targetUnit = server.getDeploymentUnit(target.toString());
}
catch (Exception e)
{
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -38,6 +38,7 @@
import javax.ejb.Handle;
import javax.management.ObjectName;
+import org.jboss.ejb.plugins.StatefulSessionInstanceCache;
import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationType;
import org.jboss.security.SimplePrincipal;
@@ -57,7 +58,7 @@
public class StatefulSessionContainer
extends SessionContainer
- implements EJBProxyFactoryContainer, InstancePoolContainer
+ implements EJBProxyFactoryContainer, InstancePoolContainer, StatefulSessionContainerMBean
{
/**
* This is the persistence manager for this container
@@ -82,6 +83,14 @@
return instanceCache;
}
+ public long getPassivatedCount()
+ {
+ if (! (instanceCache instanceof StatefulSessionInstanceCache))
+ throw new UnsupportedOperationException();
+
+ return ((StatefulSessionInstanceCache)instanceCache).getPassivatedCount();
+ }
+
public StatefulSessionPersistenceManager getPersistenceManager()
{
return persistenceManager;
Copied: branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainerMBean.java (from rev 99008, trunk/server/src/main/java/org/jboss/ejb/StatefulSessionContainerMBean.java)
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainerMBean.java (rev 0)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/StatefulSessionContainerMBean.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -0,0 +1,34 @@
+/*
+ * 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.ejb;
+
+public interface StatefulSessionContainerMBean extends ContainerMBean
+{
+
+ /**
+ * Get the number of instances in this container that are currently passivated.
+ *
+ * @return the number of passivated instances
+ */
+ public long getPassivatedCount();
+
+}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -65,7 +65,7 @@
/**
* A real deployer that translates JBossMetaData into ServiceMetaData for
* the ejb module service mbeans.
- *
+ *
* @author Scott.Stark at jboss.org
* @author adrian at jboss.org
* @version $Revision$
@@ -81,7 +81,7 @@
private String ccmServiceName;
/** The ejb timer service */
private String timerServiceName;
-
+
private boolean callByValue;
private String unauthenticatedIdentity = null;
@@ -169,7 +169,7 @@
/**
* Obtain an unauthenticated identity
- *
+ *
* @return the unauthenticated identity
*/
public String getUnauthenticatedIdentity()
@@ -185,7 +185,7 @@
{
this.unauthenticatedIdentity = unauthenticatedIdentity;
}
-
+
public void setDefaultSecurityDomain(String defaultSecurityDomain)
{
this.defaultSecurityDomain = defaultSecurityDomain;
@@ -195,11 +195,11 @@
{
this.securityManagementName = sm;
}
-
+
public void setSecurityContextClassName(String securityContextClassName)
{
this.securityContextClassName = securityContextClassName;
- }
+ }
/**
* Get the PolicyRegistration Name
@@ -322,7 +322,7 @@
attr.setName("PolicyRegistration");
ServiceInjectionValueMetaData prInjectionValue = new ServiceInjectionValueMetaData(policyRegistrationName);
attr.setValue(prInjectionValue);
- attrs.add(attr);
+ attrs.add(attr);
// Add injection of the WebServiceName
String wsName = getWebServiceName();
if (wsName != null)
@@ -343,8 +343,8 @@
tms.setValue(tmsDepends);
attrs.add(tms);
- ejbModule.setAttributes(attrs);
-
+ ejbModule.setAttributes(attrs);
+
List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
// CCM for CachedConnectionInterceptor dependency
// TODO: this should be injected directly to the interceptor
@@ -437,7 +437,7 @@
ObjectName n = new ObjectName(depend);
ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
sdmd.setIDependOn(n.toString());
- dependencies.add(sdmd);
+ dependencies.add(sdmd);
}
}
catch(MalformedObjectNameException e)
@@ -459,7 +459,7 @@
//Pass the unauthenticated identity
if(this.unauthenticatedIdentity != null)
unit.addAttachment("EJB.unauthenticatedIdentity", this.unauthenticatedIdentity, String.class);
- //Pass the SecurityContextClassName
+ //Pass the SecurityContextClassName
if(this.securityContextClassName != null)
unit.addAttachment("EJB.securityContextClassName", securityContextClassName, String.class);
//Pass the Default SecurityDomain
@@ -469,7 +469,7 @@
@Override
public void undeploy(VFSDeploymentUnit unit, JBossMetaData deployment)
- {
+ {
}
/**
@@ -480,7 +480,7 @@
* @param unit the deployment unit
* @param metaData - the ejb jar metaData
* @return "jboss.j2ee:service=EjbModule,module="+unit.getSimpleName()
- * @throws MalformedObjectNameException
+ * @throws MalformedObjectNameException
*/
protected ObjectName getObjectName(VFSDeploymentUnit unit, JBossMetaData metaData)
throws MalformedObjectNameException
@@ -500,9 +500,9 @@
}
unitShortName = unitShortName.substring(unitShortName.lastIndexOf("/") + 1);
- //
+ //
unitShortName = ObjectName.quote(unitShortName);
- name = EjbModule.BASE_EJB_MODULE_NAME + ",module=" + unitShortName;
+ name = EjbModule.BASE_EJB_MODULE_NAME + ",module=" + unitShortName + ",uid=" + System.identityHashCode(metaData);
}
return new ObjectName(name);
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCXmlFileLoader.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -26,7 +26,7 @@
import org.jboss.logging.Logger;
import org.jboss.metadata.XmlFileLoader;
import org.jboss.ejb.Container;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
import org.w3c.dom.Element;
/**
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/PreSecurityInterceptor.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/PreSecurityInterceptor.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/PreSecurityInterceptor.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -101,6 +101,7 @@
log.trace("process:isInvoke="+isInvoke + " bean="+ container.getServiceName());
SecurityIdentity si = null;
+ String incomingDomain = null;
Method m = mi.getMethod();
boolean isEjbTimeOutMethod = m!= null && m.getName().equals(timedObjectMethod);
//For local ejb invocations
@@ -110,10 +111,15 @@
//Cache the security context
SecurityContext sc = SecurityActions.getSecurityContext();
if(sc != null)
- si = SecurityActions.getSecurityIdentity(sc);
+ {
+ si = SecurityActions.getSecurityIdentity(sc);
+ incomingDomain = sc.getSecurityDomain();
+ }
SecurityActions.setSecurityManagement(sc, container.getSecurityManagement());
-
+ // set the container's security domain in the security context
+ SecurityActions.setSecurityDomain(sc, this.securityDomain);
+
log.trace("SecurityIdentity="+SecurityActions.trace(si));
//Set the security context on the invocation
mi.setSecurityContext(sc);
@@ -139,7 +145,9 @@
{
SecurityActions.popCallerRunAsIdentity();
if(mi.isLocal() && si != null)
- SecurityActions.setSecurityIdentity(SecurityActions.getSecurityContext(), si);
+ SecurityActions.setSecurityIdentity(SecurityActions.getSecurityContext(), si);
+ if(mi.isLocal() && incomingDomain != null)
+ SecurityActions.setSecurityDomain(SecurityActions.getSecurityContext(), incomingDomain);
log.trace("Exit process():isInvoke="+isInvoke);
}
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/SecurityActions.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/SecurityActions.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/ejb/plugins/security/SecurityActions.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -143,6 +143,18 @@
);
}
+ static void setSecurityDomain(final SecurityContext sc, final String domain)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ sc.setSecurityDomain(domain);
+ return null;
+ }
+ });
+ }
+
static String trace(final SecurityContext sc)
{
return AccessController.doPrivileged(new PrivilegedAction<String>()
Modified: branches/vfs3-int/server/src/main/java/org/jboss/invocation/InvocationStatistics.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/invocation/InvocationStatistics.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/invocation/InvocationStatistics.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -41,7 +41,7 @@
private static final long serialVersionUID = -8031193044335393420L;
/** A HashMap<Method, TimeStatistic> of the method invocations */
- private Map methodStats;
+ private Map<Method, TimeStatistic> methodStats;
public long concurrentCalls = 0;
public long maxConcurrentCalls = 0;
@@ -52,7 +52,7 @@
{
/** @since 4.2.0 */
private static final long serialVersionUID = -8689933338506854386L;
-
+
public volatile long count;
public volatile long minTime = Long.MAX_VALUE;
public volatile long maxTime;
@@ -80,7 +80,7 @@
*/
public void updateStats(Method m, long elapsed)
{
- TimeStatistic stat = (TimeStatistic) methodStats.get(m);
+ TimeStatistic stat = methodStats.get(m);
if (stat == null)
{
stat = new TimeStatistic();
@@ -147,11 +147,10 @@
tmp.append(concurrentCalls);
tmp.append("' >\n");
- HashMap copy = new HashMap(methodStats);
- Iterator iter = copy.entrySet().iterator();
+ Iterator<Map.Entry<Method, TimeStatistic>> iter = methodStats.entrySet().iterator();
while (iter.hasNext())
{
- Map.Entry entry = (Map.Entry) iter.next();
+ Map.Entry<Method, TimeStatistic> entry = iter.next();
TimeStatistic stat = (TimeStatistic) entry.getValue();
if (stat != null)
{
@@ -171,4 +170,39 @@
tmp.append("</InvocationStatistics>");
return tmp.toString();
}
+
+ /**
+ * Converts the method invocation stats into a detyped nested map structure.
+ * The format is:
+ *
+ * {methodName => {statisticTypeName => longValue}}
+ *
+ * In addition some other global statistics are added under the fake
+ * method name #Global
+ *
+ * @return A map indexed by method name with map values indexed by statistic type
+ */
+ public Map<String, Map<String, Long>> toDetypedMap()
+ {
+
+ Map<String, Map<String, Long>> detyped = new HashMap<String, Map<String, Long>>();
+ for (Map.Entry<Method, TimeStatistic> entry : methodStats.entrySet())
+ {
+ TimeStatistic stats = entry.getValue();
+ Map<String, Long> detypedStats = new HashMap<String, Long>(methodStats.size());
+ detypedStats.put("count", stats.count);
+ detypedStats.put("minTime", stats.minTime);
+ detypedStats.put("maxTime", stats.maxTime);
+ detypedStats.put("totalTime", stats.totalTime);
+ detyped.put(entry.getKey().getName(), detypedStats);
+ }
+
+ Map<String, Long> global = new HashMap<String, Long>();
+ global.put("concurrentCalls", concurrentCalls);
+ global.put("maxConcurrentCalls", maxConcurrentCalls);
+ global.put("lastResetTime", lastResetTime);
+ detyped.put("#Global", global);
+
+ return detyped;
+ }
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/tm/usertx/client/ClientUserTransaction.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/tm/usertx/client/ClientUserTransaction.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/tm/usertx/client/ClientUserTransaction.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -113,6 +113,9 @@
public void begin()
throws NotSupportedException, SystemException
{
+ if(getStatus() != Status.STATUS_NO_TRANSACTION)
+ throw new NotSupportedException("Attempt to start a nested transaction (the transaction started previously hasn't been ended yet).");
+
ThreadInfo info = getThreadInfo();
trace = log.isTraceEnabled(); // Only check for trace enabled once per transaction
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -67,9 +67,9 @@
import org.jboss.system.metadata.ServiceInjectionValueMetaData;
import org.jboss.system.metadata.ServiceMetaData;
import org.jboss.util.file.Files;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
import org.jboss.web.WebApplication;
/** A template pattern class for web container integration into JBoss. This class
@@ -369,7 +369,7 @@
if (root != unjared)
{
// get the real unjared url
- expWarUrl = VFSUtils.getRealURL(unjared);
+ expWarUrl = VFSUtils.getPhysicalURL(unjared);
// Map
String warPathName = root.getPathName();
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployment.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -69,7 +69,7 @@
import org.jboss.security.ISecurityManagement;
import org.jboss.security.SecurityConstants;
import org.jboss.security.authorization.PolicyRegistration;
-import org.jboss.virtual.VFSUtils;
+import org.jboss.vfs.VFSUtils;
import org.jboss.web.WebApplication;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.omg.CORBA.ORB;
@@ -435,7 +435,7 @@
if (warUrl == null && unit instanceof VFSDeploymentUnit)
{
VFSDeploymentUnit vdu = VFSDeploymentUnit.class.cast(unit);
- warUrl = VFSUtils.getRealURL(vdu.getRoot());
+ warUrl = VFSUtils.getPhysicalURL(vdu.getRoot());
}
// Dynamic WebMetaData deployments might not provide an URL
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -38,7 +38,7 @@
import org.jboss.metadata.annotation.finder.AnnotationFinder;
import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* A POST_CLASSLOADER deployer which generates metadata from
Modified: branches/vfs3-int/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java
===================================================================
--- branches/vfs3-int/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/system/src/main/java/org/jboss/system/server/profileservice/repository/clustered/ClusteredDeploymentRepository.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -347,10 +347,27 @@
public ProfileDeployment removeDeployment(String vfsPath) throws Exception
{
- ProfileDeployment deployment = getDeployment(vfsPath);
- VirtualFile root = deployment.getRoot();
- this.clusteringHandler.removeDeploymentContent(root);
- return super.removeDeployment(deployment.getName());
+ if (this.clusteringHandler == null)
+ {
+ throw new IllegalStateException("Must register RepositoryClusteringHandler before invoking removeDeployment()");
+ }
+
+ // Take control of the cluster
+ if (!this.clusteringHandler.lockGlobally())
+ {
+ throw new RuntimeException("Cannot acquire global lock");
+ }
+ try
+ {
+ ProfileDeployment deployment = getDeployment(vfsPath);
+ VirtualFile root = deployment.getRoot();
+ this.clusteringHandler.removeDeploymentContent(root);
+ return super.removeDeployment(deployment.getName());
+ }
+ finally
+ {
+ this.clusteringHandler.unlockGlobally();
+ }
}
public Collection<ModificationInfo> getModifiedDeployments() throws Exception
Modified: branches/vfs3-int/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java
===================================================================
--- branches/vfs3-int/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/system/src/main/java/org/jboss/system/tools/ProfileServiceDeploymentRepositoryAdapter.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -44,8 +44,8 @@
import org.jboss.system.server.profileservice.hotdeploy.Scanner;
import org.jboss.system.server.profileservice.repository.HotDeploymentRepository;
import org.jboss.system.server.profileservice.repository.TypedProfileRepository;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
/**
* Profile deployment repository adapter.
Modified: branches/vfs3-int/testsuite/build.xml
===================================================================
--- branches/vfs3-int/testsuite/build.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/build.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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"/>
@@ -1308,6 +1307,13 @@
<server:stop name="all"/>
</target>
+ <target name="stress-tests"
+ description="A basic set of units tests which are run against the jboss all config" depends="init">
+ <server:start name="all"/>
+ <antcall target="tests-standard-stress" inheritRefs="true"/>
+ <server:stop name="all"/>
+ </target>
+
<target name="tests-profileservice" depends="init" description="Tests with the full featured profile service">
<create-profileservice-config baseconf="default" conf="profileservice"/>
<server:start name="profileservice"/>
@@ -1358,6 +1364,11 @@
<patternset>
<include name="conf/**"/>
<include name="deployers/**"/>
+ <include name="deploy/**"/>
+ <include name="lib/**"/>
+ <!-- Previous broken and fragile detailed listing of deploy content
+ <include name="conf/**"/>
+ <include name="deployers/**"/>
<include name="deploy/jbossweb.sar/**"/>
<include name="deploy/ROOT.war/**"/>
<include name="deploy/security/**"/>
@@ -1367,6 +1378,7 @@
<include name="deploy/jmx-invoker-service.xml"/>
<include name="deploy/transaction-jboss-beans.xml"/>
<include name="deploy/thread-pool-jboss-beans.xml"/>
+ -->
</patternset>
</create-config>
@@ -1522,29 +1534,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"
@@ -1622,7 +1611,7 @@
<sysproperty key="jboss.dist" value="${jboss.dist}"/>
<sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
@@ -1694,7 +1683,7 @@
<sysproperty key="jboss.dist" value="${jboss.dist}"/>
<sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="java.naming.factory.initial" value="org.jboss.naming.HttpNamingContextFactory"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.http.url}"/>
@@ -1754,7 +1743,7 @@
<sysproperty key="jboss.dist" value="${jboss.dist}"/>
<sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
@@ -2760,7 +2749,7 @@
<sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
@@ -2821,7 +2810,7 @@
<sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
@@ -2893,7 +2882,7 @@
<sysproperty key="javax.xml.registry.ConnectionFactoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
<sysproperty key="jaxr.query.url" value="http://${node0}:8080/juddi/inquiry"/>
<sysproperty key="jaxr.publish.url" value="http://${node0}:8080/juddi/publish"/>
- <sysproperty key="scout.proxy.transportClass" value="org.jboss.jaxr.juddi.transport.SaajTransport"/>
+ <sysproperty key="scout.proxy.transportClass" value="org.jboss.jaxr.scout.transport.SaajTransport"/>
<sysproperty key="host.name" value="${node0}"/>
<sysproperty key="jndi.bind.name" value="JAXR"/>
<sysproperty key="jaxr.debug" value="true"/>
@@ -3333,7 +3322,7 @@
</syspropertyset>
<sysproperty key="java.security.auth.login.config"
value="${build.resources}/security/auth.conf"/>
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="jboss.vfs.forceCopy" value="true"/>
<classpath>
@@ -3477,7 +3466,7 @@
<sysproperty key="jboss.dist" value="${jboss.dist}"/>
<sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed"/>
<!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
<sysproperty key="build.testlog" value="${build.testlog}"/>
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
@@ -3895,37 +3884,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 +3913,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: branches/vfs3-int/testsuite/imports/sections/cluster.xml
===================================================================
--- branches/vfs3-int/testsuite/imports/sections/cluster.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/imports/sections/cluster.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/imports/sections/naming.xml
===================================================================
--- branches/vfs3-int/testsuite/imports/sections/naming.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/imports/sections/naming.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/imports/sections/pooled.xml
===================================================================
--- branches/vfs3-int/testsuite/imports/sections/pooled.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/imports/sections/pooled.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/imports/server-config.xml
===================================================================
--- branches/vfs3-int/testsuite/imports/server-config.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/imports/server-config.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -751,6 +751,7 @@
<jvmarg value="-XX:MaxPermSize=512m" />
<jvmarg value="-XX:-UseGCOverheadLimit" />
<sysproperty key="jboss.service.binding.set" value="ports-01" />
+ <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
<sysproperty key="java.net.preferIPv4Stack" value="true" />
<sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
<sysproperty key="jboss.messaging.ServerPeerID" value="0" />
@@ -762,6 +763,7 @@
<jvmarg value="-XX:MaxPermSize=512m" />
<jvmarg value="-XX:-UseGCOverheadLimit" />
<sysproperty key="jboss.service.binding.set" value="ports-02" />
+ <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
<sysproperty key="java.net.preferIPv4Stack" value="true" />
<sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
<sysproperty key="jboss.messaging.ServerPeerID" value="1" />
@@ -774,13 +776,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>
@@ -1373,7 +1368,7 @@
<sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed"/>
<!-- [JBAS-3969] IOException: unknown protocol: vfsfile -->
- <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.virtual.protocol"/>
+ <sysproperty key="java.protocol.handler.pkgs" value="org.jboss.vfs.protocol"/>
<syspropertyset>
<propertyref prefix="jbosstest"/>
</syspropertyset>
Modified: branches/vfs3-int/testsuite/imports/test-jars.xml
===================================================================
--- branches/vfs3-int/testsuite/imports/test-jars.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/imports/test-jars.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/ejb2/test/PooledHAUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/HAInvokerUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -63,12 +63,6 @@
haProxyFailoverTest("jmx/HAServiceUnified");
}
- public void testPooledHAProxyFailover()
- throws Exception
- {
- haProxyFailoverTest("jmx/HAServicePooled");
- }
-
public void testHttpHAProxyFailover()
throws Exception
{
Copied: branches/vfs3-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java (from rev 99008, trunk/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java)
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java (rev 0)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.cts.test;
+
+import java.util.Properties;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.transaction.NotSupportedException;
+import javax.transaction.UserTransaction;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.cts.interfaces.CtsCmpHome;
+import org.jboss.test.cts.interfaces.CtsCmp;
+import org.jboss.test.cts.keys.AccountPK;
+
+/** Tests of accessing the UserTransaction interface.
+ *
+ * @author alex at jboss.org
+ * @version $Revision: 57211 $
+ */
+public class NestedUserTransactionTestCase extends JBossTestCase
+{
+
+ public NestedUserTransactionTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testWithDefaultJndiContext() throws Exception
+ {
+ System.setProperty(Context.PROVIDER_URL, getServerHost() + ":1099");
+ InitialContext ctx = new InitialContext();
+ UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
+
+ ut.begin();
+ try
+ {
+ ut.begin();
+ fail("Attempt to start a nested user transaction should fail with NotSupportedException.");
+ }
+ catch(NotSupportedException e)
+ {
+ // expected
+ }
+ finally
+ {
+ ut.rollback();
+ }
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(NestedUserTransactionTestCase.class, "cts.jar");
+ }
+}
Modified: branches/vfs3-int/testsuite/src/main/org/jboss/test/jca/test/TxConnectionManagerStressTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/jca/test/TxConnectionManagerStressTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/jca/test/TxConnectionManagerStressTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -244,8 +244,8 @@
connectionCount = new AtomicInteger(0);
errorCount = new AtomicInteger(0);
- final int reps = 5; //getIterationCount();
- final int threadsPerConnection = 10; //getThreadCount();
+ final int reps = 2; //getIterationCount();
+ final int threadsPerConnection = 5; //getThreadCount();
final long sleepTime = sleep;
InternalManagedConnectionPool.PoolParams pp = new InternalManagedConnectionPool.PoolParams();
Deleted: branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/PooledInvokerUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java (from rev 99008, trunk/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java)
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java (rev 0)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/naming/test/UnifiedInvokerUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/profileservice/override/restart/test/ServiceBindingManagedObjectsTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedBUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
===================================================================
--- branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-ejb-jar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/cluster/ejb2/basic/pooledha-jboss.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/cluster/invokerha/META-INF/jboss-service.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/naming/services/naming-xmbean.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/naming/services/naming-xmbean.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/naming/services/naming-xmbean.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/naming/services/pooled-service.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/naming/services/pooled-service.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/naming/services/pooled-service.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/naming/services/unified-service.xml (from rev 99008, trunk/testsuite/src/resources/naming/services/unified-service.xml)
===================================================================
--- branches/vfs3-int/testsuite/src/resources/naming/services/unified-service.xml (rev 0)
+++ branches/vfs3-int/testsuite/src/resources/naming/services/unified-service.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/pooled/client.policy
===================================================================
--- branches/vfs3-int/testsuite/src/resources/pooled/client.policy 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/pooled/client.policy 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,4 +0,0 @@
-grant {
- // Allow everything for now
- permission java.security.AllPermission;
-};
Deleted: branches/vfs3-int/testsuite/src/resources/pooled/jboss-service.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/pooled/jboss-service.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/pooled/jboss-service.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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: branches/vfs3-int/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -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>
Modified: branches/vfs3-int/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/test-configs/embedded/conf/bootstrap/profile.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -103,7 +103,7 @@
<bean name="ProfileServicePersistenceDeployer" class="org.jboss.system.server.profileservice.persistence.deployer.ProfileServicePersistenceDeployer" />
<!-- A filter for excluding files from the scanner -->
- <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+ <bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
<!-- Files starting with theses strings are ignored -->
<property name="prefixes">#,%,\,,.,_$</property>
<!-- Files ending with theses strings are ignored -->
Modified: branches/vfs3-int/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/test-configs/tomcat-webctx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -10,7 +10,7 @@
<bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
<property name="webInfLibFilter">
<!-- We accept all .jar files in WEB-INF/lib -->
- <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+ <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
<constructor><parameter class="java.lang.String">.jar</parameter></constructor>
</bean>
</property>
Modified: branches/vfs3-int/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml
===================================================================
--- branches/vfs3-int/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/testsuite/src/resources/web/federation/authext/war-deployers-jboss-beans.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -10,7 +10,7 @@
<bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
<property name="webInfLibFilter">
<!-- We accept all .jar files in WEB-INF/lib -->
- <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+ <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
<constructor><parameter class="java.lang.String">.jar</parameter></constructor>
</bean>
</property>
Modified: branches/vfs3-int/tomcat/pom.xml
===================================================================
--- branches/vfs3-int/tomcat/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/tomcat/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -177,10 +177,6 @@
<artifactId>jacorb</artifactId>
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
</dependency>
Copied: branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/security/RemoteHostValve.java (from rev 99008, trunk/tomcat/src/main/java/org/jboss/web/tomcat/security/RemoteHostValve.java)
===================================================================
--- branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/security/RemoteHostValve.java (rev 0)
+++ branches/vfs3-int/tomcat/src/main/java/org/jboss/web/tomcat/security/RemoteHostValve.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.web.tomcat.security;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.valves.ValveBase;
+import org.jboss.logging.Logger;
+import org.jboss.security.plugins.HostThreadLocal;
+
+/**
+ This valve gets the remote host and sticks it in a thread local. It is
+ to be used with RemoteHostTrustLoginModule in particular
+
+ @author Andrew C. Oliver (acoliver at gmail.com)
+ @version $Revision: 0 $
+ */
+public class RemoteHostValve extends ValveBase
+{
+ private static Logger log = Logger.getLogger(RemoteHostValve.class);
+ private boolean trace = log.isTraceEnabled();
+
+ public void invoke(Request request, Response response)
+ throws IOException, ServletException
+ {
+ String remoteHost = request.getRemoteHost();
+ if(trace)
+ {
+ log.trace("RemoteHostValve set remoteHost to be "+remoteHost);
+ }
+
+ HostThreadLocal.set(remoteHost);
+ getNext().invoke(request, response);
+ }
+}
\ No newline at end of file
Modified: branches/vfs3-int/varia/pom.xml
===================================================================
--- branches/vfs3-int/varia/pom.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/pom.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -196,10 +196,6 @@
<artifactId>opensaml</artifactId>
</dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
<dependency>
<groupId>org.jboss</groupId>
Modified: branches/vfs3-int/varia/src/assembly/deployment-service-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/deployment-service-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/deployment-service-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>deployment-service-sar</id>
+ <id>deployment-service</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/foe-deployer-3.2-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/foe-deployer-3.2-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/foe-deployer-3.2-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>foe-deployer-3.2-sar</id>
+ <id>foe-deployer-3.2</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/http-invoker-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/http-invoker-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/http-invoker-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>http-invoker-sar</id>
+ <id>http-invoker</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/httpha-invoker-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/httpha-invoker-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/httpha-invoker-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>httpha-invoker-sar</id>
+ <id>httpha-invoker</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/mbean-configurator-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/mbean-configurator-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/mbean-configurator-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>mbean-configurator-sar</id>
+ <id>mbean-configurator</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/persistent-service-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/persistent-service-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/persistent-service-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>persistent-service-sar</id>
+ <id>persistent-service</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/assembly/snmp-adaptor-sar.xml
===================================================================
--- branches/vfs3-int/varia/src/assembly/snmp-adaptor-sar.xml 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/assembly/snmp-adaptor-sar.xml 2010-01-05 15:40:49 UTC (rev 99032)
@@ -1,7 +1,7 @@
<assembly>
- <id>snmp-adaptor-sar</id>
+ <id>snmp-adaptor</id>
<formats>
- <format>jar</format>
+ <format>sar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
Modified: branches/vfs3-int/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java
===================================================================
--- branches/vfs3-int/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/varia/src/main/java/org/jboss/varia/deployment/LegacyBeanShellDeployer.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -23,7 +23,7 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* .bsh file deployer.
Modified: branches/vfs3-int/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- branches/vfs3-int/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-01-05 12:01:53 UTC (rev 99031)
+++ branches/vfs3-int/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-01-05 15:40:49 UTC (rev 99032)
@@ -10,7 +10,7 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
More information about the jboss-cvs-commits
mailing list