[jboss-cvs] JBossAS SVN: r104062 - in branches/KABIR_JAVASSIST_REFLECT: build and 25 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 16 11:20:16 EDT 2010
Author: kabir.khan at jboss.com
Date: 2010-04-16 11:20:10 -0400 (Fri, 16 Apr 2010)
New Revision: 104062
Added:
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionUnitTestCase.java
Removed:
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java
Modified:
branches/KABIR_JAVASSIST_REFLECT/
branches/KABIR_JAVASSIST_REFLECT/build/build.xml
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/managed/ProtocolStackConfigurationsMapper.java
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/util/PingJndi.java
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/interfaces/HASessionState.java
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/server/HASessionStateService.java
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/jndi/LookupSucceededFilter.java
branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/timestamp/TimestampDiscrepancyService.java
branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml
branches/KABIR_JAVASSIST_REFLECT/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
branches/KABIR_JAVASSIST_REFLECT/depchain/pom.xml
branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/clustered/hornetq-configuration.xml
branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml
branches/KABIR_JAVASSIST_REFLECT/profileservice/src/main/java/org/jboss/profileservice/management/client/ManagedComponentDelegate.java
branches/KABIR_JAVASSIST_REFLECT/security/src/main/java/org/jboss/security/jndi/JndiLoginInitialContextFactory.java
branches/KABIR_JAVASSIST_REFLECT/server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml
branches/KABIR_JAVASSIST_REFLECT/testsuite/imports/server-config.xml
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/LookupSucceededFilterUnitTestCase.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/multicfg/test/DistributedStateTestCase.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/rspfilter/TruthfulResponseFilter.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java
branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/hornetq/deploy/hornetq/hornetq-configuration.xml
branches/KABIR_JAVASSIST_REFLECT/webservices/pom.xml
Log:
Merged revisions 104006-104007,104026-104029,104034,104040,104042,104045,104050-104054,104056-104059 via svnmerge from
https://svn.jboss.org/repos/jbossas/trunk
.......
r104006 | sguilhen at redhat.com | 2010-04-15 16:45:44 +0100 (Thu, 15 Apr 2010) | 1 line
JBAS-7942: Fixed HttpsClient by setting a SSLSocketFactory that points to the tests truststore in the HTTP connection
.......
r104007 | emuckenhuber | 2010-04-15 16:51:25 +0100 (Thu, 15 Apr 2010) | 1 line
fallback to already processed state, in case it's unknown
.......
r104026 | bstansberry at jboss.com | 2010-04-15 21:42:04 +0100 (Thu, 15 Apr 2010) | 1 line
[JBAS-7945] Add test
.......
r104027 | bstansberry at jboss.com | 2010-04-15 23:43:05 +0100 (Thu, 15 Apr 2010) | 1 line
[JBAS-7945] Make thread safe
.......
r104028 | bstansberry at jboss.com | 2010-04-15 23:43:47 +0100 (Thu, 15 Apr 2010) | 1 line
Use more informative assertion types
.......
r104029 | marius.bogoevici | 2010-04-16 02:27:04 +0100 (Fri, 16 Apr 2010) | 1 line
Using a new version of Snowdrop and Spring (just for tests)
.......
r104034 | clebert.suconic at jboss.com | 2010-04-16 04:47:33 +0100 (Fri, 16 Apr 2010) | 1 line
Placing wait back to fix a few HornetQ tests
.......
r104040 | clebert.suconic at jboss.com | 2010-04-16 08:11:52 +0100 (Fri, 16 Apr 2010) | 1 line
Upgrading HornetQ to Beta2
.......
r104042 | alex.loubyansky at jboss.com | 2010-04-16 10:26:30 +0100 (Fri, 16 Apr 2010) | 1 line
related to JBAS-7507, changing TestCase suffix to UnitTestCase so it gets included into the bulk targets
.......
r104045 | jaikiran | 2010-04-16 12:22:06 +0100 (Fri, 16 Apr 2010) | 1 line
JBAS-7948 Fixed the testsuite build failure - Changed reference from org.jboss.snowdrop:snowdrop:zip to org.jboss.snowdrop:jboss-spring-deployer:zip
.......
r104050 | bstansberry at jboss.com | 2010-04-16 13:49:20 +0100 (Fri, 16 Apr 2010) | 1 line
Fix compiler warnings
.......
r104051 | bstansberry at jboss.com | 2010-04-16 13:50:27 +0100 (Fri, 16 Apr 2010) | 1 line
Clean import
.......
r104052 | bstansberry at jboss.com | 2010-04-16 13:52:38 +0100 (Fri, 16 Apr 2010) | 1 line
Clean import
.......
r104053 | bstansberry at jboss.com | 2010-04-16 13:54:54 +0100 (Fri, 16 Apr 2010) | 1 line
Clean import
.......
r104054 | bstansberry at jboss.com | 2010-04-16 13:58:11 +0100 (Fri, 16 Apr 2010) | 1 line
Fix mistaken use of log4j Logger
.......
r104056 | mmoyses | 2010-04-16 15:09:00 +0100 (Fri, 16 Apr 2010) | 1 line
removing useless if/else logic
.......
r104057 | emuckenhuber | 2010-04-16 15:13:03 +0100 (Fri, 16 Apr 2010) | 1 line
don't process MOs twice, otherwise merging might not work
.......
r104058 | emuckenhuber | 2010-04-16 15:17:19 +0100 (Fri, 16 Apr 2010) | 1 line
cleanup unused imports
.......
r104059 | mmoyses | 2010-04-16 15:34:36 +0100 (Fri, 16 Apr 2010) | 1 line
JBAS-7949: fixing security context handling
.......
Property changes on: branches/KABIR_JAVASSIST_REFLECT
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-104005
+ /trunk:1-104061
Modified: branches/KABIR_JAVASSIST_REFLECT/build/build.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/build/build.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/build/build.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -2059,7 +2059,6 @@
<fileset refid="org.hornetq:hornetq-bootstrap:jar"/>
<fileset refid="org.hornetq:hornetq-core:jar"/>
<fileset refid="org.hornetq:hornetq-logging:jar"/>
- <fileset refid="org.hornetq:hornetq-transports:jar"/>
<fileset refid="org.jboss.jbossas:jboss-as-hornetq-int:jar"/>
<fileset refid="org.hornetq:hornetq-jms:jar"/>
<mapper refid="remove-versions" />
@@ -2273,7 +2272,6 @@
<fileset refid="org.jboss.weld:weld-api:jar"/>
<fileset refid="org.hornetq:hornetq-core-client:jar"/>
<fileset refid="org.hornetq:hornetq-jms-client:jar"/>
- <fileset refid="org.hornetq:hornetq-transports:jar"/>
<fileset refid="org.jboss:jbossxb:jar"/>
<mapper refid="remove-versions" />
</copy>
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/managed/ProtocolStackConfigurationsMapper.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/managed/ProtocolStackConfigurationsMapper.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/managed/ProtocolStackConfigurationsMapper.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -27,7 +27,6 @@
import java.util.Map;
import org.jboss.ha.framework.server.ProtocolStackConfigInfo;
-import org.jboss.logging.Logger;
import org.jboss.metatype.api.types.CompositeMetaType;
import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
import org.jboss.metatype.api.types.MetaType;
@@ -42,7 +41,6 @@
import org.jboss.metatype.spi.values.MetaMapper;
import org.jgroups.conf.ConfiguratorFactory;
import org.jgroups.conf.ProtocolData;
-import org.jgroups.conf.ProtocolParameter;
import org.jgroups.conf.ProtocolStackConfigurator;
/**
@@ -53,8 +51,6 @@
*/
public class ProtocolStackConfigurationsMapper extends MetaMapper<Map<String, ProtocolStackConfigInfo>>
{
- private static final Logger log = Logger.getLogger(ProtocolStackConfigurationsMapper.class);
-
private static final ProtocolStackConfigMapper CONFIG_MAPPER = new ProtocolStackConfigMapper();
public static final CompositeMetaType TYPE;
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/util/PingJndi.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/util/PingJndi.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/framework/server/util/PingJndi.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -29,7 +29,6 @@
import javax.naming.NamingException;
import org.jboss.ha.framework.server.AddressPort;
-import org.jboss.ha.framework.server.util.TopologyMonitorService;
import org.jboss.logging.Logger;
import org.jboss.system.ServiceMBeanSupport;
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/interfaces/HASessionState.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/interfaces/HASessionState.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/interfaces/HASessionState.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -21,7 +21,6 @@
*/
package org.jboss.ha.hasessionstate.interfaces;
-import org.jboss.ha.hasessionstate.interfaces.PackagedSession;
import org.jboss.ha.framework.interfaces.HAPartition;
/**
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/server/HASessionStateService.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/server/HASessionStateService.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/hasessionstate/server/HASessionStateService.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -28,7 +28,6 @@
import javax.management.MalformedObjectNameException;
import org.jboss.ha.framework.interfaces.HAPartition;
-import org.jboss.ha.hasessionstate.server.HASessionStateImpl;
/**
* Service class for HASessionState
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/jndi/LookupSucceededFilter.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/jndi/LookupSucceededFilter.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/jndi/LookupSucceededFilter.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -37,7 +37,7 @@
{
private static final Logger log = Logger.getLogger(LookupSucceededFilter.class);
private static final boolean trace = log.isTraceEnabled();
- private boolean lookupSucceeded;
+ private volatile boolean lookupSucceeded;
public boolean isAcceptable(Object response, ClusterNode sender)
{
@@ -46,14 +46,20 @@
log.trace("isAcceptable (" + response + ") from " + sender);
}
- lookupSucceeded = (response != null) && !(response instanceof Exception) && !(response instanceof NoHandlerForRPC);
-
- if (trace && lookupSucceeded)
- {
- log.trace("Lookup succeded from " + sender);
+ if ((response != null) && !(response instanceof Exception) && !(response instanceof NoHandlerForRPC))
+ {
+ if (trace)
+ {
+ log.trace("Lookup succeded from " + sender);
+ }
+ lookupSucceeded = true;
}
-
- return true;
+
+ // NOTE: *MUST* always return true or the RPC will never complete
+ // if no response is "acceptable". Returning true cause the response
+ // count to be incremented, allowing the call to complete when the
+ // desired numbers of responses are in
+ return true;
}
public boolean needMoreResponses()
Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/timestamp/TimestampDiscrepancyService.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/timestamp/TimestampDiscrepancyService.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/main/java/org/jboss/ha/timestamp/TimestampDiscrepancyService.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -36,15 +36,15 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executor;
+
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
+import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener;
-import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.kernel.spi.dependency.KernelControllerContextAware;
+import org.jboss.logging.Logger;
-import org.apache.log4j.Logger;
-
/**
* Service that tracks {@link TimestampDiscrepancy} information for current
* and past members of the cluster.
Modified: branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -37,7 +37,7 @@
<version.beanvalidation.integration>1.0.0-Beta-1</version.beanvalidation.integration>
<version.commons.beanutils>1.8.0</version.commons.beanutils>
<version.fastinfoset>1.2.2</version.fastinfoset>
- <version.hornetq>2.1.0.BETA1</version.hornetq>
+ <version.hornetq>2.1.0.BETA2</version.hornetq>
<version.rhq>1.4.0.B01</version.rhq>
<version.inject.api>1</version.inject.api>
<version.jacorb>2.3.1jboss.patch01-brew</version.jacorb>
@@ -144,11 +144,11 @@
<version.org.jboss.xnio.metadata>2.1.0.CR5</version.org.jboss.xnio.metadata>
<version.org.osgi>4.2.0</version.org.osgi>
<version.org.slf4j>1.5.6</version.org.slf4j>
- <version.org.springframework>2.5.6</version.org.springframework>
+ <version.org.springframework>3.0.1.RELEASE</version.org.springframework>
<version.oswego-concurrent.concurrent>1.3.4-jboss-update1</version.oswego-concurrent.concurrent>
<version.saaj.api>1.3</version.saaj.api>
<version.seam.integration>6.0.0.Alpha1</version.seam.integration>
- <version.spring.integration>1.0.0.CR2</version.spring.integration>
+ <version.spring.integration>2.0.0-M1</version.spring.integration>
<version.staxex>2.1.1</version.staxex>
<version.streambuffer>1.0</version.streambuffer>
<version.org.jboss.spec.javaee>1.0.0.Beta1</version.org.jboss.spec.javaee>
@@ -226,7 +226,7 @@
<dependency>
<groupId>org.jboss.snowdrop</groupId>
- <artifactId>snowdrop</artifactId>
+ <artifactId>jboss-spring-deployer</artifactId>
<version>${version.spring.integration}</version>
<type>zip</type>
</dependency>
@@ -609,12 +609,6 @@
</dependency>
<dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-transports</artifactId>
- <version>${version.hornetq}</version>
- </dependency>
-
- <dependency>
<groupId>org.jboss.aspects</groupId>
<artifactId>jboss-current-invocation-aspects</artifactId>
<version>${version.org.jboss.aspects.currentinvocation}</version>
Modified: branches/KABIR_JAVASSIST_REFLECT/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/connector/src/main/java/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -36,13 +36,6 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
import org.jboss.util.xml.JBossEntityResolver;
@@ -150,32 +143,7 @@
{
if(isBuildManagedObject())
{
- ManagedObject mcfdgMO = managedObjects.get(ManagedConnectionFactoryDeploymentGroup.class.getName());
- if(mcfdgMO != null)
- {
- ManagedProperty deployments = mcfdgMO.getProperty("deployments");
- MetaType propType = deployments.getMetaType();
- if (propType.isCollection())
- {
- CollectionMetaType amt = (CollectionMetaType) propType;
- MetaType etype = amt.getElementType();
- if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
- {
- CollectionValue avalue = (CollectionValue) deployments.getValue();
- if(avalue != null)
- {
- MetaValue[] elements = avalue.getElements();
- for(int n = 0; n < avalue.getSize(); n ++)
- {
- GenericValue gv = (GenericValue) elements[n];
- ManagedObject propMO = (ManagedObject) gv.getValue();
- managedObjects.put(propMO.getName(), propMO);
- }
- }
- }
- }
- }
-
+ // Don't duplicate MOs
}
}
}
Modified: branches/KABIR_JAVASSIST_REFLECT/depchain/pom.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/depchain/pom.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/depchain/pom.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -381,10 +381,6 @@
<groupId>org.hornetq</groupId>
<artifactId>hornetq-resources</artifactId>
</dependency>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-transports</artifactId>
- </dependency>
<dependency>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_2.2_spec</artifactId>
@@ -807,7 +803,7 @@
</dependency>
<dependency>
<groupId>org.jboss.snowdrop</groupId>
- <artifactId>snowdrop</artifactId>
+ <artifactId>jboss-spring-deployer</artifactId>
<type>zip</type>
</dependency>
<dependency>
Modified: branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/clustered/hornetq-configuration.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/clustered/hornetq-configuration.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/clustered/hornetq-configuration.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -18,13 +18,13 @@
<connectors>
<connector name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
<connector name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
@@ -32,19 +32,20 @@
<connector name="in-vm">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
</connector>
</connectors>
<acceptors>
<acceptor name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
<acceptor name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
@@ -83,8 +84,8 @@
<security-settings>
<security-setting match="#">
- <permission type="createTempQueue" roles="guest"/>
- <permission type="deleteTempQueue" roles="guest"/>
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
Modified: branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/resources/config/non-clustered/hornetq-configuration.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -16,13 +16,13 @@
<connectors>
<connector name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
<connector name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
@@ -30,19 +30,20 @@
<connector name="in-vm">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
</connector>
</connectors>
<acceptors>
<acceptor name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
<acceptor name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
@@ -57,8 +58,8 @@
<security-settings>
<security-setting match="#">
- <permission type="createTempQueue" roles="guest"/>
- <permission type="deleteTempQueue" roles="guest"/>
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
Modified: branches/KABIR_JAVASSIST_REFLECT/profileservice/src/main/java/org/jboss/profileservice/management/client/ManagedComponentDelegate.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/profileservice/src/main/java/org/jboss/profileservice/management/client/ManagedComponentDelegate.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/profileservice/src/main/java/org/jboss/profileservice/management/client/ManagedComponentDelegate.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -68,7 +68,10 @@
public RunState getRunState()
{
- return dispatcher.updateRunState(componentName);
+ RunState state = dispatcher.updateRunState(componentName);
+ if(state == RunState.UNKNOWN)
+ return delegate.getRunState();
+ return state;
}
public void setRunState(RunState runState)
Modified: branches/KABIR_JAVASSIST_REFLECT/security/src/main/java/org/jboss/security/jndi/JndiLoginInitialContextFactory.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/security/src/main/java/org/jboss/security/jndi/JndiLoginInitialContextFactory.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/security/src/main/java/org/jboss/security/jndi/JndiLoginInitialContextFactory.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -95,15 +95,7 @@
String username = principal.toString();
securityPrincipal = new SimplePrincipal(username);
}
- // Associate this security context
- if( restoreLoginIdentity )
- {
- SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials, null);
- }
- else
- {
- SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials, null);
- }
+ SecurityAssociationActions.setPrincipalInfo(securityPrincipal, credentials, null);
// Now return the context using the standard jnp naming context factory
Context iniCtx = super.getInitialContext(env);
if( restoreLoginIdentity )
Modified: branches/KABIR_JAVASSIST_REFLECT/server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -65,6 +65,7 @@
*/
public Object invoke(Invocation invocation) throws Throwable
{
+ SecurityContext previousSC = null;
String type = invocation.getType();
Subject subject = null;
if (!initialized)
@@ -91,6 +92,8 @@
String securityDomain = SecurityConstants.DEFAULT_APPLICATION_POLICY;
if (securityMgr != null)
securityDomain = securityMgr.getSecurityDomain();
+ // store current security context
+ previousSC = SecurityActions.getSecurityContext();
SecurityContext sc = SecurityActions.createSecurityContext(securityDomain);
SecurityActions.setSecurityContext(sc);
// Push the caller security context
@@ -105,9 +108,9 @@
}
finally
{
- // Don't leak the security context
+ // restore previous security context
if (subject != null)
- SecurityActions.popSubjectContext();
+ SecurityActions.setSecurityContext(previousSC);
}
}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -313,7 +313,6 @@
<fileset refid="org.jboss.jbossas:jboss-as-hornetq-int:jar"/>
<fileset refid="org.hornetq:hornetq-core-client:jar"/>
<fileset refid="org.hornetq:hornetq-jms-client:jar"/>
- <fileset refid="org.hornetq:hornetq-transports:jar"/>
<fileset refid="org.jboss.netty:netty:jar"/>
<!-- needed for proxy tests -->
<fileset refid="bcel:bcel:jar"/>
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/imports/server-config.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/imports/server-config.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/imports/server-config.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -1030,7 +1030,7 @@
</copy>
<unzip dest="${jboss.dist}/server/@{conf}/deployers" overwrite="true">
- <fileset refid="org.jboss.snowdrop:snowdrop:zip"/>
+ <fileset refid="org.jboss.snowdrop:jboss-spring-deployer:zip"/>
</unzip>
<!-- Overwrite any config content with that from the
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/LookupSucceededFilterUnitTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/LookupSucceededFilterUnitTestCase.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/LookupSucceededFilterUnitTestCase.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -58,6 +58,22 @@
exerciseFilterLogic(adapter, sender);
}
+ /**
+ * JBAS-7945. Test that receiving a non-acceptable response before
+ * the needMoreResponses() call from an earlier acceptable response
+ * doesn't result in an incorrect answer.
+ */
+ public void testConcurrentResponses()
+ {
+ ResponseFilter filter = new LookupSucceededFilter();
+ ClusterNode sender1 = factory.getClusterNode(new IpAddress(12345));
+ ClusterNode sender2 = factory.getClusterNode(new IpAddress(67890));
+
+ filter.isAcceptable("A", sender1);
+ filter.isAcceptable(null, sender2);
+ assertFalse("Concurrency problem (JBAS-7945)",filter.needMoreResponses());
+ }
+
private void exerciseFilterLogic(ResponseFilter filter, ClusterNode sender)
{
filter.isAcceptable(null, sender);
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/multicfg/test/DistributedStateTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/multicfg/test/DistributedStateTestCase.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/multicfg/test/DistributedStateTestCase.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -115,7 +115,7 @@
ds0.put("key0", "value0");
String value = (String) ds0.get("key0");
log.info("server0: get(key0): "+value);
- assertTrue("server0: value == value0", value.equals("value0"));
+ assertEquals("server0: value == value0", "value0", value);
MBeanServerConnection server1 = adaptors[1];
log.info("server1: "+server1);
@@ -128,12 +128,14 @@
server1.addNotificationListener(dsService, listener1, null, null);
value = (String) ds1.get("key0");
log.info("server1: get(key0): "+value);
- assertTrue("server1: value == value0", value.equals("value0"));
+ assertEquals("server1: value == value0", "value0", value);
ds1.put("key0", "value1");
value = (String) ds1.get("key0");
- assertTrue("server1: value == value1("+value+")", value.equals("value1"));
+ assertEquals("server1: value == value1("+value+")", "value1", value);
+ log.info("server1: get(key0): "+value);
value = (String) ds0.get("key0");
- assertTrue("server0: value == value1("+value+")", value.equals("value1"));
+ assertEquals("server0: value == value1("+value+")", "value1", value);
+ log.info("server0: get(key0): "+value);
ds1.put("key1", "value11");
Collection<?> categories = ds0.listAllCategories();
@@ -158,9 +160,9 @@
ds0.remove("key0");
value = (String) ds1.get("key0");
- assertTrue("server1: value == null("+value+")", value == null);
+ assertNull("server1: value == null("+value+")", value);
value = (String) ds0.get("key0");
- assertTrue("server0: value == null("+value+")", value == null);
+ assertNull("server0: value == null("+value+")", value);
// set a key/value on server0 and test its notifications on both servers
ds0.put(NOTIFY_KEY, NOTIFY_VALUE);
@@ -175,10 +177,10 @@
String key = (String)data.key;
String val = (String)data.value;
boolean isLocal = data.locallyModified;
- assertTrue("server0: change notification category = " + cat, cat.equals(NOTIFY_CATEGORY));
- assertTrue("server0: change notification key = " + key, key.equals(NOTIFY_KEY));
- assertTrue("server0: change notification value = " + val, val.equals(NOTIFY_VALUE));
- assertTrue("server0: change notification isLocal = " + isLocal, isLocal == true);
+ assertEquals("server0: change notification category = " + cat, NOTIFY_CATEGORY, cat);
+ assertEquals("server0: change notification key = " + key, NOTIFY_KEY, key);
+ assertEquals("server0: change notification value = " + val, NOTIFY_VALUE, val);
+ assertTrue("server0: change notification isLocal = " + isLocal, isLocal);
// check the change notification on server1
type = listener1.getNotificationType();
@@ -189,10 +191,10 @@
key = (String)data.key;
val = (String)data.value;
isLocal = data.locallyModified;
- assertTrue("server1: change notification category = " + cat, cat.equals(NOTIFY_CATEGORY));
- assertTrue("server1: change notification key = " + key, key.equals(NOTIFY_KEY));
- assertTrue("server1: change notification value = " + val, val.equals(NOTIFY_VALUE));
- assertTrue("server1: change notification isLocal = " + isLocal, isLocal == false);
+ assertEquals("server1: change notification category = " + cat, NOTIFY_CATEGORY, cat);
+ assertEquals("server1: change notification key = " + key, NOTIFY_KEY, key);
+ assertEquals("server1: change notification value = " + val, NOTIFY_VALUE, val);
+ assertFalse("server1: change notification isLocal = " + isLocal, isLocal);
// remove the key from server1 and check its notifications
ds1.remove(NOTIFY_KEY);
@@ -207,10 +209,10 @@
key = (String)data.key;
val = (String)data.value;
isLocal = data.locallyModified;
- assertTrue("server0: removal notification category = " + cat, cat.equals(NOTIFY_CATEGORY));
- assertTrue("server0: removal notification key = " + key, key.equals(NOTIFY_KEY));
- assertTrue("server01: removal notification value = " + val, val.equals(NOTIFY_VALUE));
- assertTrue("server0: removal notification isLocal = " + isLocal, isLocal == false);
+ assertEquals("server0: removal notification category = " + cat, NOTIFY_CATEGORY, cat);
+ assertEquals("server0: removal notification key = " + key, NOTIFY_KEY, key);
+ assertEquals("server01: removal notification value = " + val, NOTIFY_VALUE, val);
+ assertFalse("server0: removal notification isLocal = " + isLocal, isLocal);
// check the remove notification on server1
type = listener1.getNotificationType();
@@ -221,10 +223,10 @@
key = (String)data.key;
val = (String)data.value;
isLocal = data.locallyModified;
- assertTrue("server1: removal notification category = " + cat, cat.equals(NOTIFY_CATEGORY));
- assertTrue("server1: removal notification key = " + key, key.equals(NOTIFY_KEY));
- assertTrue("server1: removal notification value = " + val, val.equals(NOTIFY_VALUE));
- assertTrue("server1: removal notification isLocal = " + isLocal, isLocal == true);
+ assertEquals("server1: removal notification category = " + cat, NOTIFY_CATEGORY, cat);
+ assertEquals("server1: removal notification key = " + key, NOTIFY_KEY, key);
+ assertEquals("server1: removal notification value = " + val, NOTIFY_VALUE, val);
+ assertTrue("server1: removal notification isLocal = " + isLocal, isLocal);
}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/rspfilter/TruthfulResponseFilter.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/rspfilter/TruthfulResponseFilter.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cluster/rspfilter/TruthfulResponseFilter.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -25,7 +25,6 @@
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.ResponseFilter;
-import org.jboss.ha.framework.server.ClusterPartition.NoHandlerForRPC;
import org.jboss.logging.Logger;
/**
@@ -37,23 +36,22 @@
{
private static final long serialVersionUID = 2223820538160300865L;
private static final Logger log = Logger.getLogger(TruthfulResponseFilter.class);
- private boolean lookupSucceeded;
+ private volatile boolean lookupSucceeded;
public boolean isAcceptable(Object response, ClusterNode sender)
{
log.debug("isAcceptable (" + response + ") from " + sender);
- if (response != null && !(response instanceof Exception) && !(response instanceof NoHandlerForRPC))
+ if (response instanceof Boolean && ((Boolean)response).booleanValue())
{
- lookupSucceeded = (Boolean)response;
- }
-
- if (lookupSucceeded)
- {
+ lookupSucceeded = true;
+
log.debug("Lookup succeded from " + sender);
+
+ return true;
}
- return lookupSucceeded;
+ return false;
}
public boolean needMoreResponses()
Deleted: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionTestCase.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -1,95 +0,0 @@
-/*
- * 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 junit.framework.TestSuite;
-
-import org.jboss.test.JBossTestCase;
-import org.jboss.test.JBossTestSetup;
-import org.jboss.test.cts.interfaces.CtsCmpHome;
-import org.jboss.test.cts.interfaces.CtsCmp;
-import org.jboss.test.cts.keys.AccountPK;
-import org.jboss.test.util.jms.JMSDestinationsUtil;
-
-/** 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 new JBossTestSetup(new TestSuite(NestedUserTransactionTestCase.class))
- {
- public void setUp() throws Exception
- {
- super.setUp();
- JMSDestinationsUtil.setupBasicDestinations();
- deploy("cts.jar");
-
- }
-
- public void tearDown() throws Exception
- {
- undeploy("cts.jar");
- JMSDestinationsUtil.destroyDestinations();
- }
- };
-
- }
-}
Copied: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionUnitTestCase.java (from rev 104059, trunk/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionUnitTestCase.java)
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionUnitTestCase.java (rev 0)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/cts/test/NestedUserTransactionUnitTestCase.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -0,0 +1,95 @@
+/*
+ * 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 junit.framework.TestSuite;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+import org.jboss.test.cts.interfaces.CtsCmpHome;
+import org.jboss.test.cts.interfaces.CtsCmp;
+import org.jboss.test.cts.keys.AccountPK;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
+
+/** Tests of accessing the UserTransaction interface.
+ *
+ * @author alex at jboss.org
+ * @version $Revision: 57211 $
+ */
+public class NestedUserTransactionUnitTestCase extends JBossTestCase
+{
+
+ public NestedUserTransactionUnitTestCase(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 new JBossTestSetup(new TestSuite(NestedUserTransactionUnitTestCase.class))
+ {
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ JMSDestinationsUtil.setupBasicDestinations();
+ deploy("cts.jar");
+
+ }
+
+ public void tearDown() throws Exception
+ {
+ undeploy("cts.jar");
+ JMSDestinationsUtil.destroyDestinations();
+ }
+ };
+
+ }
+}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jbossmessaging/perf/SendReplyPerfStressTestCase.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -248,7 +248,7 @@
for (Iterator i = state.errors.iterator(); i.hasNext();)
getLog().error("Error", (Throwable) i.next());
if (state.errors.size() > 0)
- throw new RuntimeException("Test failed with " + state.errors.size() + " errors");
+ throw new RuntimeException("Test failed with " + state.errors.size() + " errors",(Throwable) state.errors.get(0));
}
public void testSendReplyTopic() throws Exception
@@ -323,11 +323,11 @@
QueueReceiver receiver = session.createReceiver(queue);
queueConnection.start();
- Message message = receiver.receive(50);
+ Message message = receiver.receiveNoWait();
int c = 0;
while (message != null)
{
- message = receiver.receive(50);
+ message = receiver.receiveNoWait();
c++;
}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -260,6 +260,7 @@
protected void deployDestinations() throws Exception
{
+ JMSDestinationsUtil.destroyEveryDestination();
JMSDestinationsUtil.setupBasicDestinations();
}
@@ -320,7 +321,7 @@
try
{
// // FIXME Need to wait for asynchrounous bootstrap of container
-// Thread.sleep(5000);
+ Thread.sleep(5000);
startReceiverThread();
}
catch (Exception e)
@@ -400,8 +401,12 @@
String clientID = props.getProperty("clientID");
+ log.info("ClientID = " + clientID + " on tidyUP");
+
if (user != null)
{
+
+ log.info("Getting connection with clientID");
String password = props.getProperty("password");
getConnection(user, password, clientID);
}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/security/service/HttpsClient.java 2010-04-16 15:20:10 UTC (rev 104062)
@@ -29,11 +29,16 @@
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
+import java.security.KeyStore;
import java.security.Provider;
import java.security.Security;
import java.util.StringTokenizer;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
import org.jboss.invocation.http.interfaces.Util;
import org.jboss.logging.Logger;
@@ -41,213 +46,214 @@
import org.jboss.test.util.SecurityProviderUtil;
import org.jboss.vfs.VirtualFile;
-/** A test mbean service that reads input from an https url passed in
- to its readURL method.
-
- @author Scott.Stark at jboss.org
- @version $Revision$
+/**
+ * A test mbean service that reads input from an https url passed in to its
+ * readURL method.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
*/
-public class HttpsClient extends ServiceMBeanSupport implements HttpsClientMBean
-{
- // Constants -----------------------------------------------------
+public class HttpsClient extends ServiceMBeanSupport implements
+ HttpsClientMBean {
+ // Constants -----------------------------------------------------
- // Attributes ----------------------------------------------------
- private boolean addedHttpsHandler;
+ // Attributes ----------------------------------------------------
+ private boolean addedHttpsHandler;
- private boolean addedJSSEProvider;
+ private boolean addedJSSEProvider;
- // Static --------------------------------------------------------
+ // Static --------------------------------------------------------
- // Constructors --------------------------------------------------
- public HttpsClient()
- {
- }
+ // Constructors --------------------------------------------------
+ public HttpsClient() {
+ }
- public String getName()
- {
- return "HttpsClient";
- }
+ public String getName() {
+ return "HttpsClient";
+ }
- /** Read the contents of the given URL and return it. */
- public String readURL(String urlString) throws IOException
- {
- try
- {
- String reply = internalReadURL(urlString);
- log.debug("readURL -> " + reply);
- return reply;
- }
- catch (Throwable e)
- {
- log.error("Failed to readURL", e);
- throw new IOException("Failed to readURL, ex=" + e.getMessage());
- }
- }
+ /** Read the contents of the given URL and return it. */
+ public String readURL(String urlString) throws IOException {
+ try {
+ String reply = internalReadURL(urlString);
+ log.debug("readURL -> " + reply);
+ return reply;
+ } catch (Throwable e) {
+ log.error("Failed to readURL", e);
+ throw new IOException("Failed to readURL, ex=" + e.getMessage());
+ }
+ }
- private String internalReadURL(String urlString) throws Exception
- {
- log.debug("Creating URL from string: " + urlString);
- URL url = new URL(urlString);
- log.debug("Created URL object from string, protocol=" + url.getProtocol());
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- /* Override the host verifier so we can use a test server cert with
- a hostname that may not match the https url hostname.
- */
- System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
- Util.configureHttpsHostVerifier(conn);
+ private String internalReadURL(String urlString) throws Exception {
+ log.debug("Creating URL from string: " + urlString);
+ URL url = new URL(urlString);
+ log.debug("Created URL object from string, protocol="
+ + url.getProtocol());
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ /*
+ * Override the host verifier so we can use a test server cert with a
+ * hostname that may not match the https url hostname.
+ */
+ System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
+ Util.configureHttpsHostVerifier(conn);
- log.debug("Connecting to URL: " + url);
- byte[] buffer = new byte[1024];
- int length = conn.getContentLength();
- log.debug("ContentLength: " + length);
- InputStream is = conn.getInputStream();
- StringBuffer reply = new StringBuffer();
- while ((length = is.read(buffer)) > 0)
- reply.append(new String(buffer, 0, length));
- log.debug("Done, closing streams");
- is.close();
- return reply.toString();
- }
+ // if SSL is used we must point to the test truststore.
+ if (conn instanceof HttpsURLConnection) {
+ // Setup the test keystore (truststore).
+ URL keyStoreURL = Thread.currentThread().getContextClassLoader()
+ .getResource("META-INF/tst.keystore");
+ InputStream stream = keyStoreURL.openStream();
+ KeyStore keyStore = KeyStore.getInstance("JKS");
+ keyStore.load(stream, "unit-tests".toCharArray());
+ // Setup the test TrustManagerFactory.
+ TrustManagerFactory trustMgr = TrustManagerFactory
+ .getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ trustMgr.init(keyStore);
+ // Setup the test SSLSocketFactory.
+ SSLContext sslCtx = SSLContext.getInstance("TLS");
+ sslCtx.init(null, trustMgr.getTrustManagers(), null);
+ ((HttpsURLConnection) conn).setSSLSocketFactory(sslCtx.getSocketFactory());
+ }
+
+ // Connect to the remote HTTP server.
+ log.debug("Connecting to URL: " + url);
+ byte[] buffer = new byte[1024];
+ int length = conn.getContentLength();
+ log.debug("ContentLength: " + length);
+ InputStream is = conn.getInputStream();
+ StringBuffer reply = new StringBuffer();
+ while ((length = is.read(buffer)) > 0)
+ reply.append(new String(buffer, 0, length));
+ log.debug("Done, closing streams");
+ is.close();
+ return reply.toString();
+ }
- // Public --------------------------------------------------------
- protected void startService() throws Exception
- {
- addedJSSEProvider = false;
- try
- {
- new URL("https://www.https.test");
- }
- catch (MalformedURLException e)
- {
- // Install the default JSSE security provider
- Provider provider = SecurityProviderUtil.getJSSEProvider();
- log.debug("Adding " + provider.getName());
+ // Public --------------------------------------------------------
+ protected void startService() throws Exception {
+ addedJSSEProvider = false;
+ try {
+ new URL("https://www.https.test");
+ } catch (MalformedURLException e) {
+ // Install the default JSSE security provider
+ Provider provider = SecurityProviderUtil.getJSSEProvider();
+ log.debug("Adding " + provider.getName());
- addedJSSEProvider = Security.addProvider(provider) != -1;
- if (addedJSSEProvider)
- {
- log.debug("Added " + provider.getName());
- }
+ addedJSSEProvider = Security.addProvider(provider) != -1;
+ if (addedJSSEProvider) {
+ log.debug("Added " + provider.getName());
+ }
- addedHttpsHandler = false;
- // Install the JSSE https handler if it has not already been added
- String protocolHandler = SecurityProviderUtil.getProtocolHandlerName();
+ addedHttpsHandler = false;
+ // Install the JSSE https handler if it has not already been added
+ String protocolHandler = SecurityProviderUtil
+ .getProtocolHandlerName();
- String handlers = System.getProperty("java.protocol.handler.pkgs");
- if (handlers == null || handlers.indexOf(protocolHandler) < 0)
- {
- handlers += "|" + protocolHandler;
- log.debug("Adding https handler to java.protocol.handler.pkgs");
- System.setProperty("java.protocol.handler.pkgs", handlers);
- addedHttpsHandler = true;
- }
- }
+ String handlers = System.getProperty("java.protocol.handler.pkgs");
+ if (handlers == null || handlers.indexOf(protocolHandler) < 0) {
+ handlers += "|" + protocolHandler;
+ log.debug("Adding https handler to java.protocol.handler.pkgs");
+ System.setProperty("java.protocol.handler.pkgs", handlers);
+ addedHttpsHandler = true;
+ }
+ }
+ }
- // Install the trust store
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- URL keyStoreURL = loader.getResource("META-INF/tst.keystore");
- if (keyStoreURL == null)
- throw new IOException("Failed to find resource tst.keystore");
- log.debug("Setting javax.net.ssl.trustStore to: " + keyStoreURL.getPath());
- System.setProperty("javax.net.ssl.trustStore", keyStoreURL.getPath());
- }
+ protected void stopService() throws Exception {
+ if (addedJSSEProvider) {
+ Provider provider = SecurityProviderUtil.getJSSEProvider();
+ String name = provider.getName();
+ log.debug("Removing " + name);
+ Security.removeProvider(name);
+ }
- protected void stopService() throws Exception
- {
- if (addedJSSEProvider)
- {
- Provider provider = SecurityProviderUtil.getJSSEProvider();
- String name = provider.getName();
- log.debug("Removing " + name);
- Security.removeProvider(name);
- }
+ if (addedHttpsHandler == true) {
+ log.debug("Removing https handler from java.protocol.handler.pkgs");
+ String protocolHandler = SecurityProviderUtil
+ .getProtocolHandlerName();
+ String handlers = System.getProperty("java.protocol.handler.pkgs");
+ StringTokenizer tokenizer = new StringTokenizer(handlers, "|");
+ StringBuffer buffer = new StringBuffer();
+ while (tokenizer.hasMoreTokens()) {
+ String handler = tokenizer.nextToken();
+ if (handler.equals(protocolHandler) == false) {
+ buffer.append('|');
+ buffer.append(handler);
+ }
+ }
+ System.setProperty("java.protocol.handler.pkgs", buffer.toString());
+ }
+ }
- if (addedHttpsHandler == true)
- {
- log.debug("Removing https handler from java.protocol.handler.pkgs");
- String protocolHandler = SecurityProviderUtil.getProtocolHandlerName();
- String handlers = System.getProperty("java.protocol.handler.pkgs");
- StringTokenizer tokenizer = new StringTokenizer(handlers, "|");
- StringBuffer buffer = new StringBuffer();
- while (tokenizer.hasMoreTokens())
- {
- String handler = tokenizer.nextToken();
- if (handler.equals(protocolHandler) == false)
- {
- buffer.append('|');
- buffer.append(handler);
- }
- }
- System.setProperty("java.protocol.handler.pkgs", buffer.toString());
- }
- }
+ /**
+ * A SSLSocketFactory that logs the createSocket calls.
+ */
+ class DebugSSLSocketFactory extends SSLSocketFactory {
+ SSLSocketFactory factoryDelegate;
- /** A SSLSocketFactory that logs the createSocket calls.
- */
- class DebugSSLSocketFactory extends SSLSocketFactory
- {
- SSLSocketFactory factoryDelegate;
+ Logger theLog;
- Logger theLog;
+ DebugSSLSocketFactory(SSLSocketFactory factoryDelegate, Logger theLog) {
+ this.factoryDelegate = factoryDelegate;
+ this.theLog = theLog;
+ }
- DebugSSLSocketFactory(SSLSocketFactory factoryDelegate, Logger theLog)
- {
- this.factoryDelegate = factoryDelegate;
- this.theLog = theLog;
- }
+ public Socket createSocket(java.net.InetAddress host, int port)
+ throws java.io.IOException {
+ theLog.debug("createSocket, host=" + host + ", port=" + port);
+ Socket s = factoryDelegate.createSocket(host, port);
+ theLog.debug("created socket=" + s);
+ return s;
+ }
- public Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
- {
- theLog.debug("createSocket, host=" + host + ", port=" + port);
- Socket s = factoryDelegate.createSocket(host, port);
- theLog.debug("created socket=" + s);
- return s;
- }
+ public Socket createSocket(String host, int port)
+ throws java.io.IOException, java.net.UnknownHostException {
+ theLog.debug("createSocket, host=" + host + ", port=" + port);
+ Socket s = factoryDelegate.createSocket(host, port);
+ theLog.debug("created socket=" + s);
+ return s;
+ }
- public Socket createSocket(String host, int port) throws java.io.IOException, java.net.UnknownHostException
- {
- theLog.debug("createSocket, host=" + host + ", port=" + port);
- Socket s = factoryDelegate.createSocket(host, port);
- theLog.debug("created socket=" + s);
- return s;
- }
+ public Socket createSocket(Socket socket, String host, int port,
+ boolean autoClose) throws java.io.IOException {
+ theLog.debug("createSocket, socket=" + socket + ", host=" + host
+ + ", port=" + port);
+ Socket s = factoryDelegate.createSocket(socket, host, port,
+ autoClose);
+ theLog.debug("created socket=" + s);
+ return s;
+ }
- public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws java.io.IOException
- {
- theLog.debug("createSocket, socket=" + socket + ", host=" + host + ", port=" + port);
- Socket s = factoryDelegate.createSocket(socket, host, port, autoClose);
- theLog.debug("created socket=" + s);
- return s;
- }
+ public Socket createSocket(java.net.InetAddress host, int port,
+ java.net.InetAddress clientAddress, int clientPort)
+ throws java.io.IOException {
+ theLog.debug("createSocket, host=" + host + ", port=" + port
+ + ", clientAddress=" + clientAddress + ", clientPort="
+ + clientPort);
+ Socket s = factoryDelegate.createSocket(host, port, clientAddress,
+ clientPort);
+ theLog.debug("created socket=" + s);
+ return s;
+ }
- public Socket createSocket(java.net.InetAddress host, int port, java.net.InetAddress clientAddress, int clientPort)
- throws java.io.IOException
- {
- theLog.debug("createSocket, host=" + host + ", port=" + port + ", clientAddress=" + clientAddress
- + ", clientPort=" + clientPort);
- Socket s = factoryDelegate.createSocket(host, port, clientAddress, clientPort);
- theLog.debug("created socket=" + s);
- return s;
- }
+ public Socket createSocket(String host, int port,
+ java.net.InetAddress clientAddress, int clientPort)
+ throws java.io.IOException, java.net.UnknownHostException {
+ theLog.debug("createSocket, host=" + host + ", port=" + port
+ + ", addr=" + clientAddress);
+ Socket s = factoryDelegate.createSocket(host, port, clientAddress,
+ clientPort);
+ theLog.debug("created socket=" + s);
+ return s;
+ }
- public Socket createSocket(String host, int port, java.net.InetAddress clientAddress, int clientPort)
- throws java.io.IOException, java.net.UnknownHostException
- {
- theLog.debug("createSocket, host=" + host + ", port=" + port + ", addr=" + clientAddress);
- Socket s = factoryDelegate.createSocket(host, port, clientAddress, clientPort);
- theLog.debug("created socket=" + s);
- return s;
- }
+ public String[] getDefaultCipherSuites() {
+ return factoryDelegate.getDefaultCipherSuites();
+ }
- public String[] getDefaultCipherSuites()
- {
- return factoryDelegate.getDefaultCipherSuites();
- }
+ public String[] getSupportedCipherSuites() {
+ return factoryDelegate.getSupportedCipherSuites();
+ }
+ }
- public String[] getSupportedCipherSuites()
- {
- return factoryDelegate.getSupportedCipherSuites();
- }
- }
-
}
Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/hornetq/deploy/hornetq/hornetq-configuration.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/hornetq/deploy/hornetq/hornetq-configuration.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/hornetq/deploy/hornetq/hornetq-configuration.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -16,13 +16,13 @@
<connectors>
<connector name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
<connector name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
@@ -36,20 +36,20 @@
<acceptors>
<acceptor name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
<acceptor name="netty-throughput">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
</acceptor>
<acceptor name="in-vm">
- <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
<param key="server-id" value="0"/>
</acceptor>
Modified: branches/KABIR_JAVASSIST_REFLECT/webservices/pom.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/webservices/pom.xml 2010-04-16 14:50:34 UTC (rev 104061)
+++ branches/KABIR_JAVASSIST_REFLECT/webservices/pom.xml 2010-04-16 15:20:10 UTC (rev 104062)
@@ -242,10 +242,6 @@
<!-- transitive dependencies -->
<dependency>
<groupId>org.hornetq</groupId>
- <artifactId>hornetq-transports</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hornetq</groupId>
<artifactId>hornetq-jms-client</artifactId>
</dependency>
<dependency>
More information about the jboss-cvs-commits
mailing list