[jboss-svn-commits] JBL Code SVN: r30522 - in labs/jbossesb/workspace/performance/perf2: product/install and 23 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 8 03:15:28 EST 2009


Author: beve
Date: 2009-12-08 03:15:27 -0500 (Tue, 08 Dec 2009)
New Revision: 30522

Added:
   labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAuthenticatorFactoryAspect.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDINotificationListAspect.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5ContentFacetDelegate.java
Modified:
   labs/jbossesb/workspace/performance/perf2/
   labs/jbossesb/workspace/performance/perf2/product/install/build.xml
   labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb-juddi-orm.xml
   labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIScoutAspect.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml
   labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/couriers/FaultMessageException.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/SamlAssertionExtractorUnitTest.java
   labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractorUnitTest.java
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/base-build.xml
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/readme.txt
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/security_cert/readme.txt
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/README.html
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/build.xml
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_producer/readme.txt
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/README.html
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/build.xml
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/README.html
   labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/build.xml
   labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java
   labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleService.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBDeploymentComponent.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5Component.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/build.xml
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractDeploymentComponent.java
   labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractESBComponent.java
   labs/jbossesb/workspace/performance/perf2/qa/junit/src/org/jboss/soa/esb/server/MyRedeliveryAction.java
Log:
Merged revisions 30390-30391,30408-30410,30440-30441,30450,30475-30477,30479,30491,30503,30511 via svnmerge from 
https://svn.jboss.org/repos/labs/labs/jbossesb/branches/JBESB_4_7_CP

.......
  r30390 | kevin.conner at jboss.com | 2009-12-01 00:42:08 +1000 (Tue, 01 Dec 2009) | 1 line
  
  Fix endorsed dirs: JBESB-3008
.......
  r30391 | kevin.conner at jboss.com | 2009-12-01 00:44:57 +1000 (Tue, 01 Dec 2009) | 1 line
  
  Fix email notifier password: JBESB-2994
.......
  r30408 | kevin.conner at jboss.com | 2009-12-01 20:34:30 +1000 (Tue, 01 Dec 2009) | 1 line
  
  Make inquiry pointcut specific: JBESB-3013
.......
  r30409 | kevin.conner at jboss.com | 2009-12-01 21:56:20 +1000 (Tue, 01 Dec 2009) | 1 line
  
  Disable juddi NotificationList vector: JBESB-3005
.......
  r30410 | kevin.conner at jboss.com | 2009-12-02 01:02:47 +1000 (Wed, 02 Dec 2009) | 1 line
  
  Handle embedded message in FaultMessageException: JBESB-3010
.......
  r30440 | beve | 2009-12-03 08:13:38 +1000 (Thu, 03 Dec 2009) | 2 lines
  
  Work for https://jira.jboss.org/jira/browse/JBESB-3015 "Performance: PublicCryptoUtil should create a Cipher instance only once and not inside a loop as the current implementation does."
.......
  r30441 | beve | 2009-12-03 09:20:43 +1000 (Thu, 03 Dec 2009) | 2 lines
  
  Work for https://jira.jboss.org/jira/browse/JBESB-3016 "Performance: Refactor SecurityInfoExtractors to use StaX instead of Smooks (SAX)"
.......
  r30450 | kevin.conner at jboss.com | 2009-12-04 01:03:36 +1000 (Fri, 04 Dec 2009) | 1 line
  
  Include server jaxb-xjc jar: JBESB-2989
.......
  r30475 | kevin.conner at jboss.com | 2009-12-04 23:16:16 +1000 (Fri, 04 Dec 2009) | 1 line
  
  Fix schemaLocation: JBESB-3023
.......
  r30476 | kevin.conner at jboss.com | 2009-12-05 02:19:12 +1000 (Sat, 05 Dec 2009) | 1 line
  
  Fix scout null binding templates: JBESB-3020
.......
  r30477 | kevin.conner at jboss.com | 2009-12-05 03:29:24 +1000 (Sat, 05 Dec 2009) | 1 line
  
  Fix RuleAgent shutdown: JBESB-3011
.......
  r30479 | tcunning | 2009-12-05 18:59:03 +1000 (Sat, 05 Dec 2009) | 4 lines
  
  JBESB-3025
  Switch the AS5 plugin to use the profile service when adding or deleting
  an ESB deployment through JON.
.......
  r30491 | kevin.conner at jboss.com | 2009-12-06 16:31:58 +1000 (Sun, 06 Dec 2009) | 1 line
  
  Fix juddi AuthenticatorFactory class loading: JBESB-3024
.......
  r30503 | kevin.conner at jboss.com | 2009-12-07 20:56:56 +1000 (Mon, 07 Dec 2009) | 1 line
  
  Remove comments about JBossWS installation: JBESB-3031
.......
  r30511 | kevin.conner at jboss.com | 2009-12-08 01:42:49 +1000 (Tue, 08 Dec 2009) | 1 line
  
  Handle different JCA invocation path: JBESB-3001
.......



Property changes on: labs/jbossesb/workspace/performance/perf2
___________________________________________________________________
Name: svnmerge-integrated
   - /labs/jbossesb/branches/JBESB_4_7_CP:1-30375
   + /labs/jbossesb/branches/JBESB_4_7_CP:1-30518

Modified: labs/jbossesb/workspace/performance/perf2/product/install/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/install/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/install/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -8,6 +8,7 @@
 	<property file="${org.jboss.esb.deployment.properties}"/>
 	
         <property name="server.dir" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+        <property name="client.dir" value="${org.jboss.esb.server.home}/client"/>
 	<property name="install.dir" value="${basedir}"/>
         <property name="conf.dir" value="${server.dir}/conf"/>
         <property name="deploy.dir" value="${server.dir}/deploy"/>
@@ -36,6 +37,9 @@
           </or>
         </condition>
 	
+        <property name="wise.excludes" value="jaxb-xjc-*.jar"/>
+        <property name="wise.includes" value="jaxb-xjc.jar"/>
+
 	<!-- Check for JBossAS5 -->
     <condition property="jbossas5">
         <available file="${server.dir}/deployers"/>
@@ -204,7 +208,8 @@
 
 	        <!-- soap.esb -->
 	        <copy todir="${deploy.dir}/soap.esb"> 
-	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}, META-INF/jboss-structure.xml"/>
+	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}, META-INF/jboss-structure.xml, ${wise.excludes}"/>
+	            <fileset dir="${client.dir}" includes="${wise.includes}"/>
 	        </copy>
 	            
 	        <!-- slsb.esb -->
@@ -379,7 +384,8 @@
 
 	        <!-- soap.esb  -->
 	        <copy todir="${deploy.dir}/soap.esb">
-	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes} jaxb-xjc-2.1.4.jar"/>
+	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}, ${wise.excludes}"/>
+	            <fileset dir="${client.dir}" includes="${wise.includes}"/>
 	        </copy>
 	                
 	        <!-- slsb.esb  -->

Modified: labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb-juddi-orm.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb-juddi-orm.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb-juddi-orm.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -1,7 +1,7 @@
 <entity-mappings
   xmlns="http://java.sun.com/xml/ns/persistence/orm"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
   version="1.0">
   
   <sequence-generator name="juddi_sequence" sequence-name="juddi_sequence"/>

Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAuthenticatorFactoryAspect.java (from rev 30511, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAuthenticatorFactoryAspect.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAuthenticatorFactoryAspect.java	                        (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIAuthenticatorFactoryAspect.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.internal.soa.esb.services.registry.aspect;
+
+import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
+import org.jboss.soa.esb.util.ClassUtil;
+
+/**
+ * Aspect used to override class loading within AuthenticatorFactory
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JUDDIAuthenticatorFactoryAspect
+{
+    public Object loadClass(final MethodCalledByMethodInvocation invocation)
+        throws Throwable
+    {
+        final Object[] args = invocation.getArguments() ;
+        final String className = (String)args[0] ;
+        return ClassUtil.forName(className, getClass()) ;
+    }
+}

Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDINotificationListAspect.java (from rev 30410, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDINotificationListAspect.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDINotificationListAspect.java	                        (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDINotificationListAspect.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.internal.soa.esb.services.registry.aspect;
+
+import java.util.Vector;
+
+import org.jboss.aop.joinpoint.ConstructorCalledByMethodInvocation;
+
+/**
+ * Aspect used to allow us to override the vector creation in NotificationList.
+ * 
+ * @author <a href='mailto:kevin.conner at redhat.com'>Kevin Conner</a>
+ */
+public class JUDDINotificationListAspect
+{
+    public Object getVector(final ConstructorCalledByMethodInvocation invocation)
+        throws Throwable
+    {
+        return new UnmodifiableVector<Object>() ;
+    }
+    
+    private static final class UnmodifiableVector<E> extends Vector<E>
+    {
+        private static final long serialVersionUID = 2015581580631950877L;
+        
+        public void insertElementAt(E obj, int index) {};
+        public void addElement(E obj) {};
+        public boolean add(E o) {return false ;};
+    }
+}

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIScoutAspect.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIScoutAspect.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIScoutAspect.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -21,7 +21,7 @@
  */
 package org.jboss.internal.soa.esb.services.registry.aspect;
 
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.ws.scout.model.uddi.v2.BindingTemplates;
 import org.jboss.aop.joinpoint.ConstructorCalledByMethodInvocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
 
@@ -116,4 +116,11 @@
 
         return address;
     }
+    
+    public Object getBindingTemplates(final ConstructorCalledByMethodInvocation invocation)
+        throws Throwable
+    {
+        final Object result = invocation.invokeNext() ;
+        return (result == null ? new BindingTemplates() : result) ;
+    }
 }

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -1,13 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <aop xmlns="urn:jboss:aop-beans:1.0">
+   <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAuthenticatorFactoryAspect" scope="PER_VM"/>  
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientInquiryAspect" scope="PER_VM"/>  
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientPublicationAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientSecurityAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientConfigAspect" scope="PER_VM"/>
+   <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDINotificationListAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIServerConfigAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIScoutAspect" scope="PER_VM"/>
  
-   <bind pointcut="execution(* org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService->inquire(..))">
+   <bind pointcut="withincode(* org.apache.juddi.v3.auth.AuthenticatorFactory->createAuthenticator()) AND call(* org.apache.log4j.helpers.Loader->loadClass(java.lang.String))">
+        <advice name="loadClass" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAuthenticatorFactoryAspect"/>  
+   </bind>
+
+   <bind pointcut="execution(* org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService->inquire(org.w3c.dom.Element))">
 	<advice name="inquire" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientInquiryAspect"/>
    </bind>
 
@@ -23,6 +29,10 @@
         <advice name="getConfiguration" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientConfigAspect"/>
    </bind>
 
+   <bind pointcut="withincode(* org.apache.juddi.subscription.NotificationList->getInstance(..)) AND call(java.util.Vector->new(..))">
+        <advice name="getVector" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDINotificationListAspect"/>
+   </bind>
+
    <bind pointcut="withincode(* org.apache.juddi.config.AppConfig->loadConfiguration(..)) AND call(org.apache.commons.configuration.PropertiesConfiguration->new(..))">
         <advice name="getConfiguration" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIServerConfigAspect"/>
    </bind>
@@ -30,5 +40,10 @@
    <bind pointcut="execution(* org.apache.ws.scout.util.ScoutJaxrUddiV3Helper->getAddress(..))">
         <advice name="getAddress" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIScoutAspect"/>
    </bind>
+
+   <bind pointcut="withincode(* org.apache.ws.scout.util.ScoutUddiJaxrHelper->getService(org.apache.ws.scout.model.uddi.v2.BusinessService,javax.xml.registry.LifeCycleManager))
+            AND call(* org.apache.ws.scout.model.uddi.v2.BusinessService->getBindingTemplates(..))">
+        <advice name="getBindingTemplates" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIScoutAspect"/>
+   </bind>
 </aop>
 

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -273,6 +273,8 @@
             <classpath path="${org.jboss.esb.rosetta.aopc.juddi.core.classes.dir}"/>
             <src path="${org.jboss.esb.rosetta.aopc.juddi.core.classes.dir}"/>
             <include name="org/apache/juddi/config/AppConfig.class"/>
+            <include name="org/apache/juddi/subscription/NotificationList.class"/>
+            <include name="org/apache/juddi/v3/auth/AuthenticatorFactory.class"/>
             <aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
             <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
         </aopc>
@@ -280,6 +282,7 @@
             <classpath path="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
             <src path="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
             <include name="org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.class"/>
+            <include name="org/apache/ws/scout/util/ScoutUddiJaxrHelper.class"/>
             <aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
             <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
         </aopc>
@@ -297,8 +300,12 @@
 
     <target name="aop-compile">
         <javac srcdir="aop/java" destdir="${org.jboss.esb.rosetta.aop.classes.dir}"
-            debug="${org.jboss.esb.debug}" optimize="${org.jboss.esb.optimize}"
-            classpathref="org.jboss.esb.rosetta.base.classpath"/>
+            debug="${org.jboss.esb.debug}" optimize="${org.jboss.esb.optimize}">
+            <classpath>
+                <path refid="org.jboss.esb.rosetta.base.classpath"/>
+                <pathelement location="${org.jboss.esb.rosetta.classes.dir}"/>
+            </classpath>
+        </javac>
     </target>
 
     <target name="war">

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/couriers/FaultMessageException.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/couriers/FaultMessageException.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/couriers/FaultMessageException.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -22,8 +22,12 @@
 
 package org.jboss.soa.esb.couriers;
 
+import java.io.IOException;
+import java.io.ObjectOutputStream;
 import java.net.URI;
 
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.message.format.MessageSerializer;
 import org.jboss.soa.esb.message.Message;
 
 /**
@@ -36,6 +40,8 @@
 public class FaultMessageException extends CourierException
 {
 
+	private static final Logger LOGGER = Logger.getLogger(FaultMessageException.class) ;
+	
 	private static final long serialVersionUID = 1L;
 
 	/**
@@ -68,10 +74,39 @@
 	
 	public final Message getReturnedMessage ()
 	{
+		if ((_msg == null) && (!attemptedDeserialisation))
+		{
+			attemptedDeserialisation = true ;
+			try
+			{
+				_msg = MessageSerializer.deserialize(serialisedForm) ;
+			}
+			catch (final IOException ioe)
+			{
+				LOGGER.warn("Failed to deserialize fault message", ioe) ;
+			}
+		}
 		return _msg;
 	}
 
+	
+	/**
+	 * Handle the serialisation.
+	 * @param stream The object output stream.
+	 * @throws IOException For errors during serialisation.
+	 */
+	private void writeObject(final ObjectOutputStream stream)
+		throws IOException
+	{
+		if (_msg != null)
+		{
+			serialisedForm = MessageSerializer.serialize(_msg) ;
+		}
+		stream.defaultWriteObject() ;
+	}
+	
 	private URI _code;
-	private Message _msg;
-
+	private transient Message _msg;
+	private transient boolean attemptedDeserialisation;
+	private byte[] serialisedForm ;
 }

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/helpers/Email.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -478,7 +478,11 @@
         Authenticator authenticator = null;
         
         if (!Util.isNullString(username)) {
-            String pw = new PasswordUtil(password).getPasswordAsString();
+            String pw = password ;
+            if (PasswordUtil.isPasswordFile(password))
+            {
+                pw = new PasswordUtil(password).getPasswordAsString();
+            }
             authenticator = new MyAuth(username, pw);         
         }
 

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/jca/EndpointProxy.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -70,6 +70,11 @@
     * The old classloader of the thread
     */
    protected ClassLoader oldClassLoader = null;
+   
+   /**
+    * The flag indicating that beforeDelivery was invoked.
+    */
+   protected boolean beforeDeliveryInvoked ;
 
    /**
     * Any transaction we started
@@ -156,7 +161,7 @@
          log.trace("MessageEndpoint " + getProxyString(proxy) + " released");
 
       // Tidyup any outstanding delivery
-      if (oldClassLoader != null)
+      if (beforeDeliveryInvoked)
       {
          try
          {
@@ -172,8 +177,9 @@
    protected void before(Object proxy, Method method, Object[] args) throws Throwable
    {
       // Called out of sequence
-      if (oldClassLoader != null)
+      if (beforeDeliveryInvoked)
          throw new IllegalStateException("Missing afterDelivery from the previous beforeDelivery for message endpoint " + getProxyString(proxy));
+      beforeDeliveryInvoked = true ;
 
       if (trace)
          log.trace("MessageEndpoint " + getProxyString(proxy) + " released");
@@ -203,8 +209,9 @@
    protected void after(Object proxy) throws Throwable
    {
       // Called out of sequence
-      if (oldClassLoader == null)
+      if (!beforeDeliveryInvoked)
          throw new IllegalStateException("afterDelivery without a previous beforeDelivery for message endpoint " + getProxyString(proxy));
+      beforeDeliveryInvoked = false ;
 
       // Finish this delivery committing if we can
       try
@@ -226,15 +233,24 @@
       if (trace)
          log.trace("MessageEndpoint " + getProxyString(proxy) + " delivering");
 
+      final Thread currentThread = Thread.currentThread() ;
+      final ClassLoader contextClassLoader = currentThread.getContextClassLoader() ;
+
       // Mark delivery if beforeDelivery was invoked
-      if (oldClassLoader != null)
+      if (beforeDeliveryInvoked)
+      {
          delivered = true;
+      }
+      else
+      {
+         currentThread.setContextClassLoader(loader) ;
+      }
 
       boolean commit = true;
       try
       {
          // Check for starting a transaction
-         if (oldClassLoader == null)
+         if (!beforeDeliveryInvoked)
          {
             boolean isTransacted = messageEndpointFactory.isDeliveryTransacted(method);
             startTransaction("delivery", proxy, method, args, isTransacted);
@@ -256,8 +272,9 @@
       finally
       {
          // No before/after delivery, end any transaction and release the lock
-         if (oldClassLoader == null)
+         if (!beforeDeliveryInvoked)
          {
+            currentThread.setContextClassLoader(contextClassLoader) ;
             try
             {
                // Finish any transaction we started

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/FaultUnitTest.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -24,6 +24,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URI;
@@ -32,6 +33,8 @@
 
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.message.format.serialized.MessageImpl;
+import org.jboss.soa.esb.couriers.FaultMessageException;
+import org.jboss.soa.esb.listeners.message.errors.Factory;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.format.MessageFactory;
 import org.jboss.soa.esb.message.format.MessageType;
@@ -118,4 +121,12 @@
 		}
 	}
 
+	public void testSerializableFaultMessageException () throws IOException
+	{
+		final Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML) ;
+		final FaultMessageException exception = new FaultMessageException("error message", URI.create(Factory.UNEXPECTED_ERROR), message) ;
+		final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+		final ObjectOutputStream oos = new ObjectOutputStream(baos) ;
+		oos.writeObject(exception) ;
+	}
 }

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/SamlAssertionExtractorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/SamlAssertionExtractorUnitTest.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/SamlAssertionExtractorUnitTest.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -43,22 +43,16 @@
  */
 public class SamlAssertionExtractorUnitTest
 {
+    /**
+     * Intentionally ignored. Takes some time to run and is indended to be run maually.
+     */
     @Test
-    public void extractAssertionFromSOAPString() throws Exception
-    {
-        final SamlAssertionExtractor extractor = new SamlAssertionExtractor();
-        final String samlAssertion = extractor.extractSamlAssertion(readFile("soap-saml-example.xml"));
-        Element assertionElement = SamlCredential.assertionToElement(samlAssertion);
-
-        assertEquals("saml:Assertion", assertionElement.getNodeName());
-    }
-    
-    @Test
     @Ignore
     public void performance() throws Exception
     {
         final SamlAssertionExtractor extractor = new SamlAssertionExtractor();
         final String soap = readFile("soap-saml-example.xml");
+        @SuppressWarnings("unused")
         AuthenticationRequest authRequest = null;
         
         // warm up 
@@ -67,16 +61,25 @@
             authRequest = extractor.extractSecurityInfo(soap);
         }
         
-        int iterations = 1000000;
-        long start = System.nanoTime();
+        final int iterations = 1000000;
+        final long start = System.nanoTime();
         for (int i = 0; i < iterations; i++)
         {
             authRequest = extractor.extractSecurityInfo(soap);
         }
-        long duration = System.nanoTime() - start;
-        long average = duration/iterations;
-        System.out.println("Duration : " + NANOSECONDS.toMillis(duration) + "ms, Average : " + NANOSECONDS.toNanos(average) + "ns");
+        final long duration = System.nanoTime() - start;
+        System.out.println(iterations + " took : " + NANOSECONDS.toSeconds(duration) + "s");
     }
+
+    @Test
+    public void extractAssertionFromSOAPString() throws Exception
+    {
+        final SamlAssertionExtractor extractor = new SamlAssertionExtractor();
+        final String samlAssertion = extractor.extractSamlAssertion(readFile("soap-saml-example.xml"));
+        Element assertionElement = SamlCredential.assertionToElement(samlAssertion);
+
+        assertEquals("saml:Assertion", assertionElement.getNodeName());
+    }
     
     private String readFile(final String fileName) throws Exception
     {

Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractorUnitTest.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/services/security/auth/ws/WSSecuritySoapExtractorUnitTest.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -24,19 +24,14 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import java.io.IOException;
 import java.security.cert.X509Certificate;
 
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
 
 import junit.framework.JUnit4TestAdapter;
 
-import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.services.security.auth.AuthenticationRequest;
 import org.junit.Test;
-import org.xml.sax.SAXException;
 
 
 /**

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/base-build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/base-build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -141,6 +141,7 @@
 	<target name="jbossesb-dependencies-as4" if="jbossas4" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-source-dependencies, jbossesb-server-dependencies, check-as-version">
 		<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
 		<property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
+		<property name="org.jboss.esb.server.endorsed.dir" location="${org.jboss.esb.server.home}/lib/endorsed"/>
 
 		<path id="deployment-classpath">
 			<!-- jbossws jars -->
@@ -197,6 +198,7 @@
         <property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
 		<property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
 		<property name="org.jboss.esb.server.common.lib" location="${org.jboss.esb.server.home}/common/lib"/>
+		<property name="org.jboss.esb.server.endorsed.dir" location="${org.jboss.esb.server.home}/lib/endorsed"/>
 
         <path id="deployment-classpath">
             <!-- jbossws jars -->

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/readme.txt
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/readme.txt	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/readme.txt	2009-12-08 08:15:27 UTC (rev 30522)
@@ -11,10 +11,6 @@
   Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
   and a more detailed descripton of the different ways to run the quickstarts.
 
-  Note, this quickstart requires an ESB and JBossWS installation into
-  JBoss AS 4.2.0.GA.  Installation instructions for both can be found in the
-  install/readme.txt.
-
 To Run:
 =======
   1. In a command terminal window in the quickstart folder type 'ant deploy'.

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/security_cert/readme.txt
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/security_cert/readme.txt	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/security_cert/readme.txt	2009-12-08 08:15:27 UTC (rev 30522)
@@ -24,10 +24,6 @@
   Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
   and a more detailed descripton of the different ways to run the quickstarts.
 
-  Note, this quickstart requires an ESB and JBossWS installation into
-  JBoss AS 4.2.0.GA.  Installation instructions for both can be found in the
-  install/readme.txt.
-
 To Run:
 =======
   1. Type 'ant deploy'.

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/README.html
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/README.html	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/README.html	2009-12-08 08:15:27 UTC (rev 30522)
@@ -15,10 +15,6 @@
         Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
         and a more detailed descripton of the different ways to run the quickstarts.
         <p/>
-        Note, this quickstart requires an ESB and JBossWS installation into
-        JBoss AS 4.2.1.GA. Installation instructions for both can be found in the
-        install/readme.txt.
-        <p/>
         <b style="text-decoration:  blink; color: red">NOTE:</b> This Quickstart requires the JBossRemoting 2.2.2SP2 or higher patch to be applied.
         If you are running on the JBoss App Server (and not the JBoss ESB Server), then you may need to apply a patch.  This simply involves downloading
         <a href="http://repository.jboss.org/jboss/remoting/2.2.2.SP2/lib/jboss-remoting.jar">jboss-remoting.jar</a>

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_mtom/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -45,6 +45,7 @@
         <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.client.MTOMClient"
               failonerror="true">
             <classpath refid="exec-classpath"/>
+            <sysproperty key="java.endorsed.dirs" path="${org.jboss.esb.server.endorsed.dir}"/>
         </java>
     </target>
 

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_producer/readme.txt
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_producer/readme.txt	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_producer/readme.txt	2009-12-08 08:15:27 UTC (rev 30522)
@@ -8,10 +8,6 @@
   Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
   and a more detailed descripton of the different ways to run the quickstarts.
 
-  Note, this quickstart requires an ESB and JBossWS installation into
-  JBoss AS 4.2.0.GA.  Installation instructions for both can be found in the
-  install/readme.txt.
-
 To Run:
 =======
   1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/README.html
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/README.html	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/README.html	2009-12-08 08:15:27 UTC (rev 30522)
@@ -20,10 +20,6 @@
         Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
         and a more detailed descripton of the different ways to run the quickstarts.
         <p/>
-        Note, this quickstart requires an ESB and JBossWS installation into
-        JBoss AS 4.2.1.GA. Installation instructions for both can be found in the
-        install/readme.txt.
-        <p/>
         <b style="text-decoration:  blink; color: red">NOTE:</b> This Quickstart requires the JBossRemoting 2.2.2SP2 or higher patch to be applied.
         This simply involves downloading <a href="http://repository.jboss.org/jboss/remoting/2.2.2.SP2/lib/jboss-remoting.jar">jboss-remoting.jar</a>
         and copying it into your "server/&lt;server&gt;/lib" folder.  Be sure to restart your JBoss

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wsaddressing/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -44,6 +44,7 @@
     <target name="runtest" depends="compile" description="runs test JMS Sender">
         <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservicewsa.client.WSAClient" failonerror="true">
             <classpath refid="exec-classpath"/>
+            <sysproperty key="java.endorsed.dirs" path="${org.jboss.esb.server.endorsed.dir}"/>
         </java>
     </target>
 

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/README.html
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/README.html	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/README.html	2009-12-08 08:15:27 UTC (rev 30522)
@@ -15,10 +15,6 @@
         Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
         and a more detailed descripton of the different ways to run the quickstarts.
         <p/>
-        Note, this quickstart requires an ESB and JBossWS installation into
-        JBoss AS 4.2.1.GA. Installation instructions for both can be found in the
-        install/readme.txt.
-        <p/>
         <b style="text-decoration:  blink; color: red">NOTE:</b> This Quickstart requires the JBossRemoting 2.2.2SP2 or higher patch to be applied.
         This simply involves downloading <a href="http://repository.jboss.org/jboss/remoting/2.2.2.SP2/lib/jboss-remoting.jar">jboss-remoting.jar</a>
         and copying it into your "server/&lt;server&gt;/lib" folder.  Be sure to restart your JBoss

Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_wssecurity/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -39,6 +39,7 @@
         <java fork="yes" classname="org.jboss.test.ws.jaxws.samples.wssecurity.client.WSSClient"
               failonerror="true">
             <classpath refid="exec-classpath"/>
+            <sysproperty key="java.endorsed.dirs" path="${org.jboss.esb.server.endorsed.dir}"/>
             <sysproperty key="org.jboss.ws.wsse.keyStore" value="src/META-INF/wsse.keystore"/>
             <sysproperty key="org.jboss.ws.wsse.trustStore" value="src/META-INF/wsse.truststore"/>
             <sysproperty key="org.jboss.ws.wsse.keyStorePassword" value="jbossws"/>

Modified: labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleBaseHelper.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -209,19 +209,6 @@
 	/**
 	 * This shows how rules are loaded up from a deployed package.
 	 */
-	public RuleBase loadRuleBaseFromRuleAgent(final String ruleAgentProperties) throws IOException, Exception 
-	{
-		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties, new LogAgentEventListener() ).getRuleBase();
-	}
-	
-	public RuleBase loadRuleBaseFromRuleAgent(final Properties ruleAgentProperties) throws IOException, Exception 
-	{
-		return RuleAgent.newRuleAgent( ruleAgentProperties, new LogAgentEventListener() ).getRuleBase();
-	}
-	
-	/**
-	 * This shows how rules are loaded up from a deployed package.
-	 */
 	public RuleAgent createRuleAgent(final String ruleAgentProperties) throws IOException, Exception 
 	{
 		return RuleAgent.newRuleAgent( "/" + ruleAgentProperties, new LogAgentEventListener() );

Modified: labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleService.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleService.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleService.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -46,6 +46,7 @@
 import org.jboss.soa.esb.lifecycle.LifecycleResource;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceFactory;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.services.rules.RuleInfo;
 import org.jboss.soa.esb.services.rules.RuleService;
@@ -808,13 +809,28 @@
 		RuleAgent ruleAgent = ruleAgents.get( ruleAgentProperties );
 		if ( ruleAgent == null )
 		{
-			ruleAgent = DroolsRuleBaseHelper.getInstance().createRuleAgent( ruleAgentProperties );
-			ruleAgents.put( ruleAgentProperties, ruleAgent );
+			synchronized (ruleAgents)
+			{
+				ruleAgent = ruleAgents.get( ruleAgentProperties );
+				if (ruleAgent == null)
+				{
+					ruleAgent = DroolsRuleBaseHelper.getInstance().createRuleAgent( ruleAgentProperties );
+					ruleAgents.put( ruleAgentProperties, ruleAgent );
+				}
+			}
 		}
 
 		RuleBase currentRuleBase = ruleAgent.getRuleBase();
 		//	always update the cache as the rulebase might have been updated.
-		getCachedRuleBases().put( ruleAgentProperties, currentRuleBase );
+		final RuleBase origRuleBase = getCachedRuleBases().put( ruleAgentProperties, currentRuleBase );
+		if ((origRuleBase != currentRuleBase) && (origRuleBase != null))
+		{
+			if (log.isInfoEnabled())
+			{
+				log.info("destroying stateful session for " + LifecycleResourceManager.getSingleton().getIdentity());
+			}
+			disposeStatefulSessions(origRuleBase.getStatefulSessions()) ;
+		}
 		return currentRuleBase;
 	}
 
@@ -868,7 +884,10 @@
 		        final Collection<RuleBase> values = resource.values();
 		        for (RuleBase ruleBase : values)
                 {
-                    log.info("destroying stateful session for " + lifecycleIdentity);
+                    if (log.isInfoEnabled())
+                    {
+                        log.info("destroying stateful session for " + lifecycleIdentity);
+                    }
     		        disposeStatefulSessions(ruleBase.getStatefulSessions());
                 }
 		        resource.clear();
@@ -923,8 +942,12 @@
                 final Collection<RuleAgent> values = resource.values();
                 for (RuleAgent ruleAgent : values)
                 {
-                    log.info("destroying stateful session for " + lifecycleIdentity);
+                    if (log.isInfoEnabled())
+                    {
+                        log.info("destroying stateful session for " + lifecycleIdentity);
+                    }
     		        disposeStatefulSessions(ruleAgent.getRuleBase().getStatefulSessions());
+                    ruleAgent.stopPolling() ;
                 }
                 resource.clear();
             }

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBComponent.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -109,4 +109,24 @@
             report.setStatus(CreateResourceStatus.FAILURE);
         }
     }
+   
+   public CreateResourceReport createResource(CreateResourceReport report) {
+       String resourceTypeName = report.getResourceType().getName();
+
+       if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+           esbCreate(report, resourceTypeName);
+       } else {
+           throw new UnsupportedOperationException("Unknown Resource type: " + resourceTypeName);
+       }
+
+       // JBNADM-1984 - The contract with this method is that the newly created managed resource should be discoverable.
+       //               Wait here so JBoss can recognize that the new managed resource has been created.
+       try {
+           Thread.sleep(5000L);
+       } catch (InterruptedException e) {
+           log.info("Sleep after datasource create interrupted", e);
+       }
+
+       return report;
+   }
 }

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBDeploymentComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBDeploymentComponent.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/java/org/jbosson/plugins/jbossesb/ESBDeploymentComponent.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -24,110 +24,11 @@
  * @param <T>
  */
 public class ESBDeploymentComponent extends AbstractDeploymentComponent {
-    protected void esbCreate(CreateResourceReport report, String resourceTypeName) {
-        ResourcePackageDetails details = report.getPackageDetails();
-        PackageDetailsKey key = details.getKey();
-        String archiveName = key.getName();
-
-        try {
-            // First check to see if the file name has the correct extension. Reject if the user attempts to
-            // deploy a WAR file with a bad extension.
-            String expectedExtension;
-            if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-                expectedExtension = "esb";
-            } else {
-            	expectedExtension = "";
-            }
-            
-            int lastPeriod = archiveName.lastIndexOf(".");
-            String extension = archiveName.substring(lastPeriod + 1);
-            if (lastPeriod == -1 || !expectedExtension.equals(extension)) {
-                report.setStatus(CreateResourceStatus.FAILURE);
-                report.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]. Expected ["
-                    + expectedExtension + "]");
-                return;
-            }
-
-            Configuration deployTimeConfiguration = details.getDeploymentTimeConfiguration();
-            String deployDirectory = deployTimeConfiguration.getSimple("deployDirectory").getStringValue();
-
-            // Verify the user did not enter a path that represents a security issue:
-            // - No absolute directories; must be relative to the configuration path
-            // - Cannot contain parent directory references
-            File testPath = new File(deployDirectory);
-
-            if (testPath.isAbsolute()) {
-                throw new RuntimeException("Path to deploy (deployDirectory) must be a relative path. Path specified: "
-                    + deployDirectory);
-            }
-
-            if (deployDirectory.contains("..")) {
-                throw new RuntimeException(
-                    "Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
-                        + deployDirectory);
-            }
-
-            // Perform the deployment
-            FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath(), deployDirectory),
-                    "", details.getPackageTypeName());
-
-            PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
-
-            if (zipProperty != null && zipProperty.getBooleanValue() != null) {
-                boolean zip = zipProperty.getBooleanValue();
-
-                File tempDir = resourceContext.getTemporaryDirectory();
-                File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
-                OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
-
-                ContentServices contentServices = contentContext.getContentServices();
-                contentServices
-                    .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
-
-                osForTempDir.close();
-
-                // check for content 
-                boolean valid = isOfType(tempFile, resourceTypeName);
-                if (!valid) {
-                    report.setStatus(CreateResourceStatus.FAILURE);
-                    report.setErrorMessage("Expected a " + resourceTypeName
-                        + " file, but its format/content did not match");
-                    return;
-                }
-
-                InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
-                deployer.createContent(details, isForTempDir, !zip, false);
-
-                // Resource key should match the following:      
-                // EAR: jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=rhq.ear      
-                // WAR: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=embedded-console.war
-
-                String resourceKey;
-                if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-                    resourceKey = "jboss.esb:deployment="
-                        + archiveName;
-                } 
-
-                report.setResourceName(archiveName);
-                //report.setResourceKey(resourceKey);
-                report.setStatus(CreateResourceStatus.SUCCESS);
-                sleepAfterConfigXmlUpdate();
-            } else {
-                report.setStatus(CreateResourceStatus.FAILURE);
-                report.setErrorMessage("Zipped property is required");
-            }
-        } catch (Throwable t) {
-            log.error("Error deploying application for report: " + report, t);
-            report.setException(t);
-            report.setStatus(CreateResourceStatus.FAILURE);
-        }
-    }
-    
 	public void deleteResource() throws Exception {
-        Configuration pluginConfiguration = super.resourceContext.getPluginConfiguration();
+        Configuration pluginConfiguration = getResourceContext().getPluginConfiguration();
         String fullFileName = pluginConfiguration.getSimple("deployment").getStringValue();
         
-        ESBComponent jbossASComponent = (ESBComponent) super.resourceContext.getParentResourceComponent();
+        ESBComponent jbossASComponent = (ESBComponent) getResourceContext().getParentResourceComponent();
         //File deploymentFile = jbossASComponent.getDeploymentFilePath(super.resourceContext.getResourceKey());
 
         final File deploy = new File(jbossASComponent.getConfigurationPath(), "deploy");

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5Component.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5Component.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5Component.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -1,143 +1,240 @@
 package org.jbosson.plugins.jbossesb;
 
 import java.io.File;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.List;
 import java.util.Set;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.plugins.jbossas5.ApplicationServerComponent;
-import org.rhq.plugins.jbossas5.util.FileContentDelegate;
 
+import org.apache.commons.lang.exception.ExceptionUtils;
+import org.jboss.on.common.jbossas.JBPMWorkflowManager;
+import org.jboss.on.common.jbossas.JBossASPaths;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.content.PackageDetailsKey;
 import org.rhq.core.domain.content.PackageType;
-import org.rhq.core.domain.content.transfer.ContentResponseResult;
-import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
 import org.rhq.core.domain.content.transfer.DeployPackageStep;
-import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
 import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
 import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.resource.CreateResourceStatus;
-
+import org.rhq.core.domain.resource.ResourceType;
 import org.rhq.core.pluginapi.content.ContentContext;
-import org.rhq.core.pluginapi.content.ContentFacet;
-import org.rhq.core.pluginapi.content.ContentServices;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
 import org.rhq.core.pluginapi.inventory.CreateResourceReport;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
 import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.core.pluginapi.operation.OperationContext;
-import org.rhq.core.pluginapi.util.ResponseTimeLogParser;
+import org.rhq.plugins.jbossas5.ApplicationServerComponent;
+import org.rhq.plugins.jbossas5.connection.LocalProfileServiceConnectionProvider;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnectionProvider;
+import org.rhq.plugins.jbossas5.connection.RemoteProfileServiceConnectionProvider;
+import org.rhq.plugins.jbossas5.deploy.Deployer;
+import org.rhq.plugins.jbossas5.deploy.LocalDeployer;
+import org.rhq.plugins.jbossas5.deploy.RemoteDeployer;
 
+import com.jboss.jbossnetwork.product.jbpm.handlers.ControlActionFacade;
 
+/**
+ * Component for ESB deployments.
+ *
+ * @author Tom Cunningham
+ */
 public class ESB5Component extends AbstractESBComponent
 {
-  public File getConfigurationPath()
-  {
-    ApplicationServerComponent jass = (ApplicationServerComponent)this.resourceContext.getParentResourceComponent();
-    ResourceContext rc = jass.getResourceContext();
-    Configuration config = rc.getPluginConfiguration();
+    static final String HOME_DIR = "homeDir";
+    static final String SERVER_HOME_DIR = "serverHomeDir";
 
-    String configurationPath = config.getSimpleValue("serverHomeDir", null);
+    static final String NAMING_URL = "namingURL";
+    static final String CREDENTIALS = "credentials";
+    static final String PRINCIPAL = "principal";
 
-    return new File(configurationPath);
-  }
-  
-  protected void esbCreate(CreateResourceReport report, String resourceTypeName) {
-      ResourcePackageDetails details = report.getPackageDetails();
-      PackageDetailsKey key = details.getKey();
-      String archiveName = key.getName();
+    private ProfileServiceConnection connection;
+    
+    private ESB5ContentFacetDelegate contentFacetDelegate;
+	
+    @Override
+    public void start(ResourceContext context) {
+ 	   super.start(context);
+       JBPMWorkflowManager workflowManager = createJbpmWorkflowManager(resourceContext);
 
-      try {
-          // First check to see if the file name has the correct extension. Reject if the user attempts to
-          // deploy a WAR file with a bad extension.
-          String expectedExtension;
-          if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-              expectedExtension = "esb";
-          } else {
-              expectedExtension = "";
-          }
-	        
-          int lastPeriod = archiveName.lastIndexOf(".");
-	        String extension = archiveName.substring(lastPeriod + 1);
-	        if (lastPeriod == -1 || !expectedExtension.equals(extension)) {
-	        	report.setStatus(CreateResourceStatus.FAILURE);
-	            report.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]. Expected ["
-	            	+ expectedExtension + "]");
-	            return;
-	        }
+ 	   connectToProfileService();
+ 	   
+       this.contentFacetDelegate = new ESB5ContentFacetDelegate(workflowManager, configPath,
+    		   resourceContext.getContentContext());
+    }
 
-          Configuration deployTimeConfiguration = details.getDeploymentTimeConfiguration();
-          String deployDirectory = deployTimeConfiguration.getSimple("deployDirectory").getStringValue();
+    public void stop() {
+    	disconnectFromProfileService();
+    }
+    
+    private JBPMWorkflowManager createJbpmWorkflowManager(ResourceContext resourceContext) {
+        ContentContext contentContext = resourceContext.getContentContext();
+        ControlActionFacade controlActionFacade = null;
+        JBPMWorkflowManager workflowManager = new JBPMWorkflowManager(contentContext, controlActionFacade, this
+            .getJBossASPaths());
+        return workflowManager;
+    }
+    
+    public boolean runningEmbedded() {
+        ApplicationServerComponent jass = (ApplicationServerComponent)this.resourceContext.getParentResourceComponent();
+        ResourceContext rc = jass.getResourceContext();
 
-          // Verify the user did not enter a path that represents a security issue:
-          // - No absolute directories; must be relative to the configuration path
-          // - Cannot contain parent directory references
-          File testPath = new File(deployDirectory);
+        Configuration pluginConfiguration = rc.getPluginConfiguration();
+        String namingUrl = pluginConfiguration.getSimpleValue(NAMING_URL, null);
+        return namingUrl == null;
+    }
+     
+    private static void validateNamingURL(String namingURL) {
+        URI namingURI;
+        try {
+            namingURI = new URI(namingURL);
+        } catch (URISyntaxException e) {
+            throw new RuntimeException("Naming URL '" + namingURL + "' is not valid: " + e.getLocalizedMessage());
+        }
+        if (!namingURI.isAbsolute())
+            throw new RuntimeException("Naming URL '" + namingURL + "' is not absolute.");
+        if (!namingURI.getScheme().equals("jnp"))
+            throw new RuntimeException("Naming URL '" + namingURL
+                + "' has an invalid protocol - the only valid protocol is 'jnp'.");
+    }
+    
+    private void connectToProfileService() {
+        ApplicationServerComponent jass = (ApplicationServerComponent)this.resourceContext.getParentResourceComponent();
+        ResourceContext rc = jass.getResourceContext();
 
-          if (testPath.isAbsolute()) {
-          	throw new RuntimeException("Path to deploy (deployDirectory) must be a relative path. Path specified: "
-	                    + deployDirectory);
-          }
-          
-          if (deployDirectory.contains("..")) {
-	        	throw new RuntimeException(
-	            	"Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
-	                	+ deployDirectory);
-	        }
+    	if (this.connection != null)
+            return;
+        // TODO: Check for a defunct connection and if found try to reconnect.
+        ProfileServiceConnectionProvider connectionProvider;
+        if (runningEmbedded()) {
+            connectionProvider = new LocalProfileServiceConnectionProvider();
+        } else {
+            Configuration pluginConfig = rc.getPluginConfiguration();
+            String namingURL = pluginConfig.getSimpleValue(NAMING_URL, null);
+            validateNamingURL(namingURL);
+            String principal = pluginConfig.getSimpleValue(PRINCIPAL, null);
+            String credentials = pluginConfig.getSimpleValue(CREDENTIALS, null);
+            connectionProvider = new RemoteProfileServiceConnectionProvider(namingURL, principal, credentials);
+        }
+        try {
+            this.connection = connectionProvider.connect();
+        } catch (RuntimeException e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            if (rootCause instanceof SecurityException) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Failed to connect to Profile Service.", e);
+                } else {
+                    log.warn("Failed to connect to Profile Service - cause: " + rootCause);
+                }
+                throw new InvalidPluginConfigurationException(
+                        "Values of 'principal' and/or 'credentials' connection properties are invalid.", rootCause);
+            }
+            log.debug("Failed to connect to Profile Service.", e);
+        }
+    }
 
-	        // Perform the deployment
-          FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath(),deployDirectory),
-                  "", details.getPackageTypeName());
+    public void disconnectFromProfileService() {
+        if (this.connection != null) {
+            try {
+                this.connection.getConnectionProvider().disconnect();
+            } catch (RuntimeException e) {
+                log.debug("Failed to disconnect from Profile Service.", e);
+            } finally {
+                this.connection = null;
+            }
+        }
+  }
+	
+  private File resolvePathRelativeToHomeDir(String path) {
+	  File configDir = new File(path);
+	  if (!configDir.isAbsolute()) {
+		  Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
+		  String homeDir = pluginConfig.getSimple(HOME_DIR).getStringValue();
+		  configDir = new File(homeDir, path);
+	  }
+	  return configDir;
+  }
+    
+  private JBossASPaths getJBossASPaths() {
+      Configuration pluginConfiguration = this.resourceContext.getPluginConfiguration();
 
-          PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
+      String homeDir = pluginConfiguration.getSimpleValue(HOME_DIR, null);
+      String serverHomeDir = pluginConfiguration.getSimpleValue(SERVER_HOME_DIR, null);
 
-	        if (zipProperty != null && zipProperty.getBooleanValue() != null) {
-	        	boolean zip = zipProperty.getBooleanValue();
+      return new JBossASPaths(homeDir, serverHomeDir);
+  }
+  
+  public File getConfigurationPath() {
+	  ApplicationServerComponent jass = (ApplicationServerComponent)this.resourceContext.getParentResourceComponent();
+	  ResourceContext rc = jass.getResourceContext();
+	  Configuration config = rc.getPluginConfiguration();
+	  String configurationPath = config.getSimpleValue("serverHomeDir", null);
+	  File configPath = new File(configurationPath);
+	  if (!configPath.isDirectory()) {
+		  throw new InvalidPluginConfigurationException("Configuration path '" + configPath + "' does not exist.");
+	  }
+    
+	  return configPath;
+  }
+    
+  public CreateResourceReport createResource(CreateResourceReport report) {
+	  ResourceType resourceType = report.getResourceType();
+	  String resourceTypeName = report.getResourceType().getName();
 
-	            File tempDir = resourceContext.getTemporaryDirectory();
-	            File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
-	            OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
+	  // Hack - AbstractDeployer is looking for a "deployExploded" value rather than a 
+	  // deployZipped value - if we don't already have these properties, add them in
+      ResourcePackageDetails details = report.getPackageDetails();
+      Configuration deployTimeConfig = details.getDeploymentTimeConfiguration();
 
-	            contentContext = resourceContext.getContentContext();
-	            ContentServices contentServices = contentContext.getContentServices();
-	            contentServices
-	                    .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
+      if (deployTimeConfig.get("deployExploded") == null) {
+		  PropertySimple ps = new PropertySimple();
+		  ps.setName("deployExploded");
+		  ps.setBooleanValue(!deployTimeConfig.getSimple("deployZipped").getBooleanValue());
+		  deployTimeConfig.put(ps);
+      }
+		 
+      if (deployTimeConfig.get("deployFarmed") == null) {
+		  PropertySimple df = new PropertySimple();
+		  df.setName("deployFarmed");
+		  df.setBooleanValue(false);
+		  deployTimeConfig.put(df);
+      }
+		  
+      if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
+    	  getDeployer().deploy(report, resourceType);
+      } else {
+          throw new UnsupportedOperationException("Unknown Resource type: " + resourceTypeName);
+      }
+      
+      disconnectFromProfileService();
+      return report;
+  }
 
-	            osForTempDir.close();
+  protected Deployer getDeployer() {
+      ProfileServiceConnection profileServiceConnection = getConnection();
+      if (runningEmbedded()) {
+          return new LocalDeployer(profileServiceConnection);
+      } else {
+          return new RemoteDeployer(profileServiceConnection, this.resourceContext);
+      }
+  }
 
-	            InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
-	            deployer.createContent(details, isForTempDir, !zip, false);
+  public ProfileServiceConnection getConnection() {
+      connectToProfileService();
+      return this.connection;
+  }
 
-              // Resource key should match the following:      
-              // ESB: jboss.esb:deployment=jbossesb.esb
+  public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+      return contentFacetDelegate.discoverDeployedPackages(type);
+  }
 
-              String resourceKey;
-              resourceKey = "jboss.esb:deployment=" + archiveName;
+  public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails) {
+      return contentFacetDelegate.generateInstallationSteps(packageDetails);
+  }
 
-              report.setResourceName(archiveName);
-              report.setResourceKey(resourceKey);
-              report.setStatus(CreateResourceStatus.SUCCESS);
-          } else {
-              report.setStatus(CreateResourceStatus.FAILURE);
-              report.setErrorMessage("Zipped property is required");
-          }
-      } catch (Throwable t) {
-          log.error("Error deploying application for report: " + report, t);
-          report.setException(t);
-          report.setStatus(CreateResourceStatus.FAILURE);
-      }
+  public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
+      return contentFacetDelegate.removePackages(packages);
   }
 
-  
-  
-}
+  public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
+      return contentFacetDelegate.retrievePackageBits(packageDetails);
+  }  
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5ContentFacetDelegate.java (from rev 30511, labs/jbossesb/branches/JBESB_4_7_CP/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5ContentFacetDelegate.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5ContentFacetDelegate.java	                        (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5ContentFacetDelegate.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -0,0 +1,209 @@
+package org.jbosson.plugins.jbossesb;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.on.common.jbossas.AbstractJBossASContentFacetDelegate;
+import org.jboss.on.common.jbossas.JBPMWorkflowManager;
+import org.rhq.core.domain.content.PackageDetailsKey;
+import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ContentResponseResult;
+import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
+import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
+import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
+import org.rhq.core.pluginapi.content.ContentContext;
+import org.rhq.core.pluginapi.content.ContentServices;
+import org.rhq.plugins.jbossas5.util.FileContentDelegate;
+import org.rhq.plugins.jbossas5.util.JarContentDelegate;
+
+import org.rhq.plugins.jbossas5.EmptyFileException;
+
+public class ESB5ContentFacetDelegate extends AbstractJBossASContentFacetDelegate {
+
+    private final Log log = LogFactory.getLog(this.getClass());
+
+    private final Map<PackageType, FileContentDelegate> contentDelegates = new HashMap<PackageType, FileContentDelegate>();
+
+    private File configurationPath;
+
+    private ContentContext contentContext;
+
+    private void setConfigurationPath(File configurationPath) {
+        this.configurationPath = configurationPath;
+    }
+
+    private File getConfigurationPath() {
+        return this.configurationPath;
+    }
+
+    private void setContentContext(ContentContext contentContext) {
+        this.contentContext = contentContext;
+    }
+
+    private ContentContext getContentContext() {
+        return this.contentContext;
+    }
+
+    protected ESB5ContentFacetDelegate(JBPMWorkflowManager workflowManager, File configurationPath,
+        ContentContext contentContext) {
+        super(workflowManager);
+        this.setConfigurationPath(configurationPath);
+        this.setContentContext(contentContext);
+    }
+
+    @Override
+    public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
+        FileContentDelegate contentDelegate = getContentDelegate(type);
+
+        Set<ResourcePackageDetails> details = null;
+        if (contentDelegate != null) {
+            details = contentDelegate.discoverDeployedPackages();
+        }
+
+        return details;
+    }
+
+    private FileContentDelegate getContentDelegate(PackageType type) {
+        FileContentDelegate contentDelegate = contentDelegates.get(type);
+        if (contentDelegate == null) {
+            if (type.getName().equals("library")) {
+                File deployLib = new File(this.getConfigurationPath(), "lib");
+                contentDelegate = new JarContentDelegate(deployLib, type.getName());
+            }
+
+            contentDelegates.put(type, contentDelegate);
+        }
+
+        return contentDelegate;
+    }
+
+    @Override
+    public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices) {
+        ContentResponseResult overallResult = ContentResponseResult.SUCCESS;
+        List<DeployIndividualPackageResponse> individualResponses = new ArrayList<DeployIndividualPackageResponse>(
+            packages.size());
+
+        for (ResourcePackageDetails pkg : packages) {
+            log.info("Attempting to deploy package: " + pkg);
+
+            String packageTypeName = pkg.getPackageTypeName();
+            if (packageTypeName.equals(PACKAGE_TYPE_PATCH)) {
+
+                if (packages.size() > 1) {
+                    log.warn("Attempt to install more than one patch at a time, installation aborted.");
+
+                    DeployPackagesResponse response = new DeployPackagesResponse(ContentResponseResult.FAILURE);
+                    response
+                        .setOverallRequestErrorMessage("When deploying a patch, no other packages may be deployed at the same time.");
+                    return response;
+                }
+
+                try {
+                    DeployIndividualPackageResponse response = getWorkflowManager().run(pkg);
+
+                    if (response.getResult() == ContentResponseResult.FAILURE) {
+                        overallResult = ContentResponseResult.FAILURE;
+                    }
+
+                    // just in case response is null, it would throw NPE on the getResult() check above but the item
+                    // would already be a member in individualResponses; moving the add below the check ensures that
+                    // only non-null instances of individualResponses will ever make it into the List
+                    individualResponses.add(response);
+                } catch (Throwable throwable) {
+                    log.error("Error deploying package: " + pkg, throwable);
+
+                    // Don't forget to provide an individual response for the failed package.
+                    DeployIndividualPackageResponse response = new DeployIndividualPackageResponse(pkg.getKey(),
+                        ContentResponseResult.FAILURE);
+                    response.setErrorMessageFromThrowable(throwable);
+                    individualResponses.add(response);
+
+                    overallResult = ContentResponseResult.FAILURE;
+                }
+            } else if (packageTypeName.equals(PACKAGE_TYPE_LIBRARY)) {
+                if (packages.size() > 1) {
+                    log.warn("Attempt to install more than one patch at a time, installation aborted.");
+
+                    DeployPackagesResponse response = new DeployPackagesResponse(ContentResponseResult.FAILURE);
+                    response
+                        .setOverallRequestErrorMessage("When deploying a patch, no other packages may be deployed at the same time.");
+                    return response;
+                } else {
+                    deployJarLibrary(pkg, contentServices);
+                }
+            }
+        }
+
+        DeployPackagesResponse response = new DeployPackagesResponse(overallResult);
+        response.getPackageResponses().addAll(individualResponses);
+
+        return response;
+    }
+
+    public DeployPackagesResponse deployJarLibrary(ResourcePackageDetails packageDetails,
+        ContentServices contentServices) {
+        ContentResponseResult overallResult = ContentResponseResult.SUCCESS;
+        List<DeployIndividualPackageResponse> individualResponses = new ArrayList<DeployIndividualPackageResponse>(1);
+        String deployDir = this.getConfigurationPath() + File.separator + "lib";
+        String destinationFileLocation = deployDir + File.separator + packageDetails.getKey().getName() + ".jar";
+        //get the name of the uploaded file.
+
+        try {
+            downloadBits(packageDetails.getKey(), destinationFileLocation);
+        } catch (Throwable throwable) {
+            log.error("Error deploying package: " + packageDetails, throwable);
+            DeployIndividualPackageResponse response = new DeployIndividualPackageResponse(packageDetails.getKey(),
+                ContentResponseResult.FAILURE);
+            response.setErrorMessageFromThrowable(throwable);
+            individualResponses.add(response);
+            overallResult = ContentResponseResult.FAILURE;
+        }
+
+        DeployPackagesResponse response = new DeployPackagesResponse(overallResult);
+        response.getPackageResponses().addAll(individualResponses);
+        return response;
+    }
+
+    public void downloadBits(PackageDetailsKey key, String destinationFileLocation) throws IOException,
+        EmptyFileException {
+        ContentServices contentServices = this.getContentContext().getContentServices();
+
+        // Open a stream to where the downloaded file should go
+        FileOutputStream output = new FileOutputStream(destinationFileLocation);
+        BufferedOutputStream bufferedOutput = new BufferedOutputStream(output, 4096);
+
+        // Request the bits from the server
+        try {
+            contentServices.downloadPackageBits(contentContext, key, bufferedOutput, true);
+            bufferedOutput.close();
+
+            // Verify the file was created correctly
+            File downloadedFile = new File(destinationFileLocation);
+            if (!downloadedFile.exists()) {
+                throw new FileNotFoundException("File to download [" + destinationFileLocation + "] does not exist");
+            }
+
+            if (downloadedFile.length() == 0) {
+                throw new EmptyFileException("Downloaded file [" + destinationFileLocation + "] is empty");
+            }
+        } finally {
+            // Close the stream if there was an error thrown from downloadPackageBits
+            try {
+                bufferedOutput.close();
+            } catch (IOException e1) {
+                log.error("Error closing output stream to [" + destinationFileLocation + "] after exception", e1);
+            }
+        }
+    }
+
+}
\ No newline at end of file

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -2,6 +2,18 @@
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
+import org.rhq.plugins.jbossas5.deploy.Deployer;
+import org.rhq.plugins.jbossas5.deploy.LocalDeployer;
+import org.rhq.plugins.jbossas5.deploy.RemoteDeployer;
+
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
+import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedDeployment;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -36,6 +48,7 @@
 import org.rhq.core.pluginapi.inventory.ResourceContext;
 import org.rhq.core.pluginapi.operation.OperationContext;
 import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
 import org.rhq.plugins.jbossas5.util.FileContentDelegate;
 import org.rhq.plugins.jmx.JMXComponent;
 import org.rhq.plugins.jmx.MBeanResourceComponent;
@@ -44,130 +57,48 @@
  * Component for ESB package deployment.
  *
  * @author Tom Cunningham
- * @param <T>
  */
 public class ESB5DeploymentComponent extends AbstractDeploymentComponent {
-    protected void esbCreate(CreateResourceReport report, String resourceTypeName) {
-        ResourcePackageDetails details = report.getPackageDetails();
-        PackageDetailsKey key = details.getKey();
-        String archiveName = key.getName();
-
-        try {
-            // First check to see if the file name has the correct extension. Reject if the user attempts to
-            // deploy a WAR file with a bad extension.
-            String expectedExtension;
-            if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-                expectedExtension = "esb";
-            } else {
-            	expectedExtension = "";
-            }
-            
-            int lastPeriod = archiveName.lastIndexOf(".");
-            String extension = archiveName.substring(lastPeriod + 1);
-            if (lastPeriod == -1 || !expectedExtension.equals(extension)) {
-                report.setStatus(CreateResourceStatus.FAILURE);
-                report.setErrorMessage("Incorrect extension specified on filename [" + archiveName + "]. Expected ["
-                    + expectedExtension + "]");
-                return;
-            }
-
-            Configuration deployTimeConfiguration = details.getDeploymentTimeConfiguration();
-            String deployDirectory = deployTimeConfiguration.getSimple("deployDirectory").getStringValue();
-
-            // Verify the user did not enter a path that represents a security issue:
-            // - No absolute directories; must be relative to the configuration path
-            // - Cannot contain parent directory references
-            File testPath = new File(deployDirectory);
-
-            if (testPath.isAbsolute()) {
-                throw new RuntimeException("Path to deploy (deployDirectory) must be a relative path. Path specified: "
-                    + deployDirectory);
-            }
-
-            if (deployDirectory.contains("..")) {
-                throw new RuntimeException(
-                    "Path to deploy (deployDirectory) may not reference the parent directory. Path specified: "
-                        + deployDirectory);
-            }
-
-            // Perform the deployment
-            FileContentDelegate deployer = new FileContentDelegate(new File(getConfigurationPath(), deployDirectory),
-                    "", details.getPackageTypeName());
-
-            PropertySimple zipProperty = deployTimeConfiguration.getSimple("deployZipped");
-
-            if (zipProperty != null && zipProperty.getBooleanValue() != null) {
-                boolean zip = zipProperty.getBooleanValue();
-
-                File tempDir = resourceContext.getTemporaryDirectory();
-                File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
-                OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
-
-                ContentServices contentServices = contentContext.getContentServices();
-                contentServices
-                    .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);
-
-                osForTempDir.close();
-
-                // check for content 
-                boolean valid = isOfType(tempFile, resourceTypeName);
-                if (!valid) {
-                    report.setStatus(CreateResourceStatus.FAILURE);
-                    report.setErrorMessage("Expected a " + resourceTypeName
-                        + " file, but its format/content did not match");
-                    return;
-                }
-
-                InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
-                deployer.createContent(details, isForTempDir, !zip, false);
-
-                // Resource key should match the following:      
-                // EAR: jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=rhq.ear      
-                // WAR: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=embedded-console.war
-
-                String resourceKey;
-                if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-                    resourceKey = "jboss.esb:deployment="
-                        + archiveName;
-                } 
-
-                report.setResourceName(archiveName);
-                //report.setResourceKey(resourceKey);
-                report.setStatus(CreateResourceStatus.SUCCESS);
-                sleepAfterConfigXmlUpdate();
-            } else {
-                report.setStatus(CreateResourceStatus.FAILURE);
-                report.setErrorMessage("Zipped property is required");
-            }
-        } catch (Throwable t) {
-            log.error("Error deploying application for report: " + report, t);
-            report.setException(t);
-            report.setStatus(CreateResourceStatus.FAILURE);
-        }
-    }
-    
 	public void deleteResource() throws Exception {
-        Configuration pluginConfiguration = super.resourceContext.getPluginConfiguration();
+        Configuration pluginConfiguration = getResourceContext().getPluginConfiguration();
         String fullFileName = pluginConfiguration.getSimple("deployment").getStringValue();
         
-        ESB5Component jbossASComponent = (ESB5Component) super.resourceContext.getParentResourceComponent();
-        //File deploymentFile = jbossASComponent.getDeploymentFilePath(super.resourceContext.getResourceKey());
+        ESB5Component jbossASComponent = (ESB5Component) getResourceContext().getParentResourceComponent();
+        ProfileServiceConnection profileServiceConnection = jbossASComponent.getConnection();
+        DeploymentManager deployMgr = profileServiceConnection.getDeploymentManager();
 
-        final File deploy = new File(jbossASComponent.getConfigurationPath(), "deploy");
-        final File file = new File(deploy, fullFileName);
-
-        if (!file.exists()) {
-            throw new Exception("Cannot find application file to delete: " + fullFileName);
+        String repositoryName = null;
+        String [] arr = deployMgr.getRepositoryNames(new String[] {fullFileName});
+        for (int i = 0; i<arr.length; i++) {
+        	repositoryName = arr[i];
         }
-
-        if (file.isDirectory()) {
-            deleteDirectoryContents(file.listFiles());
+        
+        DeploymentProgress stop = deployMgr.stop(repositoryName);
+        stop.run();
+        if (stop != null) {
+        	DeploymentStatus stopStatus = stop.getDeploymentStatus();
+        	if (stopStatus.isFailed()) {
+        		log.error("Failed to stop deployment '" + repositoryName + "'.", stopStatus.getFailure());
+        		throw new Exception("Failed to stop deployment '" + repositoryName + "' - cause: "
+        				+ stopStatus.getFailure());
+        	}        
         }
-
-        boolean result = file.delete();
-
-        if (!result) {
-            throw new Exception("File delete call returned unsuccessful with no further detail");
+        DeploymentProgress remove = deployMgr.remove(repositoryName);        
+        remove.run();
+        if (remove != null) {
+	        DeploymentStatus status = remove.getDeploymentStatus();
+	        if (status.isFailed()) {
+        		log.error("Failed to remove deployment '" + repositoryName + "'.", status.getFailure());
+        		throw new Exception("Failed to remove deployment '" + repositoryName + "' - cause: "
+        				+ status.getFailure());
+	        }
+        } else {
+        	throw new RuntimeException("Did not find Deployment " + fullFileName);        	
         }
-	}
+
+        ManagementView mView = profileServiceConnection.getManagementView();
+        mView.load();
+        
+        jbossASComponent.disconnectFromProfileService();
+ 	}
 }

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -75,6 +75,7 @@
       createDeletePolicy="both">
 
       <plugin-configuration>
+         <c:simple-property name="deploymentTypeName" readOnly="true" default="JavaEEWebApplication"/>
          <c:simple-property name="objectName" readOnly="true" default="jboss.esb:deployment=%deployment%"/>
          <c:simple-property name="nameTemplate" default="{deployment} JBoss ESB Statistics"/>
          <c:simple-property name="descriptionTemplate" default="JBoss ESB statistics for the {deployment} deployment."/>

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/build.xml	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/build.xml	2009-12-08 08:15:27 UTC (rev 30522)
@@ -79,6 +79,19 @@
             <patternset refid="jonserver.patternset"/>
         </unzip>
 
+	<path id="as5.plugin.location">
+	    <fileset dir="${extract.as5.dir}" includes="**/jopr-jboss-as-5*.jar"/>
+	</path>
+	<property name="as5.plugin" refid="as5.plugin.location"/>
+	<unzip dest="${extract.as5.dir}">
+	    <patternset>
+		<include name="**/jopr-jboss-as-common*.jar"/>
+	    </patternset>
+	    <fileset dir="${extract.as5.dir}">
+		<include name="**/jopr-jboss-as-5*.jar"/>
+	    </fileset>
+	</unzip>
+
         <unzip dest="${extract.as5.dir}">
             <patternset>
                 <include name="**/org-mc4j-ems*.jar"/>
@@ -123,7 +136,8 @@
             <src path="${java.as5.dir}"/>
             <classpath>
                 <path refid="as5.classpath"/>
-                <fileset dir="${product.lib.dir}" includes="commons-logging*.jar ejb3-persistence*.jar jaxb-api-*.jar jbossall-client*.jar"/>
+		<fileset dir="${product.lib.dir}" includes="jboss-metatype-8.jar jboss-managed-*.jar jboss-profileservice-spi-*.jar"/>
+                <fileset dir="${product.lib.dir}" includes="commons-logging*.jar commons-lang-*.jar ejb3-persistence*.jar jaxb-api-*.jar jbossall-client*.jar"/>
             </classpath>
         </javac>
     </target>

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractDeploymentComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractDeploymentComponent.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractDeploymentComponent.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -57,19 +57,7 @@
     public File getConfigurationPath() {
         return this.configPath;
     }
-        
-    public CreateResourceReport createResource(CreateResourceReport report) {
-        String resourceTypeName = report.getResourceType().getName();
-
-        if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
-        	esbCreate(report, resourceTypeName);
-        } else {
-            throw new UnsupportedOperationException("Unknown Resource type: " + resourceTypeName);
-        }
-
-        return report;
-    }
-    
+            
     /**
      * Check to see if the passed file is actually in jar format and contains a 
      * <ul>
@@ -145,8 +133,6 @@
         }
     }
     
-    protected abstract void esbCreate(CreateResourceReport report, String resourceTypeName);
-	
 	public DeployPackagesResponse deployPackages(
 			Set<ResourcePackageDetails> packages,
 			ContentServices contentServices) {
@@ -225,4 +211,4 @@
 	public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
 		return null;
 	}
-}
+}
\ No newline at end of file

Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractESBComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractESBComponent.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/AbstractESBComponent.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -75,10 +75,10 @@
 	   return av;
    }
       
-   abstract void esbCreate(CreateResourceReport report, String resourceTypeName);
+   //abstract void esbCreate(CreateResourceReport report, String resourceTypeName);
 
-	
-	public CreateResourceReport createResource(CreateResourceReport report) {
+	/*
+   public CreateResourceReport createResource(CreateResourceReport report) {
         String resourceTypeName = report.getResourceType().getName();
 
         if (resourceTypeName.equals(RESOURCE_TYPE_ESB)) {
@@ -97,7 +97,8 @@
 
         return report;
     }
-
+   */
+   
 	public DeployPackagesResponse deployPackages(
 			Set<ResourcePackageDetails> packages,
 			ContentServices contentServices) {

Modified: labs/jbossesb/workspace/performance/perf2/qa/junit/src/org/jboss/soa/esb/server/MyRedeliveryAction.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/qa/junit/src/org/jboss/soa/esb/server/MyRedeliveryAction.java	2009-12-08 06:46:10 UTC (rev 30521)
+++ labs/jbossesb/workspace/performance/perf2/qa/junit/src/org/jboss/soa/esb/server/MyRedeliveryAction.java	2009-12-08 08:15:27 UTC (rev 30522)
@@ -30,6 +30,7 @@
 import org.jboss.soa.esb.actions.ActionPipelineProcessor;
 import org.jboss.soa.esb.actions.ActionProcessingException;
 import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
 import org.jboss.soa.esb.message.Message;
 
 /**
@@ -52,7 +53,14 @@
         System.out.println("Body: " + incomingMessage) ;
         System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
         
-        getRedeliveryMBean().logMessage(incomingMessage);
+        if (LifecycleResourceManager.DEFAULT_IDENTITY.equals(LifecycleResourceManager.getSingleton().getIdentity()))
+        {
+            getRedeliveryMBean().logMessage("Default lifecycle identity used by JCA");
+        }
+        else
+        {
+            getRedeliveryMBean().logMessage(incomingMessage);
+        }
         // Throw an error every second message
         if ((count++ & 1) == 0)
         {



More information about the jboss-svn-commits mailing list