[jboss-svn-commits] JBL Code SVN: r30843 - in labs/jbossesb/workspace/performance/perf2/product: contract-web/src/main/webapp and 47 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Dec 28 18:33:31 EST 2009
Author: beve
Date: 2009-12-28 18:33:29 -0500 (Mon, 28 Dec 2009)
New Revision: 30843
Added:
labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/genericError.jsp
labs/jbossesb/workspace/performance/perf2/product/install/registry-jboss-structure.xml
labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiRMITransport.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/AbstractHttpMethodFactory.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/malformed1.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh
Removed:
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/hsqldb.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/lib/ext/
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/war/lib/ext/jbossws-client.jar
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/war/lib/ext/jbossws-client.jar
Modified:
labs/jbossesb/workspace/performance/perf2/product/.classpath
labs/jbossesb/workspace/performance/perf2/product/build.xml
labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/WEB-INF/web.xml
labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/contract.jsp
labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/index.jsp
labs/jbossesb/workspace/performance/perf2/product/docs/ServicesGuide.odt
labs/jbossesb/workspace/performance/perf2/product/docs/ServicesGuide.pdf
labs/jbossesb/workspace/performance/perf2/product/ftp/build.xml
labs/jbossesb/workspace/performance/perf2/product/install/build.xml
labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb.juddi.client.xml
labs/jbossesb/workspace/performance/perf2/product/ivy.xml
labs/jbossesb/workspace/performance/perf2/product/ivysettings.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/internal/soa/esb/dependencies/H2Database.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiInVMTransport.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/GETHttpMethodFactory.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/HttpRouter.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/SourceFactory.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/XsltAction.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/registry/META-INF/uddi.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/README.html
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_aop/src/org/jboss/soa/esb/samples/quickstart/spring_aop/MySpringEnabledAction.java
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/readme.txt
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/udp_gateway/jboss-esb.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/build.xml
labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/build.xml
labs/jbossesb/workspace/performance/perf2/product/services/build.xml
labs/jbossesb/workspace/performance/perf2/product/services/jbpm/ant-task/build.xml
labs/jbossesb/workspace/performance/perf2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml
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/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java
labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
Log:
Merge from JBESB_4_7_CP branch.
Modified: labs/jbossesb/workspace/performance/perf2/product/.classpath
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/.classpath 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/.classpath 2009-12-28 23:33:29 UTC (rev 30843)
@@ -70,8 +70,8 @@
<classpathentry kind="lib" path="build/lib/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
<classpathentry kind="lib" path="build/lib/jboss-deployers-vfs-2.0.7.GA.jar"/>
<classpathentry kind="lib" path="build/lib/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
- <classpathentry kind="lib" path="build/lib/picketlink-fed-api-1.0.0.CR1.jar"/>
- <classpathentry kind="lib" path="build/lib/picketlink-fed-core-1.0.0.CR1.jar"/>
+ <classpathentry kind="lib" path="build/lib/picketlink-fed-api-1.0.0.jar"/>
+ <classpathentry kind="lib" path="build/lib/picketlink-fed-core-1.0.0.jar"/>
<classpathentry kind="lib" path="build/lib/jboss-kernel-2.0.6.GA.jar"/>
<classpathentry kind="lib" path="build/lib/jboss-managed-2.1.0.SP1.jar"/>
<classpathentry kind="lib" path="build/lib/jboss-mdr-2.0.1.GA.jar"/>
Modified: labs/jbossesb/workspace/performance/perf2/product/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -421,9 +421,13 @@
<!-- Clean targets -->
<target name="org.jboss.esb.clean">
<echo message="Cleaning modules"/>
+
<echo message="Cleaning rosetta"/>
<ant dir="rosetta" target="clean"/>
+
+ <echo message="Cleaning sub-modules"/>
+ <ant dir="ftp" target="clean"/>
<ant dir="contract-web" target="clean"/>
<ant dir="services" target="clean"/>
<ant dir="tools/jonplugin" target="clean"/>
Modified: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/WEB-INF/web.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/WEB-INF/web.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -3,5 +3,10 @@
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
- <display-name>Archetype Created Web Application</display-name>
+ <display-name>JBoss ESB - Service List and Contract Output</display-name>
+ <!-- Display a generic error page when HTTP Status 500 exceptions occur. -->
+ <error-page>
+ <error-code>500</error-code>
+ <location>/genericError.jsp</location>
+ </error-page>
</web-app>
Modified: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/contract.jsp
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/contract.jsp 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/contract.jsp 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,92 +1,97 @@
-<%@ page import="java.util.List" %>
-<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
-<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
-<%@ page import="org.jboss.soa.esb.services.registry.ServiceNotFoundException" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
-<%@ page import="java.net.URI" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ServletContractPublisher" %>
-<%@ page import="org.jboss.soa.esb.Service" %>
-<%
- Registry registry = RegistryFactory.getRegistry();
- String targetServiceCat = request.getParameter("serviceCat");
- String targetServiceName = request.getParameter("serviceName");
- String targetProtocol = request.getParameter("protocol");
- final Service service = new Service(targetServiceCat, targetServiceName) ;
-
- final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
- ContractInfo contractInfo = null;
- String contractData = "";
-
- List eprs;
- try {
- eprs = (List) registry.findEPRs(targetServiceCat, targetServiceName);
- } catch (ServiceNotFoundException e) {
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="org.jboss.soa.esb.services.registry.ServiceNotFoundException" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ServletContractPublisher" %>
+<%@ page import="org.jboss.soa.esb.Service" %>
+<%
+ Registry registry = RegistryFactory.getRegistry();
+ String targetServiceCat = request.getParameter("serviceCat");
+ String targetServiceName = request.getParameter("serviceName");
+ String targetProtocol = request.getParameter("protocol");
+ final Service service = new Service(targetServiceCat, targetServiceName) ;
+
+ final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
+ ContractInfo contractInfo = null;
+ String contractData = "";
+
+ List eprs;
+ if (targetProtocol == null || !targetProtocol.toLowerCase().startsWith("http")) {
// ignore for now - just return an empty list
eprs = new ArrayList();
- } catch (RegistryException e) {
- // ignore for now - just return an empty list
- eprs = new ArrayList();
- }
-
- EPR contractPublisherEPR = null ;
- for (int ii = 0; ii < eprs.size(); ii++) {
- EPR epr = (EPR) eprs.get(ii);
- URI eprURI = URI.create(epr.getAddr().getAddress());
- String protocol = eprURI.getScheme();
-
- if (protocol.equalsIgnoreCase(targetProtocol)) {
- contractPublisherEPR = epr ;
- break;
- }
- }
-
- for (ServicePublisher servicePublisher: servicePublishers) {
-
- if (contractPublisherEPR != null) {
- final ContractPublisher contractPublisher = servicePublisher.getContractPublisher() ;
- if (contractPublisher == null) {
- continue;
- }
-
- if(contractPublisher instanceof ServletContractPublisher) {
- contractInfo = ((ServletContractPublisher)contractPublisher).getContractInfo(contractPublisherEPR, request);
- } else {
- contractInfo = contractPublisher.getContractInfo(contractPublisherEPR);
- }
-
- if (contractInfo != null) {
+ } else {
+ try {
+ eprs = (List) registry.findEPRs(targetServiceCat, targetServiceName);
+ } catch (ServiceNotFoundException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ } catch (RegistryException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ }
+ }
+
+ EPR contractPublisherEPR = null ;
+ for (int ii = 0; ii < eprs.size(); ii++) {
+ EPR epr = (EPR) eprs.get(ii);
+ URI eprURI = URI.create(epr.getAddr().getAddress());
+ String protocol = eprURI.getScheme();
+
+ if (protocol.equalsIgnoreCase(targetProtocol)) {
+ contractPublisherEPR = epr ;
+ break;
+ }
+ }
+
+ for (ServicePublisher servicePublisher: servicePublishers) {
+
+ if (contractPublisherEPR != null) {
+ final ContractPublisher contractPublisher = servicePublisher.getContractPublisher() ;
+ if (contractPublisher == null) {
+ continue;
+ }
+
+ if(contractPublisher instanceof ServletContractPublisher) {
+ contractInfo = ((ServletContractPublisher)contractPublisher).getContractInfo(contractPublisherEPR, request);
+ } else {
+ contractInfo = contractPublisher.getContractInfo(contractPublisherEPR);
+ }
+
+ if (contractInfo != null) {
contractData = contractInfo.getData();
- if (contractData != null) {
+ if (contractData != null) {
response.setContentType(contractInfo.getMimeType());
- }
- }
+ }
+ }
if (contractData == null) {
- contractData = "<Unavailable/>";
- response.setContentType("text/xml");
- }
- break ;
- } else {
- final Publisher publisher = servicePublisher.getPublisher() ;
- if (publisher instanceof ContractReferencePublisher) {
- final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
- final URI serviceURI = contractReferencePublisher.getServiceURI() ;
- if (serviceURI.getScheme().equalsIgnoreCase(targetProtocol)) {
- response.sendRedirect(contractReferencePublisher.getServiceContractURI().toString()) ;
- return ;
- }
- }
- }
- }
- // JBESB-1547 - Contract console should generate HTTP 404 when asking for non-deployed service WSDL
+ // will trigger HttpServletResponse.SC_NOT_FOUND below
+ contractPublisherEPR = null;
+ }
+ break ;
+ } else {
+ final Publisher publisher = servicePublisher.getPublisher() ;
+ if (publisher instanceof ContractReferencePublisher) {
+ final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
+ final URI serviceURI = contractReferencePublisher.getServiceURI() ;
+ if (serviceURI.getScheme().equalsIgnoreCase(targetProtocol)) {
+ response.sendRedirect(contractReferencePublisher.getServiceContractURI().toString()) ;
+ return ;
+ }
+ }
+ }
+ }
+ // JBESB-1547 - Contract console should generate HTTP 404 when asking for non-deployed service WSDL
if (contractPublisherEPR == null) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
- return;
+ return;
}
%><%=contractData%>
Property changes on: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/contract.jsp
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/genericError.jsp (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/contract-web/src/main/webapp/genericError.jsp)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/genericError.jsp (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/genericError.jsp 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,38 @@
+<%-- A simple error page. --%>
+
+<%@ page import="org.apache.catalina.util.ServerInfo,
+ org.apache.catalina.valves.Constants,
+ org.apache.catalina.util.StringManager" %>
+<%@ page isErrorPage="true" %>
+
+<html>
+ <head>
+ <style>
+ <!--H1 {font-family:Tahoma, Arial, sans-serif; color:white;
+ background-color:#525D76; font-size:22px;}
+ H3 {font-family:Tahoma, Arial, sans-serif; color:white;
+ background-color:#525D76; font-size:14px;}
+ HR {color:#525D76;}
+ .errorText {font-family:Tahoma, Arial, sans-serif; font-size:16px; } -->
+ </style>
+ <title>
+ <%
+ StringManager sm = StringManager.getManager(Constants.Package);
+ out.println(ServerInfo.getServerInfo() + " - "
+ + sm.getString("errorReportValve.errorReport"));
+ %>
+ </title>
+ </head>
+ <body>
+ <h1>
+ <%
+ out.println(sm.getString("errorReportValve.statusHeader",
+ "" + pageContext.getErrorData().getStatusCode(), ""));
+ %>
+ </h1>
+ <hr size="1" noshade="noshade">
+ <span class="errorText">An error has occurred.</span>
+ <hr size="1" noshade="noshade">
+ <h3><%= ServerInfo.getServerInfo() %></h3>
+ </body>
+</html>
Modified: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/index.jsp
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/index.jsp 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/index.jsp 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,103 +1,103 @@
-<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
-<%@ page import="java.util.List" %>
-<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
-<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
-<%@ page import="java.net.URI" %>
-<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
-<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
-<%@ page import="org.jboss.soa.esb.Service" %>
-<html>
-<head>
- <title>JBoss ESB - Service List</title>
- <link rel='stylesheet' href='./styles.css'>
-</head>
-<body>
-
-<div class="pageSection">
-<h2>JBoss ESB Service Deployments</h2>
-</div>
-
-<div class="pageSection">
- <%
- List<Service> services = ServicePublisher.getServices();
- Registry registry = RegistryFactory.getRegistry();
-
- for (Service service: services) {
- String serviceCategory = service.getCategory();
- String serviceName = service.getName();
-
- final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
- if ((servicePublishers != null) && (servicePublishers.size() > 0)) {
- %>
- <fieldset>
- <legend><b><%=service%></b></legend>
- <%=servicePublishers.get(0).getDescription()%>
- <%
- for(ServicePublisher servicePublisher: servicePublishers) {
- final Publisher publisher = servicePublisher.getPublisher() ;
- if (!(publisher instanceof ContractReferencePublisher)) {
- List eprs;
-
- try {
- eprs = (List) registry.findEPRs(serviceCategory, serviceName);
- } catch (Exception e) {
- // ignore for now - just return an empty list
- eprs = new ArrayList();
- }
- for (int ii = 0; ii < eprs.size(); ii++) {
- EPR epr = (EPR) eprs.get(ii);
- URI eprURI = URI.create(epr.getAddr().getAddress());
- String protocol = eprURI.getScheme();
- String relContractURI = "contract.jsp?serviceCat=" + serviceCategory + "&serviceName=" + serviceName + "&protocol=" + protocol;
- %>
- <fieldset>
- <legend><b><%=protocol.toUpperCase()%></b></legend>
-
- <ul>
- <li><b>Endpoint</b>: <%=eprURI%></li>
- <%
- if(publisher != null) {
- URI thisPage = URI.create(request.getRequestURL().toString());
- URI contractURI = thisPage.resolve(relContractURI);
- %>
- <li><b>Contract</b>: <a href="<%=relContractURI%>"><%=contractURI%></a></li>
- <%
- } else {
- %>
- <li><b>Contract</b>: Unavailable</li>
- <%
- }
- %>
- </ul>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractPublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractReferencePublisher" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.Publisher" %>
+<%@ page import="org.jboss.soa.esb.Service" %>
+<html>
+<head>
+ <title>JBoss ESB - Service List</title>
+ <link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class="pageSection">
+<h2>JBoss ESB Service Deployments</h2>
+</div>
+
+<div class="pageSection">
+ <%
+ List<Service> services = ServicePublisher.getServices();
+ Registry registry = RegistryFactory.getRegistry();
+
+ for (Service service: services) {
+ String serviceCategory = service.getCategory();
+ String serviceName = service.getName();
+
+ final List<ServicePublisher> servicePublishers = ServicePublisher.getServicePublishers(service) ;
+ if ((servicePublishers != null) && (servicePublishers.size() > 0)) {
+ %>
+ <fieldset>
+ <legend><b><%=service%></b></legend>
+ <%=servicePublishers.get(0).getDescription()%>
+ <%
+ for(ServicePublisher servicePublisher: servicePublishers) {
+ final Publisher publisher = servicePublisher.getPublisher() ;
+ if (!(publisher instanceof ContractReferencePublisher)) {
+ List eprs;
+
+ try {
+ eprs = (List) registry.findEPRs(serviceCategory, serviceName);
+ } catch (Exception e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ }
+ for (int ii = 0; ii < eprs.size(); ii++) {
+ EPR epr = (EPR) eprs.get(ii);
+ URI eprURI = URI.create(epr.getAddr().getAddress());
+ String protocol = eprURI.getScheme();
+ String relContractURI = "contract.jsp?serviceCat=" + serviceCategory + "&serviceName=" + serviceName + "&protocol=" + protocol;
+ %>
+ <fieldset>
+ <legend><b><%=protocol.toUpperCase()%></b></legend>
+
+ <ul>
+ <li><b>Endpoint</b>: <%=eprURI%></li>
+ <%
+ if(publisher != null && protocol.toLowerCase().startsWith("http")) {
+ URI thisPage = URI.create(request.getRequestURL().toString());
+ URI contractURI = thisPage.resolve(relContractURI);
+ %>
+ <li><b>Contract</b>: <a href="<%=relContractURI%>"><%=contractURI%></a></li>
+ <%
+ } else {
+ %>
+ <li><b>Contract</b>: Unavailable</li>
+ <%
+ }
+ %>
+ </ul>
</fieldset>
- <%
- }
- } else {
- final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
- final URI serviceURI = contractReferencePublisher.getServiceURI() ;
- final URI serviceContractURI = contractReferencePublisher.getServiceContractURI() ;
+ <%
+ }
+ } else {
+ final ContractReferencePublisher contractReferencePublisher = (ContractReferencePublisher)publisher ;
+ final URI serviceURI = contractReferencePublisher.getServiceURI() ;
+ final URI serviceContractURI = contractReferencePublisher.getServiceContractURI() ;
%>
- <fieldset>
- <legend><b><%=serviceURI.getScheme().toUpperCase()%></b></legend>
-
- <ul>
- <li><b>Endpoint</b>: <%=serviceURI%></li>
- <li><b>Contract</b>: <a href="<%=serviceContractURI%>"><%=serviceContractURI%></a></li>
- </ul>
+ <fieldset>
+ <legend><b><%=serviceURI.getScheme().toUpperCase()%></b></legend>
+
+ <ul>
+ <li><b>Endpoint</b>: <%=serviceURI%></li>
+ <li><b>Contract</b>: <a href="<%=serviceContractURI%>"><%=serviceContractURI%></a></li>
+ </ul>
</fieldset>
- <%
- }
- }
- %>
- </fieldset>
- <%
- }
- }
- %>
-</div>
-</body>
-</html>
+ <%
+ }
+ }
+ %>
+ </fieldset>
+ <%
+ }
+ }
+ %>
+</div>
+</body>
+</html>
Property changes on: labs/jbossesb/workspace/performance/perf2/product/contract-web/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/workspace/performance/perf2/product/docs/ServicesGuide.odt
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/docs/ServicesGuide.pdf
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/ftp/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/ftp/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/ftp/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -24,8 +24,6 @@
</fileset>
</path>
- <property name="build.classpath" refid="classpath"/>
-
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
Modified: labs/jbossesb/workspace/performance/perf2/product/install/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/install/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/install/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -21,6 +21,8 @@
<property name="product.dir" location=".."/>
+ <property name="registry.config" value="META-INF/persistence.xml, META-INF/esb-juddi-orm.xml"/>
+
<!-- Are we embedded in a source hierarchy? -->
<condition property="hierarchy.source">
<available file="${product.dir}/build-distr.xml"/>
@@ -272,7 +274,7 @@
<include name="wstx-asl-*.jar"/>
<include name="xbean-*.jar"/>
<include name="xstream-*.jar"/>
-
+
<!-- JUDDI V3 dependencies -->
<include name="juddi-*.aop.jar"/>
<include name="juddi-client-*.jar"/>
@@ -315,7 +317,8 @@
<fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar">
<exclude name="lib/jbossesb-rosetta.jar"/>
<exclude name="lib/jbossesb-config-model-*.jar"/>
- <exclude name="lib/commons-lang-2.1.jar"/>
+ <exclude name="lib/commons-codec-*.jar"/>
+ <exclude name="lib/commons-lang-*.jar"/>
<exclude name="lib/commons-net-*.jar"/>
<exclude name="lib/commons-ssl-*.jar"/>
<exclude name="lib/commons-io-*.jar"/>
@@ -336,6 +339,7 @@
<exclude name="lib/wstx-asl-*.jar"/>
<exclude name="lib/xbean-*.jar"/>
<exclude name="lib/xstream-*.jar"/>
+ <exclude name="lib/xpp3*.jar"/>
<exclude name="META-INF/jboss-service.xml"/>
<exclude name="actionArtifactMap.properties"/>
<exclude name="jbossesb-properties.xml"/>
@@ -353,9 +357,13 @@
<copy tofile="${deploy.dir}/jbossesb.sar/META-INF/jboss-service.xml" file="${basedir}/jboss-service-jbossas5.xml" overwrite="true"/>
<copy todir="${deploy.dir}/jbossesb-registry.sar" includeemptydirs="false" overwrite="true">
- <fileset dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar"/>
+ <fileset dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar" excludes="${registry.config}"/>
</copy>
+ <copy todir="${deploy.dir}/jbossesb-registry.sar/juddi_config" includeemptydirs="false" overwrite="true">
+ <fileset dir="${org.jboss.esb.dist.lib}/jbossesb-registry.sar" includes="${registry.config}"/>
+ </copy>
<copy tofile="${deploy.dir}/jbossesb-registry.sar/META-INF/jboss-service.xml" file="${basedir}/registry-jboss-service-jbossas5.xml" overwrite="true"/>
+ <copy tofile="${deploy.dir}/jbossesb-registry.sar/META-INF/jboss-structure.xml" file="${basedir}/registry-jboss-structure.xml" overwrite="true"/>
<!-- jbossesb.esb -->
<copy todir="${deploy.dir}/jbossesb.esb">
Modified: labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb.juddi.client.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb.juddi.client.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/install/jUDDI-registryV3/esb.juddi.client.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -28,7 +28,7 @@
<subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
<!-- RMI Transport Settings
- <proxyTransport>org.apache.juddi.v3.client.transport.RMITransport</proxyTransport>
+ <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiRMITransport</proxyTransport>
<custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
<inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
<publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
Copied: labs/jbossesb/workspace/performance/perf2/product/install/registry-jboss-structure.xml (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-structure.xml)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/install/registry-jboss-structure.xml (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/install/registry-jboss-structure.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,16 @@
+<structure>
+ <context>
+ <path name=""/>
+ <metaDataPath>
+ <path name="META-INF"/>
+ </metaDataPath>
+ <classpath>
+ <path name=""/>
+ <path name="" suffixes=".jar"/>
+ <path name="juddi_config"/>
+ </classpath>
+ </context>
+ <context>
+ <path name="juddi-ds.xml"/>
+ </context>
+</structure>
Modified: labs/jbossesb/workspace/performance/perf2/product/ivy.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/ivy.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/ivy.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -154,13 +154,13 @@
<dependency org="jboss" name="jbosssx" rev="4.2.3.GA"/>
<!-- JBoss Identity Federation -->
- <dependency org="org.picketlink" name="picketlink-fed-api" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-fed-core" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-fed-model" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-xmlsec-model" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-bindings" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-bindings-jboss" rev="1.0.0.CR1"/>
- <dependency org="org.picketlink" name="picketlink-web" rev="1.0.0.CR1"/>
+ <dependency org="org.picketlink" name="picketlink-fed-api" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-fed-core" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-fed-model" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-xmlsec-model" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-bindings" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-bindings-jboss" rev="1.0.0"/>
+ <dependency org="org.picketlink" name="picketlink-web" rev="1.0.0"/>
<dependency org="org.apache" name="xmlsec" rev="1.4.3"/>
<!-- JOPR dependencies -->
Modified: labs/jbossesb/workspace/performance/perf2/product/ivysettings.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/ivysettings.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/ivysettings.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,6 +1,6 @@
<ivysettings>
- <property name="smooks.version" value="1.2.3"/>
+ <property name="smooks.version" value="1.2.4"/>
<settings defaultResolver="chained"/>
<resolvers>
Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIInstallAspect.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,51 @@
+/*
+ * 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.net.URL;
+
+import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
+
+/**
+ * Aspect used to override URL getResource handling within Install
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JUDDIInstallAspect
+{
+ public Object getPath(final MethodCalledByMethodInvocation invocation)
+ throws Throwable
+ {
+ final URL url = (URL) invocation.getTargetObject() ;
+ final String protocol = url.getProtocol() ;
+ final String path ;
+ if ("vfsfile".equals(protocol))
+ {
+ path = url.toURI().getPath() ;
+ }
+ else
+ {
+ path = url.getPath() ;
+ }
+ return path ;
+ }
+}
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-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/JUDDIScoutAspect.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -22,7 +22,7 @@
package org.jboss.internal.soa.esb.services.registry.aspect;
import org.apache.ws.scout.model.uddi.v2.BindingTemplates;
-import org.jboss.aop.joinpoint.ConstructorCalledByMethodInvocation;
+import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
import org.jboss.aop.joinpoint.MethodInvocation;
import javax.xml.registry.JAXRException;
@@ -117,7 +117,7 @@
return address;
}
- public Object getBindingTemplates(final ConstructorCalledByMethodInvocation invocation)
+ public Object getBindingTemplates(final MethodCalledByMethodInvocation invocation)
throws Throwable
{
final Object result = invocation.invokeNext() ;
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-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/aop/resources/META-INF/jboss-aop.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -5,6 +5,7 @@
<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.JUDDIInstallAspect" 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"/>
@@ -29,6 +30,10 @@
<advice name="getConfiguration" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIClientConfigAspect"/>
</bind>
+ <bind pointcut="withincode(* org.apache.juddi.config.Install->getPublishers(org.apache.commons.configuration.Configuration)) AND call(* java.net.URL->getPath())">
+ <advice name="getPath" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIInstallAspect"/>
+ </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>
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -275,6 +275,7 @@
<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"/>
+ <include name="org/apache/juddi/config/Install.class"/>
<aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
<aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
</aopc>
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -395,7 +395,7 @@
dbPath = new File(h2Dir, name);
- final String dbURL = JDBC_URL_PREFIX + dbPath.toURI().toString() + flags ;
+ final String dbURL = JDBC_URL_PREFIX + dbPath.toURL().toString() + flags ;
log.info(dbURL);
// Check we have connectivity
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiInVMTransport.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiInVMTransport.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiInVMTransport.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -61,7 +61,7 @@
}
@Override
- public synchronized JUDDIApiPortType getJUDDIApiService(final String endpointURL)
+ public JUDDIApiPortType getJUDDIApiService(final String endpointURL)
throws TransportException
{
return getImplementation().getJUDDIApiService(endpointURL) ;
Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiRMITransport.java (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiRMITransport.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiRMITransport.java (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/internal/soa/esb/registry/client/JuddiRMITransport.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,325 @@
+/*
+ * 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.registry.client;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
+import org.apache.juddi.v3.client.config.UDDINode;
+import org.apache.juddi.v3.client.transport.Transport;
+import org.apache.juddi.v3.client.transport.TransportException;
+import org.apache.juddi.v3_service.JUDDIApiPortType;
+import org.apache.log4j.Logger;
+import org.uddi.v3_service.UDDICustodyTransferPortType;
+import org.uddi.v3_service.UDDIInquiryPortType;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionListenerPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
+
+public class JuddiRMITransport extends Transport
+{
+ /**
+ * The logger for this transport.
+ */
+ private static final Logger logger = Logger.getLogger(JuddiRMITransport.class) ;
+ /**
+ * The node name to use for this transport.
+ */
+ private final String nodeName ;
+ /**
+ * The JNDI environment properties used for the initial context.
+ */
+ private final Properties jndiEnv ;
+
+ /**
+ * The api service instance.
+ */
+ private final AtomicReference<JUDDIApiPortType> apiService = new AtomicReference<JUDDIApiPortType>() ;
+ /**
+ * The custody transfer service instance.
+ */
+ private final AtomicReference<UDDICustodyTransferPortType> custodyTransferService = new AtomicReference<UDDICustodyTransferPortType>() ;
+ /**
+ * The inquiry service instance.
+ */
+ private final AtomicReference<UDDIInquiryPortType> inquiryService = new AtomicReference<UDDIInquiryPortType>() ;
+ /**
+ * The publish service instance.
+ */
+ private final AtomicReference<UDDIPublicationPortType> publishService = new AtomicReference<UDDIPublicationPortType>() ;
+ /**
+ * The security service instance.
+ */
+ private final AtomicReference<UDDISecurityPortType> securityService = new AtomicReference<UDDISecurityPortType>() ;
+ /**
+ * The subscription listener service.
+ */
+ private final AtomicReference<UDDISubscriptionListenerPortType> subscriptionListenerService = new AtomicReference<UDDISubscriptionListenerPortType>() ;
+ /**
+ * The subscription service.
+ */
+ private final AtomicReference<UDDISubscriptionPortType> subscriptionService = new AtomicReference<UDDISubscriptionPortType>() ;
+
+ /**
+ * Default constructor.
+ */
+ public JuddiRMITransport()
+ throws ConfigurationException
+ {
+ this(Transport.DEFAULT_NODE_NAME) ;
+ }
+
+ /**
+ * Construct a transport for the specified node.
+ * @param nodeName The node name.
+ */
+ public JuddiRMITransport(final String nodeName)
+ throws ConfigurationException
+ {
+ this.nodeName = nodeName ;
+ jndiEnv = createEnvironment(nodeName) ;
+ }
+
+ @Override
+ public JUDDIApiPortType getJUDDIApiService(final String endpointURL)
+ throws TransportException
+ {
+ final JUDDIApiPortType currentApiService = apiService.get() ;
+ if (currentApiService != null)
+ {
+ return currentApiService ;
+ }
+ final String apiURL = getUDDINode(nodeName).getJuddiApiUrl() ;
+ final JUDDIApiPortType newApiService = lookupService(jndiEnv, apiURL) ;
+ if (apiService.compareAndSet(null, newApiService))
+ {
+ return newApiService ;
+ }
+ else
+ {
+ return apiService.get() ;
+ }
+ }
+
+ @Override
+ public UDDICustodyTransferPortType getUDDICustodyTransferService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDICustodyTransferPortType currentCustodyTransferService = custodyTransferService.get() ;
+ if (currentCustodyTransferService != null)
+ {
+ return currentCustodyTransferService ;
+ }
+ final String custodyTransferURL = getUDDINode(nodeName).getCustodyTransferUrl() ;
+ final UDDICustodyTransferPortType newCustodyTransferService = lookupService(jndiEnv, custodyTransferURL) ;
+ if (custodyTransferService.compareAndSet(null, newCustodyTransferService))
+ {
+ return newCustodyTransferService ;
+ }
+ else
+ {
+ return custodyTransferService.get() ;
+ }
+ }
+
+ @Override
+ public UDDIInquiryPortType getUDDIInquiryService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDIInquiryPortType currentInquiryService = inquiryService.get() ;
+ if (currentInquiryService != null)
+ {
+ return currentInquiryService ;
+ }
+ final String inquiryURL = getUDDINode(nodeName).getInquiryUrl() ;
+ final UDDIInquiryPortType newInquiryService = lookupService(jndiEnv, inquiryURL) ;
+ if (inquiryService.compareAndSet(null, newInquiryService))
+ {
+ return newInquiryService ;
+ }
+ else
+ {
+ return inquiryService.get() ;
+ }
+ }
+
+ @Override
+ public UDDIPublicationPortType getUDDIPublishService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDIPublicationPortType currentPublishService = publishService.get() ;
+ if (currentPublishService != null)
+ {
+ return currentPublishService ;
+ }
+ final String publishURL = getUDDINode(nodeName).getPublishUrl() ;
+ final UDDIPublicationPortType newPublishService = lookupService(jndiEnv, publishURL) ;
+ if (publishService.compareAndSet(null, newPublishService))
+ {
+ return newPublishService ;
+ }
+ else
+ {
+ return publishService.get() ;
+ }
+ }
+
+ @Override
+ public UDDISecurityPortType getUDDISecurityService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDISecurityPortType currentSecurityService = securityService.get() ;
+ if (currentSecurityService != null)
+ {
+ return currentSecurityService ;
+ }
+ final String securityURL = getUDDINode(nodeName).getSecurityUrl() ;
+ final UDDISecurityPortType newSecurityService = lookupService(jndiEnv, securityURL) ;
+ if (securityService.compareAndSet(null, newSecurityService))
+ {
+ return newSecurityService ;
+ }
+ else
+ {
+ return securityService.get() ;
+ }
+ }
+
+ @Override
+ public UDDISubscriptionListenerPortType getUDDISubscriptionListenerService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDISubscriptionListenerPortType currentSubscriptionListenerService = subscriptionListenerService.get() ;
+ if (currentSubscriptionListenerService != null)
+ {
+ return currentSubscriptionListenerService ;
+ }
+ final String subscriptionListenerURL = getUDDINode(nodeName).getSubscriptionListenerUrl() ;
+ final UDDISubscriptionListenerPortType newSubscriptionListenerService = lookupService(jndiEnv, subscriptionListenerURL) ;
+ if (subscriptionListenerService.compareAndSet(null, newSubscriptionListenerService))
+ {
+ return newSubscriptionListenerService ;
+ }
+ else
+ {
+ return subscriptionListenerService.get() ;
+ }
+ }
+
+ @Override
+ public UDDISubscriptionPortType getUDDISubscriptionService(final String endpointURL)
+ throws TransportException
+ {
+ final UDDISubscriptionPortType currentSubscriptionService = subscriptionService.get() ;
+ if (currentSubscriptionService != null)
+ {
+ return currentSubscriptionService ;
+ }
+ final String subscriptionURL = getUDDINode(nodeName).getSubscriptionUrl() ;
+ final UDDISubscriptionPortType newSubscriptionService = lookupService(jndiEnv, subscriptionURL) ;
+ if (subscriptionService.compareAndSet(null, newSubscriptionService))
+ {
+ return newSubscriptionService ;
+ }
+ else
+ {
+ return subscriptionService.get() ;
+ }
+ }
+
+ private static Properties createEnvironment(final String nodeName)
+ throws ConfigurationException
+ {
+ final Properties jndiEnv = new Properties() ;
+ final UDDINode uddiNode = UDDIClerkManager.getClientConfig().getUDDINode(nodeName) ;
+ final String initialContextFactory = uddiNode.getFactoryInitial() ;
+ final String providerURL = uddiNode.getFactoryNamingProvider() ;
+ final String urlPkgPrefixes = uddiNode.getFactoryURLPkgs() ;
+
+ if (initialContextFactory != null)
+ {
+ jndiEnv.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory) ;
+ }
+ if (providerURL != null)
+ {
+ jndiEnv.setProperty(Context.PROVIDER_URL, providerURL) ;
+ }
+ if (urlPkgPrefixes != null)
+ {
+ jndiEnv.setProperty(Context.URL_PKG_PREFIXES, urlPkgPrefixes) ;
+ }
+ return jndiEnv ;
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> T lookupService(final Properties env, final String url)
+ throws TransportException
+ {
+ final URI uri ;
+ try
+ {
+ uri = new URI(url) ;
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new TransportException("Failed to parse service URL", urise) ;
+ }
+ final String serviceLocation = uri.getPath() ;
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Looking up service=" + serviceLocation) ;
+ }
+ final Object service ;
+ try
+ {
+ final InitialContext context = new InitialContext(env) ;
+ service = context.lookup(serviceLocation) ;
+ }
+ catch (final NamingException ne)
+ {
+ throw new TransportException("Failure during JNDI lookup of service: " + serviceLocation, ne) ;
+ }
+ return (T)service ;
+ }
+
+ private static UDDINode getUDDINode(final String nodeName)
+ throws TransportException
+ {
+ try
+ {
+ return UDDIClerkManager.getClientConfig().getUDDINode(nodeName) ;
+ }
+ catch (final ConfigurationException ce)
+ {
+ throw new TransportException("Failed to retrieve UDDI node: " + nodeName, ce) ;
+ }
+ }
+}
Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/AbstractHttpMethodFactory.java (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/AbstractHttpMethodFactory.java)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/AbstractHttpMethodFactory.java (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/AbstractHttpMethodFactory.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2009
+ */
+package org.jboss.soa.esb.actions.routing.http;
+
+import java.net.URL;
+
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * AbstractHttpMethodFactory.
+ *
+ * @author dward at jboss.org
+ */
+public abstract class AbstractHttpMethodFactory implements HttpMethodFactory
+{
+
+ private URL endpoint;
+
+ public void setEndpoint(URL endpoint)
+ {
+ this.endpoint = endpoint;
+ }
+
+ protected String getEndpointPathAndQuery()
+ {
+ StringBuilder sb = new StringBuilder();
+ String path = endpoint.getPath();
+ sb.append("".equals(path) ? "/" : path);
+ String query = endpoint.getQuery();
+ if (query != null)
+ {
+ sb.append("?");
+ sb.append(query);
+ }
+ return sb.toString();
+ }
+
+ public void setConfiguration(ConfigTree config) throws ConfigurationException {}
+
+}
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/GETHttpMethodFactory.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/GETHttpMethodFactory.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/GETHttpMethodFactory.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -19,32 +19,20 @@
*/
package org.jboss.soa.esb.actions.routing.http;
+import java.io.IOException;
+
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.methods.GetMethod;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import java.io.IOException;
-import java.net.URL;
-
/**
* HTTP GET Factory.
*
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
-public class GETHttpMethodFactory implements HttpMethodFactory {
+public class GETHttpMethodFactory extends AbstractHttpMethodFactory {
- private URL url;
-
- public void setEndpoint(URL url) {
- this.url = url;
- }
-
- public void setConfiguration(ConfigTree config) throws ConfigurationException {
- }
-
public HttpMethodBase getInstance(Message message) throws IOException {
- return new GetMethod(url.toString());
+ return new GetMethod( getEndpointPathAndQuery() );
}
-}
+}
\ No newline at end of file
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/HttpRouter.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/HttpRouter.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/HttpRouter.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -30,6 +30,7 @@
import java.util.Set;
import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.HttpStatus;
@@ -67,6 +68,7 @@
private ConfigTree config;
private java.util.Properties httpClientProps = new java.util.Properties();
private HttpClient httpclient;
+ private HostConfiguration hostconfig;
private URL endpointUrl;
private String method;
private HttpMethodFactory methodFactory;
@@ -84,7 +86,6 @@
coreProperties.add("method");
coreProperties.add("responseType");
coreProperties.add("Content-Type");
- coreProperties.add("method");
}
public HttpRouter(ConfigTree config) throws ConfigurationException {
@@ -100,6 +101,12 @@
// to the HttpClientFacatory...
extractHttpClientProps(config);
httpclient = HttpClientFactory.createHttpClient(httpClientProps);
+
+ // JBESB-3021: we need to hold onto the configured HostConfiguration then replace it with a dummy instance because
+ // executeMethod overrides the Protocol on us with one from a static (yuck!) map if the instances are the same!
+ hostconfig = httpclient.getHostConfiguration();
+ httpclient.setHostConfiguration(new HostConfiguration());
+
method = config.getRequiredAttribute("method");
responseType = ResponseType.valueOf(config.getAttribute("responseType", ResponseType.STRING.toString()));
@@ -121,7 +128,8 @@
try {
setRequestHeaders(method, message);
- int responseCode = httpclient.executeMethod(method);
+ // JBESB-3021: use the hostconfig with the appropriate Protocol
+ int responseCode = httpclient.executeMethod(hostconfig, method);
if(responseCode != HttpStatus.SC_OK) {
logger.warn("Received status code '" + responseCode + "' on HTTP " + method + " request to '" + endpointUrl + "'.");
}
@@ -294,7 +302,8 @@
super.destroy();
}
- private void extractHttpClientProps(ConfigTree config) {
+ @SuppressWarnings("deprecation")
+ private void extractHttpClientProps(ConfigTree config) {
ConfigTree[] httpClientConfigTrees = config.getChildren("http-client-property");
httpClientProps.setProperty(HttpClientFactory.TARGET_HOST_URL, endpointUrl.toString());
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -19,20 +19,19 @@
*/
package org.jboss.soa.esb.actions.routing.http;
+import java.io.IOException;
+
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
-import java.io.IOException;
-import java.net.URL;
-
/**
* HTTP POST Factory. Handles messages whose payload is a byte[] by
* converting the byte[] to a String; all other payloads are
@@ -42,20 +41,16 @@
*
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
-public class POSTHttpMethodFactory implements HttpMethodFactory {
+public class POSTHttpMethodFactory extends AbstractHttpMethodFactory {
public static final String CONTENT_TYPE = "org.jboss.soa.esb.actions.routing.http.contentType";
public static final String CHARSET = "org.jboss.soa.esb.actions.routing.http.charset";
- private URL url;
private MessagePayloadProxy payloadProxy;
private String _contentType = null;
private String _charset = null;
-
- public void setEndpoint(URL url) {
- this.url = url;
- }
+ @Override
public void setConfiguration(ConfigTree config) throws ConfigurationException {
payloadProxy = new MessagePayloadProxy(config);
@@ -69,7 +64,7 @@
* Content-type and charset can be overridden at configuration time.
*/
public HttpMethodBase getInstance(Message message) throws IOException {
- PostMethod method = new PostMethod(url.toString());
+ PostMethod method = new PostMethod( getEndpointPathAndQuery() );
final RequestEntity entity;
try
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -131,8 +131,9 @@
* scriptPath - The path to the script that will be run
* script - the name of the script that will be run (include .groovy exception)
*/
- public Message process(Message message) throws ActionProcessingException {
+ public synchronized Message process(Message message) throws ActionProcessingException {
try {
+ Script execScript = getScript(message);
// create a Java/Groovy binding for the message object
//
Binding binding = new Binding();
@@ -144,13 +145,10 @@
binding.setVariable("payloadProxy", payloadProxy);
binding.setVariable("logger", logger);
- Script execScript = getScript(message);
- Object returnVal;
- synchronized (execScript) {
- execScript.setBinding(binding);
- returnVal = execScript.run();
- }
+ execScript.setBinding(binding);
+ Object returnVal = execScript.run();
+
if(returnVal instanceof Message) {
return (Message) returnVal;
} else {
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/SourceFactory.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/SourceFactory.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/SourceFactory.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -29,9 +29,17 @@
import java.io.Reader;
import java.io.StringReader;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.Source;
+import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
/**
* Code contributed from the Smooks project.
*/
@@ -39,41 +47,117 @@
{
private static final SourceFactory factory = new SourceFactory();
- private SourceFactory()
- {
- }
+ private SourceFactory() {}
public static SourceFactory getInstance()
{
return factory;
}
+
+ public Source createSource(final Object from)
+ {
+ try
+ {
+ return createSource(from, null, null);
+ }
+ catch (SAXException e)
+ {
+ throw new RuntimeException("Should not occur when not validating XML InputSource!", e);
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new RuntimeException("Should not occur when not validating XML InputSource!", e);
+ }
+ }
- public Source createSource(final Object from)
+ public Source createSource(final Object from, final SAXParserFactory validationFactory, final ErrorHandler validationHandler)
+ throws SAXException, ParserConfigurationException
{
final Source source;
+ final XMLReader validationReader;
+ if (validationFactory != null)
+ {
+ validationReader = validationFactory.newSAXParser().getXMLReader();
+ if (validationHandler != null)
+ {
+ validationReader.setErrorHandler(validationHandler);
+ }
+ }
+ else
+ {
+ validationReader = null;
+ }
if (from instanceof String)
{
- source = new StreamSource(new StringReader((String) from));
+ Reader reader = new StringReader((String)from);
+ if (validationReader != null)
+ {
+ source = new SAXSource(validationReader, new InputSource(reader));
+ }
+ else
+ {
+ source = new StreamSource(reader);
+ }
}
else if (from instanceof byte[])
{
- source = new StreamSource(new ByteArrayInputStream((byte[]) from));
+ InputStream inputStream = new ByteArrayInputStream((byte[])from);
+ if (validationReader != null)
+ {
+ source = new SAXSource(validationReader, new InputSource(inputStream));
+ }
+ else
+ {
+ source = new StreamSource(inputStream);
+ }
}
else if (from instanceof Reader)
{
- source = new StreamSource((Reader) from);
+ Reader reader = (Reader)from;
+ if (validationReader != null)
+ {
+ source = new SAXSource(validationReader, new InputSource(reader));
+ }
+ else
+ {
+ source = new StreamSource(reader);
+ }
}
else if (from instanceof InputStream)
{
- source = new StreamSource((InputStream) from);
+ InputStream inputStream = (InputStream)from;
+ if (validationReader != null)
+ {
+ source = new SAXSource(validationReader, new InputSource(inputStream));
+ }
+ else
+ {
+ source = new StreamSource(inputStream);
+ }
}
else if (from instanceof File)
{
- source = fileSource((File) from);
+ InputStream inputStream;
+ try
+ {
+ inputStream = new BufferedInputStream(new FileInputStream((File)from));
+ }
+ catch (FileNotFoundException e)
+ {
+ throw new IllegalStateException(e.getMessage(), e);
+ }
+ if (validationReader != null)
+ {
+ source = new SAXSource(validationReader, new InputSource(inputStream));
+ }
+ else
+ {
+ source = new StreamSource(inputStream);
+ }
}
else if (from instanceof Source)
{
- source = (Source) from;
+ source = (Source)from;
}
else
{
@@ -81,17 +165,4 @@
}
return source;
}
-
- private Source fileSource(final File file)
- {
- try
- {
- return new StreamSource(new BufferedInputStream(new FileInputStream(file)));
- }
- catch (FileNotFoundException e)
- {
- throw new IllegalStateException(e.getMessage(), e);
- }
-
- }
}
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/XsltAction.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/XsltAction.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/actions/transformation/xslt/XsltAction.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -25,6 +25,8 @@
import java.util.Map;
import java.util.Map.Entry;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@@ -36,6 +38,7 @@
import javax.xml.transform.URIResolver;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
import org.apache.log4j.Logger;
@@ -52,9 +55,12 @@
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.util.ClassUtil;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
/**
- * ESB Action that performs xslt tranformation.
+ * ESB Action that performs xslt transformation.
* <p/>
* Example configuration:
* <pre>{@code
@@ -66,7 +72,7 @@
* }<pre>
*
* <h3>Configuration Properties</h3>
- * <lu>
+ * <ul>
* <li><i>templateFile</i>:
* The path to the xsl template to be used. Mandatory</li>
*
@@ -90,22 +96,23 @@
*
* <li><i>uriResolver</i>:
* Fully qualified class name of a class that implements {@link URIResolver}.
- * This will be set on the tranformation factory. Optional</li>
+ * This will be set on the transformation factory. Optional</li>
*
* <li><i>factory.feature.*</i>:
- * Factory features that will be set for the tranformation factory. Optional.
+ * Factory features that will be set for the transformation factory. Optional.
* The feature name, which are fully qualified URIs will should be specified
* after the 'factory.feature.' prefix. For example:
* factory.feature.http://javax.xml.XMLConstants/feature/secure-processing</li>
*
* <li><i>factory.attribute.*</i>:
- * Factory attributes that will be set for the tranformation factory. Optional.
+ * Factory attributes that will be set for the transformation factory. Optional.
* The attribute name should be specified after the 'factory.attribute.' prefix.
* For example:
* factory.attribute.someVendorAttributename</li>
- * </lu>
+ * </ul>
*
* @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ * @author dward at jboss.org
* @since 4.6
*/
public class XsltAction extends AbstractActionPipelineProcessor
@@ -116,7 +123,7 @@
private static Logger log = Logger.getLogger(XsltAction.class);
/**
- * Config object that holds tranformation factory config options.
+ * Config object that holds transformation factory config options.
*/
private TransformerFactoryConfig transformerConfig;
@@ -127,6 +134,11 @@
private boolean failOnWarning;
/**
+ * Used for validation on the XML InputSource during transformation.
+ */
+ private SAXParserFactory validationFactory;
+
+ /**
* The templates object.
*/
private Templates xslTemplate;
@@ -142,7 +154,7 @@
*
* @param config The {@link ConfigTree} instance.
*
- * @throws ConfigurationException if the mandatory attribute 'xslt' has not been set.
+ * @throws ConfigurationException if the mandatory attribute 'templateFile' has not been set.
*/
public XsltAction(final ConfigTree config) throws ConfigurationException
{
@@ -152,7 +164,7 @@
}
/**
- * Performs the xsl tranformation of the message payload.
+ * Performs the xsl transformation of the message payload.
*
* @param message The ESB {@link Message} object whose payload should be transformed.
* The payload is extracted and set using contract specified by {@link MessagePayloadProxy}.
@@ -167,24 +179,33 @@
{
final Transformer transformer = xslTemplate.newTransformer();
final Object payload = getPayload(message);
+ final ValidationHandler validationHandler;
final Source source;
final Result result;
- // If the payload is of SourceResult that use its source and result.
+ // If the payload is a SourceResult than use its source and result.
if (payload instanceof SourceResult)
{
- final SourceResult sourceResult = (SourceResult) payload;
+ validationHandler = null;
+ final SourceResult sourceResult = (SourceResult)payload;
source = sourceResult.getSource();
result = sourceResult.getResult();
}
else
{
- source = SourceFactory.getInstance().createSource(payload);
+ validationHandler = new ValidationHandler(failOnWarning);
+ source = SourceFactory.getInstance().createSource(payload, validationFactory, validationHandler);
result = ResultFactory.getInstance().createResult(transformerConfig.getResultType());
}
// Perform the transformation.
transformer.transform(source, result);
+ // Check for validation errors.
+ if (validationHandler != null)
+ {
+ validationHandler.check();
+ }
+
// Get the result and set on the message object
final Object object = ResultFactory.getInstance().extractResult(result, transformerConfig.getResultType());
@@ -194,6 +215,14 @@
{
throw new ActionProcessingException(e.getMessage(), e);
}
+ catch (SAXException e)
+ {
+ throw new ActionProcessingException(e.getMessage(), e);
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new ActionProcessingException(e.getMessage(), e);
+ }
catch (TransformerException e)
{
throw new ActionProcessingException(e.getMessage(), e);
@@ -215,8 +244,8 @@
addFeatures(transformerConfig.getFeatures(), factory);
addAttributes(transformerConfig.getAttributes(), factory);
setResolver(transformerConfig.getUriResolver(), factory);
- setErrorListener(new XslErrorListener(failOnWarning), factory);
-
+ setErrorListener(new TransformerListener(failOnWarning), factory);
+ createValidationFactory(factory);
xslTemplate = createTemplate(transformerConfig.getTemplateFile(), factory);
}
catch (final TransformerConfigurationException e)
@@ -249,10 +278,25 @@
}
}
- private void setErrorListener(final XslErrorListener xslErrorListener, final TransformerFactory factory)
+ private void setErrorListener(final ErrorListener errorListener, final TransformerFactory factory)
{
- factory.setErrorListener(xslErrorListener);
+ factory.setErrorListener(errorListener);
}
+
+ private void createValidationFactory(final TransformerFactory factory) throws ActionLifecycleException
+ {
+ if (factory.getFeature(SAXSource.FEATURE))
+ {
+ validationFactory = SAXParserFactory.newInstance();
+ validationFactory.setNamespaceAware(true);
+ // The code above enforces well-formed XML input, as described in JBESB-3036.
+ // TODO: Code below will be added to also do validation of XML input, as described in JBESB-3068.
+ }
+ else
+ {
+ log.warn("TransformerFactory does not support " + SAXSource.FEATURE);
+ }
+ }
private Templates createTemplate(final String templateFile, final TransformerFactory factory) throws ActionLifecycleException, TransformerConfigurationException
{
@@ -297,7 +341,7 @@
*
* @param config The ESB {@link ConfigTree}.
* @param builder The {@link TransformerFactoryConfig.Builder}.
- * @return Builder To support method chainging.
+ * @return Builder To support method chaining.
*/
void extractAttributes(final ConfigTree config, final Builder builder)
{
@@ -402,36 +446,79 @@
return String.format("%s templateFile=%s, failOnWarning=%b, features=%s, attributes=%s", getClass().getSimpleName(), transformerConfig.getTemplateFile(), failOnWarning, transformerConfig.getFeatures(), transformerConfig.getAttributes());
}
- private static class XslErrorListener implements ErrorListener
+ private static class TransformerListener implements ErrorListener
{
private final boolean failOnWarning;
- public XslErrorListener(boolean failOnWarning)
+ public TransformerListener(boolean failOnWarning)
{
this.failOnWarning = failOnWarning;
}
- public void warning(final TransformerException exception) throws TransformerException
+ public void warning(TransformerException exception) throws TransformerException
{
- if(failOnWarning)
+ if (failOnWarning)
{
throw exception;
}
else
{
- log.warn("XSL Warning.", exception);
+ log.warn("Transformation Warning.", exception);
}
}
- public void error(final TransformerException exception) throws TransformerException
+ public void error(TransformerException exception) throws TransformerException
{
throw exception;
}
- public void fatalError(final TransformerException exception) throws TransformerException
+ public void fatalError(TransformerException exception) throws TransformerException
{
throw exception;
}
}
+
+ private static class ValidationHandler implements ErrorHandler
+ {
+ private final boolean failOnWarning;
+ private SAXParseException exception = null;
+ public ValidationHandler(boolean failOnWarning)
+ {
+ this.failOnWarning = failOnWarning;
+ }
+
+ private void check() throws SAXParseException
+ {
+ if (exception != null)
+ {
+ throw exception;
+ }
+ }
+
+ public void warning(SAXParseException exception) throws SAXException
+ {
+ if (failOnWarning)
+ {
+ this.exception = exception;
+ throw exception;
+ }
+ else
+ {
+ log.warn("Validation Warning.", exception);
+ }
+ }
+
+ public void error(SAXParseException exception) throws SAXException
+ {
+ this.exception = exception;
+ throw exception;
+ }
+
+ public void fatalError(SAXParseException exception) throws SAXException
+ {
+ this.exception = exception;
+ throw exception;
+ }
+ }
}
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -19,6 +19,19 @@
*/
package org.jboss.soa.esb.http.configurators;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.GeneralSecurityException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.util.Properties;
+
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.ProxyHost;
import org.apache.commons.httpclient.contrib.ssl.StrictSSLProtocolSocketFactory;
@@ -33,19 +46,6 @@
import org.jboss.soa.esb.http.protocol.ProtocolSocketFactoryBuilder;
import org.jboss.soa.esb.util.ClassUtil;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.GeneralSecurityException;
-import java.security.KeyManagementException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.util.Properties;
-
/**
* HTTP Protocol configurator.
* <p/>
@@ -77,7 +77,7 @@
URI targetURI = getTargetURI(properties, true);
String factory;
String scheme = targetURI.getScheme();
- final int port ;
+ int port = targetURI.getPort();
org.apache.commons.httpclient.protocol.Protocol protocol;
KeyMaterial keyMaterial = null;
ProtocolSocketFactory socketFactory;
@@ -86,26 +86,35 @@
// We're only interested in HTTP for this...
return;
}
-
- if(scheme.equals("https")) {
+
+ boolean secure = "https".equals(scheme);
+ if (secure) {
factory = properties.getProperty("protocol-socket-factory", StrictSSLProtocolSocketFactory.class.getName());
keyMaterial = getKeyMaterial(properties);
- setHttpsProxyHost(httpClient, properties);
-
- port = 443;
+ if (port == -1) {
+ port = 443;
+ }
} else {
factory = properties.getProperty("protocol-socket-factory", DefaultProtocolSocketFactory.class.getName());
- setHttpProxyHost(httpClient, properties);
-
- port = 80;
+ if (port == -1) {
+ port = 80;
+ }
}
assertPropertySetAndNotBlank(factory, "protocol-socket-factory");
socketFactory = createFactoryClass(factory, keyMaterial, properties);
-
// And finally... configure the host with the protocol....
protocol = new Protocol(scheme, socketFactory, port);
Protocol.registerProtocol(scheme, protocol);
+ // these lines have to happen after registerProtocol, otherwise they pick up the wrong static value
+ if (secure) {
+ setHttpsProxyHost(httpClient, properties);
+ } else {
+ setHttpProxyHost(httpClient, properties);
+ }
+ // JBESB-3021: the registerProtocol map is static (yuck!); we need to make sure to use the right protocol.
+ // See HttpRouter (JBESB-3021 comments) for more information.
+ httpClient.getHostConfiguration().setHost(targetURI.getHost(), port, protocol);
}
/**
@@ -197,7 +206,7 @@
ProtocolSocketFactory socketFactory = null;
try {
- Class factoryClass = ClassUtil.forName(factory, HttpProtocol.class);
+ Class<?> factoryClass = ClassUtil.forName(factory, HttpProtocol.class);
if(ProtocolSocketFactoryBuilder.class.isAssignableFrom(factoryClass)) {
try {
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -76,7 +76,8 @@
private Hashtable<String, Long> actionLengthThresholdHash;
private Hashtable<String, Long> actionTimeThresholdHash;
-
+
+ private String serviceDescription = "";
private String[] actionNames;
private final ObjectName listObjectName ;
@@ -95,7 +96,6 @@
public static final String ACTION_LENGTH_NOTIFICATION_TYPE = "org.jboss.esb.message.action.length.alert";
public static final String ACTION_TIME_NOTIFICATION_TYPE = "org.jboss.esb.message.action.time.alert";
-
public static final String RESET_COUNTER = "resetCounter";
private static final String MESSAGE_COUNTER = "messages successfully processed count";
private static final String FAILED_MESSAGE_COUNTER = "messages failed count";
@@ -109,6 +109,7 @@
private static final String OVERALL_BYTES_FAILED = "overall failed bytes";
private static final String OVERALL_TIME_PROCESSED = "overall service time processed";
+ private static final String SERVICE_DESCRIPTION = "service description";
private static final String ALERT_TIME = "service alert time";
private static final String ALERT_LENGTH = "service alert length";
private static final String ALERT_TIME_DESC = "set service alert time";
@@ -123,6 +124,14 @@
private static final Logger logger = Logger.getLogger(ServiceMessageCounter.class);
+ public String getDescription() {
+ return serviceDescription;
+ }
+
+ public void setServiceDescription(String serviceDescription) {
+ this.serviceDescription = serviceDescription;
+ }
+
/**
* Service alert time getter
* @return max message processing time for the service before an alert is fired
@@ -130,7 +139,7 @@
public Long getAlertTime() {
return alertTime;
}
-
+
/**
* Service alert time setter
* @param alertTime max message size passing through service before an alert is fired
@@ -211,6 +220,10 @@
if (f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_TIME_TAG) != null) {
alertTime = new Long(f_config.getAttribute(ListenerTagNames.SERVICE_ALERT_TIME_TAG));
}
+
+ if (f_config.getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG) != null) {
+ serviceDescription = f_config.getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG);
+ }
init(f_config);
ObjectName listObjectName = null ;
@@ -322,7 +335,7 @@
int count = actionCounterHash.size() + actionProcessTimeHash.size()
+ actionFailedCounterHash.size() + actionBytesProcessedHash.size()
+ actionBytesFailedHash.size() + actionLengthThresholdHash.size()
- + actionTimeThresholdHash.size() + 7; // the extra 6 here are overall service count, failed byte size
+ + actionTimeThresholdHash.size() + 8; // the extra 6 here are overall service count, failed byte size
// processed byte size, overall bytes, alert time, and alert
// length
MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[count];
@@ -383,6 +396,11 @@
attrs[counter] = overallTimeProcessed;
counter++;
+ MBeanAttributeInfo description = new MBeanAttributeInfo(SERVICE_DESCRIPTION, "java.lang.String",
+ "Property " + SERVICE_DESCRIPTION, true, false, false);
+ attrs[counter] = description;
+ counter++;
+
try {
Method alertTimeGetter = this.getClass().getMethod("getAlertTime", new Class[0]);
Method alertTimeSetter = this.getClass().getMethod("setAlertTime", new Class[]{Long.class});
@@ -511,6 +529,8 @@
return alertTime;
} else if (ALERT_LENGTH.equals(key)) {
return alertLength;
+ } else if (SERVICE_DESCRIPTION.equals(key)) {
+ return serviceDescription;
} else if (key.endsWith(ACTION_ALERT_LENGTH)) {
String temp = key.replace(" " + ACTION_ALERT_LENGTH, "");
return actionLengthThresholdHash.get(temp);
Modified: labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -23,6 +23,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
@@ -63,6 +64,7 @@
private static final String PACKAGE_PATH = "/org/jboss/soa/esb/actions/transformation/xslt";
private static final String TEST_XSL_1 = PACKAGE_PATH + "/test1.xsl";
private static final String TEST_XML_1 = PACKAGE_PATH + "/example1.xml";
+ private static final String MALFORMED_XML_1 = PACKAGE_PATH + "/malformed1.xml";
@Test (expected = ConfigurationException.class)
public void shouldThrowIfNoTemplateIsConfigured() throws ConfigurationException
@@ -148,6 +150,22 @@
assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
+ @Test (expected = ActionProcessingException.class)
+ public void processMalformedFileSource() throws Exception
+ {
+ final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
+ action.initialise();
+
+ final Message message = MessageFactory.getInstance().getMessage();
+ final URL resource = getClass().getResource(MALFORMED_XML_1);
+ final File xmlFile = new File(resource.getFile());
+ message.getBody().add(xmlFile);
+
+ @SuppressWarnings("unused")
+ final Message processed = action.process(message);
+ fail("shouldn't reach");
+ }
+
@Test public void processStringSource() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
Copied: labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/malformed1.xml (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/malformed1.xml)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/malformed1.xml (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/malformed1.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+<a></ab>
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/registry/META-INF/uddi.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/registry/META-INF/uddi.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/conf/registry/META-INF/uddi.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -33,7 +33,7 @@
<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
-->
<!-- RMI Transport Settings -->
- <proxyTransport>org.apache.juddi.v3.client.transport.RMITransport</proxyTransport>
+ <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiRMITransport</proxyTransport>
<custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
<inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
<publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/hsqldb.jar
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.bat
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.bat 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,2 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath hsqldb.jar org.hsqldb.util.DatabaseManager
-
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.sh
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.sh 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -cp hsqldb.jar org.hsqldb.util.DatabaseManager
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.bat
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.bat 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath hsqldb.jar org.hsqldb.Server -database db
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.sh
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.sh 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/05_Database/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -classpath hsqldb.jar org.hsqldb.Server -database db
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/README.html
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/README.html 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/README.html 2009-12-28 23:33:29 UTC (rev 30843)
@@ -128,7 +128,7 @@
<li>Open 6 command shell windows in the root folder of this quickstart.</li>
<li>In one of the command shell windows, start your JBoss ESB/Application Server instance.</li>
<li>In one of the command shell windows, type "ant deploy-jms-dests" to deploy the JMS Queues.</li>
- <li>In one of the command shell windows, change directory into the "05_Database" folder and
+ <li>In one of the command shell windows, type "ant replace", and then change directory into the "05_Database" folder and
type "server.bat" or "server.sh", depending on your OS.</li>
<li>In the remaining command shell windows, type the following commands in seperate windows:
<ul>
@@ -703,4 +703,4 @@
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -16,6 +16,15 @@
<echo message="This target is not used by this Quickstart. Please read the 'README.html' file." />
</target>
+ <target name="replace" depends="compile">
+ <copy todir="${basedir}/05_Database" overwrite="true">
+ <fileset dir="${basedir}/template"/>
+ <filterset>
+ <filter token="hsqldb.dir" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib"/>
+ </filterset>
+ </copy>
+ </target>
+
<target name="01_split_enrich_transform_route" depends="compile,compile_high_price_model" description="run split_transform_route Service">
<echo>Split Enrich Transform Route Service:</echo>
<java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
@@ -95,13 +104,13 @@
</target>
<target name="select" description="Select the orders from the database">
- <sql print="true" driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:9002" userid="sa" autocommit="true" password="" classpath="05_Database/hsqldb.jar">
+ <sql print="true" driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:9002" userid="sa" autocommit="true" password="" classpath="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar">
<transaction>select * from orders</transaction>
</sql>
</target>
<target name="delete" description="Delete the orders in the database">
- <sql print="true" driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:9002" userid="sa" autocommit="true" password="" classpath="05_Database/hsqldb.jar">
+ <sql print="true" driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:hsql://localhost:9002" userid="sa" autocommit="true" password="" classpath="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar">
<transaction>delete from orders</transaction>
</sql>
</target>
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template)
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,2 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.util.DatabaseManager
-
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,2 @@
+"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.util.DatabaseManager
+
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -cp @hsqldb.dir@/hsqldb.jar org.hsqldb.util.DatabaseManager
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+java -cp @hsqldb.dir@/hsqldb.jar org.hsqldb.util.DatabaseManager
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.Server -database db
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.Server -database db
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -classpath @hsqldb.dir@/hsqldb.jar org.hsqldb.Server -database db
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/huge-split-enrich-transform-route/template/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+java -classpath @hsqldb.dir@/hsqldb.jar org.hsqldb.Server -database db
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -12,13 +12,13 @@
<target name="quickstart-specific-assemblies" depends="assert-ws-available, makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/native_client/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_aop/src/org/jboss/soa/esb/samples/quickstart/spring_aop/MySpringEnabledAction.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_aop/src/org/jboss/soa/esb/samples/quickstart/spring_aop/MySpringEnabledAction.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_aop/src/org/jboss/soa/esb/samples/quickstart/spring_aop/MySpringEnabledAction.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -38,7 +38,7 @@
{
public MySpringEnabledAction(ConfigTree config) throws Exception
{
- configTree = config;
+ super(config);
}
public Message sayHelloAopStyle(Message message) throws Exception
@@ -46,13 +46,11 @@
SaySomething hello = (SaySomething) getBeanFactory().getBean(
"helloObject");
- logHeader();
// interceptor will get applied here
// check the console output to see the interceptor changed the message
String helloString = (String) message.getBody().get();
hello.setGreeting(helloString);
message.getBody().add(hello.getGreeting());
- logFooter();
return message;
}
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -38,4 +38,14 @@
</exec>
</target>
+ <target name="replace" depends="compile">
+ <copy todir="${basedir}/hsqldb" overwrite="true">
+ <fileset dir="${basedir}/template"/>
+ <filterset>
+ <filter token="hsqldb.dir" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib"/>
+ </filterset>
+ </copy>
+
+ </target>
+
</project>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.bat
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.bat 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,2 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath ..\lib\ext\hsqldb.jar org.hsqldb.util.DatabaseManager
-
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.sh
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.sh 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -cp ../lib/ext/hsqldb.jar org.hsqldb.util.DatabaseManager
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.bat
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.bat 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath ..\lib\ext\hsqldb.jar org.hsqldb.Server -database jpetstore
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.sh
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.sh 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/hsqldb/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -classpath ../lib/ext/hsqldb.jar org.hsqldb.Server -database jpetstore
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/readme.txt
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/readme.txt 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/readme.txt 2009-12-28 23:33:29 UTC (rev 30843)
@@ -22,10 +22,12 @@
2. In "Window1", change directory to the "hsqldb" directory and run the
server.sh/server.bat script.
3. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
- 4. In "Window2", type 'ant runtest'.
- 5. Switch back to Application Server console to see the output from the ESB
- 6. Interrupt the database ("Window1") using Ctrl-C.
- 7. In this folder ("Window1"), type 'ant undeploy'.
+ 4. In "Window2", type 'ant replace', which will insert the correct locations
+for the hsqldb.jar in the hsqldb directory scripts..
+ 5. In "Window2", type 'ant runtest'.
+ 6. Switch back to Application Server console to see the output from the ESB
+ 7. Interrupt the database ("Window1") using Ctrl-C.
+ 8. In this folder ("Window1"), type 'ant undeploy'.
Project file descriptions:
==========================
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template)
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/manager.bat 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,2 +0,0 @@
-"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.util.DatabaseManager
-
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/manager.bat)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.bat 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1,2 @@
+"%JAVA_HOME%/bin/java" -classpath @hsqldb.dir@\hsqldb.jar org.hsqldb.util.DatabaseManager
+
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/manager.sh 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -cp @hsqldb.dir@/hsqldb.jar org.hsqldb.util.DatabaseManager
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/manager.sh)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/manager.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+java -cp @hsqldb.dir@/hsqldb.jar org.hsqldb.util.DatabaseManager
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/server.sh 2009-12-22 10:10:38 UTC (rev 30796)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1 +0,0 @@
-java -classpath @hsqldb.dir@/hsqldb.jar org.hsqldb.Server -database jpetstore
Copied: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh (from rev 30796, labs/jbossesb/branches/JBESB_4_7_CP/product/samples/quickstarts/spring_jpetstore/template/server.sh)
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh (rev 0)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/spring_jpetstore/template/server.sh 2009-12-28 23:33:29 UTC (rev 30843)
@@ -0,0 +1 @@
+java -classpath @hsqldb.dir@/hsqldb.jar org.hsqldb.Server -database jpetstore
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/udp_gateway/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/udp_gateway/jboss-esb.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/udp_gateway/jboss-esb.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -9,7 +9,7 @@
<udp-listener name="udp-listener" host="localhost" port="9999" is-gateway="true"/>
</listeners>
- <actions mep="RequestResponse">
+ <actions mep="OneWay">
<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="message" value="UdpServiceCategory:Service1"/>
<property name="printfull" value="false"/>
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -16,13 +16,13 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer1/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -14,14 +14,14 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
<pathelement location="build/classes" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer2/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -18,13 +18,13 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -16,13 +16,13 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise2/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -18,13 +18,13 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise3/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -18,13 +18,13 @@
<target name="quickstart-specific-assemblies" depends="makewar"/>
- <target name="makewar" description="make war">
+ <target name="makewar" depends="dependencies" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
<javac srcdir="war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<path refid="compile-classpath" />
- <fileset dir="war/lib/ext" includes="*.jar" />
+ <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar" />
</classpath>
</javac>
Deleted: labs/jbossesb/workspace/performance/perf2/product/samples/quickstarts/webservice_consumer_wise4/war/lib/ext/jbossws-client.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/performance/perf2/product/services/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/services/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/services/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -16,6 +16,7 @@
<target name="clean">
<ant dir="jbossesb" target="clean"/>
<ant dir="jbpm" target="clean"/>
+ <ant dir="jbpm/ant-task" target="clean"/>
<ant dir="jbrules" target="clean"/>
<ant dir="smooks" target="clean"/>
<ant dir="soapui-client" target="clean"/>
Modified: labs/jbossesb/workspace/performance/perf2/product/services/jbpm/ant-task/build.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/services/jbpm/ant-task/build.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/services/jbpm/ant-task/build.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -20,5 +20,9 @@
<target name="codec_na" unless="codec_na" >
<input message="Codec not available - check dir!!" />
</target>
+
+ <target name="clean">
+ <delete dir="build" failonerror="false" />
+ </target>
</project>
Modified: labs/jbossesb/workspace/performance/perf2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -40,7 +40,7 @@
opCode = Constants.OpCode.valueOf(sAux);
} catch (IllegalArgumentException e) {
throw new ConfigurationException("Attribute '"+Constants.COMMAND_CODE_TAG+"' has an invalid value"
- +"- see CommandVehicle.Operation enum for possible values");
+ +"- see Constants.OpCode enum for possible values");
}
if (Constants.OpCode.CancelProcessInstanceCommand.equals(opCode))
Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as4/src/main/resources/META-INF/rhq-plugin.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -44,10 +44,6 @@
default="default"/>
</c:group>
</plugin-configuration>
- <operation name="start" displayName="Start deployment" description="Start the JBoss ESB deployment"/>
- <operation name="stop" displayName="Stop deployment" description="Stop the JBoss ESB deployment"/>
- <operation name="create" displayName="Move .esb deployment into the create state" description="Move the .esb deployment into the create state"/>
- <operation name="destroy" displayName="Move .esb deployment into the destroy state" description="Move the .esb deployment into the destroy state"/>
<operation name="resetCounts" displayName="Reset Counts" description="Reset the overall counter"/>
<metric displayName="Message Count (Successful)" property="SuccessfulMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Overall Successful Message Count"/>
<metric displayName="Message Count (Total)" property="TotalMessageCount" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Total Message Count"/>
@@ -116,7 +112,9 @@
<c:simple-property name="categoryName" type="string" description="the JBoss ESB service category name"/>
</plugin-configuration>
- <operation name="resetCounter" displayName="Reset the message counter" description="Reset the message counter"/>
+ <operation name="resetCounter" displayName="Reset the message counter" description="Reset the message counter">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
<metric displayName="Message Count" property="overallMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Message Count"/>
<metric displayName="Message Count (avg)" property="overallMessageCountByMinute" category="utilization" displayType="summary" measurementType="trendsup" description="Message Count (avg)"/>
<metric displayName="Overall Bytes" property="overallBytes" units="bytes" category="utilization" displayType="summary"
@@ -143,8 +141,12 @@
<c:simple-property name="listenerName" type="string" description="the name of the Listener"/>
<c:simple-property name="deploymentName" type="string" description="name of deployment"/>
</plugin-configuration>
- <operation name="start" displayName="Start listener" description="Start the listener."/>
- <operation name="stop" displayName="Stop listener" description="Stop the listener."/>
+ <operation name="start" displayName="Start listener" description="Start the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
+ <operation name="stop" displayName="Stop listener" description="Stop the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
<metric property="mep" displayName="MEP" dataType="trait" displayType="summary" defaultOn="true" description="Type of deployment"/>
<metric property="LifeCycleState" displayName="Lifecycle State" dataType="trait" displayType="summary" defaultOn="true" description="Lifecycle State"/>
<metric property="maxThreads" displayName="Maximum Number of Threads" dataType="trait" displayType="summary" defaultOn="true" description="Maximum number of threads"/>
@@ -171,8 +173,12 @@
<c:simple-property name="listenerName" type="string" description="the name of the Listener"/>
<c:simple-property name="deploymentName" type="string" description="name of deployment"/>
</plugin-configuration>
- <operation name="start" displayName="Start listener" description="Start the listener."/>
- <operation name="stop" displayName="Stop listener" description="Stop the listener."/>
+ <operation name="start" displayName="Start listener" description="Start the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
+ <operation name="stop" displayName="Stop listener" description="Stop the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
<metric property="LifeCycleState" displayName="Lifecycle State" dataType="trait" displayType="summary" defaultOn="true" description="Lifecycle State"/>
<metric property="maxThreads" displayName="Maximum Number of Threads" dataType="trait" displayType="summary" defaultOn="true" description="Maximum number of threads"/>
<metric property="target-service-category" displayName="Service Category" dataType="trait" displayType="summary" defaultOn="true" description="Service Category"/>
@@ -208,7 +214,7 @@
displayType="summary" defaultOn="true" measurementType="dynamic"/>
<metric displayName="Overall Bytes Processed" property="bytesSuccessful" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
<metric displayName="Overall Bytes Failed" property="overallBytesFailed" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
- <metric displayName="Processing Time" property="processingTime" units="milliseconds" defaultOn="true" category="performance"/>
+ <metric displayName="Processing Time" property="processingTime" units="milliseconds" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
<help>
<![CDATA[
JBoss ESB Actions are the actions executed within a service.
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-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/java/org/jbosson/plugins/jbossesb/ESB5DeploymentComponent.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -76,8 +76,17 @@
DeploymentProgress stop = deployMgr.stop(repositoryName);
stop.run();
if (stop != null) {
- DeploymentStatus stopStatus = stop.getDeploymentStatus();
+ DeploymentStatus stopStatus = stop.getDeploymentStatus();
if (stopStatus.isFailed()) {
+ if ((stopStatus.getFailure() != null) && (stopStatus.getFailure().getCause() != null)
+ && (stopStatus.getFailure().getCause() instanceof java.lang.NullPointerException)) {
+ // If we get a NPE here, it means that the .esb deployment has already been deleted
+ // Return here because otherwise JON will not update and remove the deployment
+ log.error("Failed to stop deployment '" + repositoryName + "'.", stopStatus.getFailure());
+
+ return;
+ }
+
log.error("Failed to stop deployment '" + repositoryName + "'.", stopStatus.getFailure());
throw new Exception("Failed to stop deployment '" + repositoryName + "' - cause: "
+ stopStatus.getFailure());
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-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/as5/src/main/resources/META-INF/rhq-plugin.xml 2009-12-28 23:33:29 UTC (rev 30843)
@@ -44,10 +44,6 @@
default="default"/>
</c:group>
</plugin-configuration>
- <operation name="start" displayName="Start deployment" description="Start the JBoss ESB deployment"/>
- <operation name="stop" displayName="Stop deployment" description="Stop the JBoss ESB deployment"/>
- <operation name="create" displayName="Move .esb deployment into the create state" description="Move the .esb deployment into the create state"/>
- <operation name="destroy" displayName="Move .esb deployment into the destroy state" description="Move the .esb deployment into the destroy state"/>
<operation name="resetCounts" displayName="Reset Counts" description="Reset the overall counter"/>
<metric displayName="Message Count (Successful)" property="SuccessfulMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Overall Successful Message Count"/>
<metric displayName="Message Count (Total)" property="TotalMessageCount" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic" description="Total Message Count"/>
@@ -118,7 +114,9 @@
<c:simple-property name="serviceName" type="string" description="the JBoss ESB service name"/>
<c:simple-property name="categoryName" type="string" description="the JBoss ESB service category name"/>
</plugin-configuration>
- <operation name="resetCounter" displayName="Reset the message counter" description="Reset the message counter"/>
+ <operation name="resetCounter" displayName="Reset the message counter" description="Reset the message counter">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
<metric displayName="Message Count" property="overallMessageCount" category="utilization" displayType="summary" measurementType="dynamic" description="Message Count"/>
<metric displayName="Message Count (avg)" property="overallMessageCountByMinute" category="utilization" displayType="summary" measurementType="trendsup" description="Message Count (avg)"/>
<metric displayName="Overall Bytes" property="overallBytes" units="bytes" category="utilization" displayType="summary"
@@ -144,8 +142,12 @@
<c:simple-property name="listenerName" type="string" description="the name of the Listener"/>
<c:simple-property name="deploymentName" type="string" description="name of deployment"/>
</plugin-configuration>
- <operation name="start" displayName="Start listener" description="Start the listener."/>
- <operation name="stop" displayName="Stop listener" description="Stop the listener."/>
+ <operation name="start" displayName="Start listener" description="Start the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
+ <operation name="stop" displayName="Stop listener" description="Stop the listener.">
+ <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results>
+ </operation>
<metric property="mep" displayName="MEP" dataType="trait" displayType="summary" defaultOn="true" description="Type of deployment"/>
<metric property="LifeCycleState" displayName="Lifecycle State" dataType="trait" displayType="summary" defaultOn="true" description="Lifecycle State"/>
<metric property="maxThreads" displayName="Maximum Number of Threads" dataType="trait" displayType="summary" defaultOn="true" description="Maximum number of threads"/>
@@ -208,7 +210,7 @@
displayType="summary" defaultOn="true" measurementType="dynamic"/>
<metric displayName="Overall Bytes Processed" property="bytesSuccessful" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
<metric displayName="Overall Bytes Failed" property="overallBytesFailed" units="bytes" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
- <metric displayName="Processing Time" property="processingTime" units="milliseconds" defaultOn="true" category="performance"/>
+ <metric displayName="Processing Time" property="processingTime" units="milliseconds" category="utilization" displayType="summary" defaultOn="true" measurementType="dynamic"/>
<help>
<![CDATA[
JBoss ESB Actions are the actions executed within a service.
Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -7,9 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2 of the License.
*
- * This program 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
+ * This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -146,7 +144,7 @@
Long bytesProcessed = new Long(0);
if (attribute != null) {
bytesProcessed = (Long) attribute.refresh();
- counterBytesProcessed = bytesProcessed.intValue();
+ counterBytesProcessed = bytesProcessed.longValue();
}
report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
} else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
@@ -154,7 +152,7 @@
Long bytesFailed = new Long(0);
if (attribute != null) {
bytesFailed = (Long) attribute.refresh();
- counterBytesFailed += bytesFailed.intValue();
+ counterBytesFailed += bytesFailed.longValue();
}
report.addData(new MeasurementDataNumeric(request, new Double(bytesFailed.doubleValue())));
}
Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBDiscoveryComponent.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -1,4 +1,5 @@
package org.jbosson.plugins.jbossesb;
+import java.util.Iterator;
import java.util.Set;
import org.mc4j.ems.connection.bean.EmsBean;
@@ -15,21 +16,49 @@
* @author Tom Cunningham
*/
public class ESBDiscoveryComponent extends MBeanResourceDiscoveryComponent<JMXComponent> {
+ private static final String NAME = "name";
+ private static final String RESOURCE_KEY = "key";
+ private static final String SERVICE_DESCRIPTION = "service description";
+
@Override
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context) {
Set<DiscoveredResourceDetails> jmxResources = super.discoverResources(context);
String versionNumber;
- try {
- EmsBean bean = context.getParentResourceComponent().getEmsConnection().getBean(SOADiscoveryComponent.SYSTEM_BEAN);
+ String description = "Service Entity";
+ EmsBean bean = context.getParentResourceComponent().getEmsConnection().getBean(SOADiscoveryComponent.SYSTEM_BEAN);
+ String resourceKey = null;
+
+ for (Iterator i = jmxResources.iterator(); i.hasNext();) {
+ DiscoveredResourceDetails drd = (DiscoveredResourceDetails) i.next();
+ resourceKey = drd.getResourceKey();
+ }
+
+ try {
EmsAttribute versionAttribute = bean.getAttribute(SOADiscoveryComponent.VERSION_NUMBER);
versionNumber = (String) versionAttribute.refresh();
} catch (Exception e) {
versionNumber = "";
}
-
+
+ try {
+ EmsBean discoverBean = context.getParentResourceComponent().getEmsConnection().getBean(resourceKey);
+ String name = discoverBean.getBeanName().getKeyProperty(NAME);
+ Set<EmsAttribute> attributeSet = discoverBean.getAttributes();
+ for (Iterator i = attributeSet.iterator(); i.hasNext();) {
+ EmsAttribute attr = (EmsAttribute) i.next();
+
+ if (attr.getName().endsWith(SERVICE_DESCRIPTION)) {
+ description = (String) attr.getValue();
+ }
+ }
+ } catch (Exception e) {
+ description = "Service Entity";
+ }
+
for (DiscoveredResourceDetails jmxResource : jmxResources) {
jmxResource.setResourceVersion(versionNumber);
+ jmxResource.setResourceDescription(description);
}
return jmxResources;
Modified: labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
===================================================================
--- labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2009-12-28 19:36:58 UTC (rev 30842)
+++ labs/jbossesb/workspace/performance/perf2/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java 2009-12-28 23:33:29 UTC (rev 30843)
@@ -54,7 +54,7 @@
private static final String OVERALL_BYTES_FAILED_METRIC = "bytesFailed";
private static final String OVERALL_BYTES_PROCESSED = "overall processedbytes";
- private static final String OVERALL_BYTES_FAILED = "overall bytes failed";
+ private static final String OVERALL_BYTES_FAILED = "overall failed bytes";
private static final String OVERALL_MINUTE_METRIC_NAME = "overallMessageCountByMinute";
More information about the jboss-svn-commits
mailing list