[jboss-svn-commits] JBL Code SVN: r28917 - in labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product: rosetta/src/org/jboss/soa/esb/listeners/config and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 12 02:56:49 EDT 2009
Author: kevin.conner at jboss.com
Date: 2009-08-12 02:56:49 -0400 (Wed, 12 Aug 2009)
New Revision: 28917
Added:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.pdf
Removed:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties
Modified:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBResponseFilter.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java
Log:
Merge 4.4.0.GA_CP3_CR7 into SOA branch
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBResponseFilter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBResponseFilter.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBResponseFilter.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -22,6 +22,7 @@
import org.jboss.internal.soa.esb.util.NullWriter;
import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponseWrapper;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -34,15 +35,21 @@
*/
public class ESBResponseFilter implements Filter {
- private boolean isOneWay = false;
+ private static final String POST = "POST" ;
public void init(FilterConfig filterConfig) throws ServletException {
- String oneWayConfig = filterConfig.getInitParameter("OneWay");
- isOneWay = "true".equalsIgnoreCase(oneWayConfig);
}
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
- if(isOneWay) {
+ final boolean filter ;
+ if (servletRequest instanceof HttpServletRequest) {
+ HttpServletRequest httpServletRequest = (HttpServletRequest)servletRequest ;
+ filter = POST.equals(httpServletRequest.getMethod()) ;
+ } else {
+ filter = false ;
+ }
+
+ if (filter) {
filterChain.doFilter(servletRequest, new OneWayResponseWrapper((HttpServletResponse) servletResponse));
servletResponse.setContentType("text/xml");
servletResponse.setContentLength(0);
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -501,7 +501,6 @@
for(Service service: endpointServices)
{
- final MepType.Enum mep = service.getActions().getMep() ;
final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(service) ;
final String wsdl = ESBContractGenerator.generateWSDL(service, serviceInfo) ;
addFile(zos, serviceInfo.getWSDLFileName(), wsdl) ;
@@ -514,7 +513,7 @@
// Filter...
// At the moment we only need the filter to overcome a bug in JBossWS re In-Only endpoints, so
// we only include for one way services...
- if(mep == MepType.ONE_WAY) {
+ if(serviceInfo.isOneWay()) {
String filterName = serviceInfo.getServletName() + "_Filter";
filterDefinitions.append("<filter><filter-name>") ;
@@ -522,7 +521,6 @@
filterDefinitions.append("</filter-name><filter-class>") ;
filterDefinitions.append(ESBResponseFilter.class.getName()) ;
filterDefinitions.append("</filter-class>") ;
- filterDefinitions.append("<init-param><param-name>OneWay</param-name><param-value>true</param-value></init-param>") ;
filterDefinitions.append("</filter>") ;
filterMappings.append("<filter-mapping><filter-name>") ;
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.pdf (from rev 28916, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR7/product/tools/systinet/SystinetIntegration.pdf)
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml 2009-08-12 06:56:49 UTC (rev 28917)
@@ -1,5 +1,10 @@
<project name="jon-build" default="deploy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
+ <property name="product.dir" value="${pwd}/../../.."/>
+ <property name="install.dir" value="${product.dir}/install"/>
+ <property file="${install.dir}/deployment.properties"/>
+ <property name="org.jboss.esb.server.home" location="${pwd}/../../.."/>
+
<property name="build.dir" location="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="classpath.dir" location="../../../antlib"/>
@@ -21,14 +26,41 @@
<delete dir="${build.dir}"/>
</target>
- <path id="classpath">
- <fileset dir="/home/tcunning/jboss-4.2.2.GA/server/default/lib"
- includes="**/*.jar"/>
- <fileset dir="${systinet.reg.dir}/lib" includes="**/*.jar"/>
- <fileset dir="${systinet.reg.dir}/app/uddi" includes="**/*.jar"/>
- </path>
+ <target name="initialise-config" unless="org.jboss.esb.server.config">
+ <condition property="jbossesb-server-production">
+ <available file="${org.jboss.esb.server.home}/server/production/deploy/jbossesb.sar"/>
+ </condition>
+ <condition property="jbossesb-server-default">
+ <available file="${org.jboss.esb.server.home}/server/default/deploy/jbossesb.sar"/>
+ </condition>
- <target name="compile-transport">
+ <echo>${org.jboss.esb.server.home}/server/default/deploy/jbossesb.sar</echo>
+
+ <condition property="jbossesb-server-recognised">
+ <or>
+ <isset property="jbossesb-server-production"/>
+ <isset property="jbossesb-server-default"/>
+ </or>
+ </condition>
+
+ <fail unless="jbossesb-server-recognised" message="Could not detect default ESB server instance"/>
+
+ <condition property="org.jboss.esb.server.config"
+ value="production">
+ <isset property="jbossesb-server-production"/>
+ </condition>
+ <condition property="org.jboss.esb.server.config"
+ value="default">
+ <isset property="jbossesb-server-default"/>
+ </condition>
+ </target>
+
+ <target name="compile-transport" depends="initialise-config">
+ <path id="classpath">
+ <fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib"
+ includes="**/*.jar"/>
+ </path>
+
<mkdir dir="build"/>
<mkdir dir="${classes.dir}"/>
<javac deprecation="off" nowarn="on" debug="on" srcdir="${java.dir}" destdir="${classes.dir}" classpathref="classpath" source="1.5"/>
@@ -52,10 +84,10 @@
<target name="deploy" depends="jar-transport">
<copy file="${esb.transport.jar}"
overwrite="true"
- todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/registry.war/WEB-INF/lib"/>
+ todir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/registry.war/WEB-INF/lib"/>
<copy file="${esb.client.transport.jar}"
overwrite="true"
- todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/jbossesb.sar/lib"/>
+ todir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/jbossesb.sar/lib"/>
</target>
</project>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -116,7 +116,11 @@
rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/inquiry").forward(soaprequest,soapresponse);
} catch (Exception e) {
- e.printStackTrace();
+ // We hide a specific CCE as coyote attempts to unwrap this request
+ if (!(e instanceof ClassCastException))
+ {
+ throw new RemoteException("Unexpected error executing request", e);
+ }
}
Node node = null;
@@ -126,8 +130,7 @@
node = marshalResult(content);
}
} catch (Exception e) {
- e.printStackTrace();
- throw new RemoteException("", e.fillInStackTrace());
+ throw new RemoteException("Unexpected exception marshalling result", e);
}
return node;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -21,9 +21,11 @@
*/
package org.jboss.soa.esb.registry.rmi;
+import java.rmi.RemoteException;
import java.util.Properties;
import javax.naming.InitialContext;
+import javax.naming.NamingException;
/**
* @author Tom Cunningham (tcunning at redhat.com)
@@ -45,8 +47,8 @@
public static String PUBLISH_SERVICE="/PublishService";
public static void register(RegistrationService regService)
+ throws NamingException, RemoteException
{
- try {
String factoryInitial = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL);
String providerURL = System.getProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL);
String factoryURLPkgs = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS);
@@ -68,18 +70,32 @@
env.setProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS, factoryURLPkgs);
InitialContext context = new InitialContext(env);
- Inquiry inquiry = new InquiryService();
+ InquiryService inquiry = new InquiryService();
- ((InquiryService)inquiry).setRegistrationService(regService);
- inquiryReg = inquiry;
- context.rebind(INQUIRY_SERVICE, inquiry);
- Publish publish = new PublishService();
- ((PublishService)publish).setRegistrationService(regService);
+ inquiry.setRegistrationService(regService);
+ try {
+ context.rebind(INQUIRY_SERVICE, inquiry);
+ } catch (final NamingException ne) {
+ InquiryService.unexportObject(inquiry, true) ;
+ throw ne ;
+ }
+ PublishService publish ;
+ try {
+ publish = new PublishService();
+ } catch (final RemoteException re) {
+ InquiryService.unexportObject(inquiry, true) ;
+ throw re ;
+ }
+ publish.setRegistrationService(regService);
+ try {
+ context.rebind(PUBLISH_SERVICE, publish);
+ } catch (final NamingException ne) {
+ InquiryService.unexportObject(inquiry, true) ;
+ PublishService.unexportObject(publish, true) ;
+ throw ne ;
+ }
publishReg = publish;
- context.rebind(PUBLISH_SERVICE, publish);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ inquiryReg = inquiry;
}
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -115,7 +115,11 @@
rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/publishing").forward(soaprequest,soapresponse);
} catch (Exception e) {
- e.printStackTrace();
+ // We hide a specific CCE as coyote attempts to unwrap this request
+ if (!(e instanceof ClassCastException))
+ {
+ throw new RemoteException("Unexpected error executing request", e);
+ }
}
Node node = null;
@@ -125,8 +129,7 @@
node = marshalResult(content);
}
} catch (Exception e) {
- e.printStackTrace();
- throw new RemoteException("", e.fillInStackTrace());
+ throw new RemoteException("Unexpected exception marshalling result", e);
}
return node;
}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -39,7 +39,14 @@
public void init() throws ServletException
{
super.init();
- JNDIRegistration.register(this);
+ try
+ {
+ JNDIRegistration.register(this);
+ }
+ catch (final Exception ex)
+ {
+ throw new ServletException("Unexpected exception during registration", ex) ;
+ }
}
}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java 2009-08-12 06:56:49 UTC (rev 28917)
@@ -1,148 +0,0 @@
-package org.jboss.soa.esb.registry.rmi;
-
-// Copyright (C) 1998 by Jason Hunter <jhunter at acm.org>. All rights reserved.
-// Use of this class is limited. Please see the LICENSE for more information.
-
-import java.io.*;
-import java.net.*;
-import java.rmi.*;
-import java.rmi.server.*;
-import java.rmi.registry.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-
-/**
- * A superclass for any HTTP servlet that wishes to act as an RMI server.
- * RemoteHttpServlet begins listening for RMI calls in its
- * <tt>init()</tt> method and stops listening in its <tt>destroy()</tt>
- * method. To register itself it uses the registry on the local machine
- * on the port determined by <tt>getRegistryPort()</tt>. It registers
- * under the name determined by <tt>getRegistryName()</tt>.
- *
- * @see com.oreilly.servlet.RemoteDaemonHttpServlet
- *
- * @author <b>Jason Hunter</b>, Copyright © 1998
- * @version 1.0, 98/09/18
- */
-public abstract class RemoteHttpServlet extends HttpServlet
- implements Remote {
- /**
- * The registry for the servlet
- */
- protected Registry registry;
-
- /**
- * Begins the servlet's RMI operations. Causes the servlet to export
- * itself and then bind itself to the registry. Logs any errors.
- * Subclasses that override this method must be sure to first call
- * <tt>super.init(config)</tt>.
- *
- * @param config the servlet config
- * @exception ServletException if a servlet exception occurs
- */
- public void init(ServletConfig config) throws ServletException {
- super.init(config);
- try {
- UnicastRemoteObject.exportObject(this);
- bind();
- }
- catch (RemoteException e) {
- log("Problem binding to RMI registry: " + e.getMessage());
- }
- }
-
- /**
- * Halts the servlet's RMI operations. Causes the servlet to
- * unbind itself from the registry. Logs any errors. Subclasses that
- * override this method must be sure to first call <tt>super.destroy()</tt>.
- */
- public void destroy() {
- unbind();
- }
-
- /**
- * Returns the name under which the servlet should be bound in the
- * registry. By default the name is the servlet's class name. This
- * can be overridden with the <tt>registryName</tt> init parameter.
- *
- * @return the name under which the servlet should be bound in the registry
- */
- protected String getRegistryName() {
- // First name choice is the "registryName" init parameter
- String name = getInitParameter("registryName");
- if (name != null) return name;
-
- // Fallback choice is the name of this class
- return this.getClass().getName();
- }
-
- /**
- * Returns the port where the registry should be running. By default
- * the port is the default registry port (1099). This can be
- * overridden with the <tt>registryPort</tt> init parameter.
- *
- * @return the port for the registry
- */
- protected int getRegistryPort() {
- // First port choice is the "registryPort" init parameter
- try { return Integer.parseInt(getInitParameter("registryPort")); }
-
- // Fallback choice is the default registry port (1099)
- catch (NumberFormatException e) { return Registry.REGISTRY_PORT; }
- }
-
- /**
- * Binds the servlet to the registry. Creates the registry if necessary.
- * Logs any errors.
- */
- protected void bind() {
- // Try to find the appropriate registry already running
- try {
- registry = LocateRegistry.getRegistry(getRegistryPort());
- registry.list(); // Verify it's alive and well
- }
- catch (Exception e) {
- // Couldn't get a valid registry
- registry = null;
- }
-
- // If we couldn't find it, we need to create it.
- // (Equivalent to running "rmiregistry")
- if (registry == null) {
- try {
- registry = LocateRegistry.createRegistry(getRegistryPort());
- }
- catch (Exception e) {
- log("Could not get or create RMI registry on port " +
- getRegistryPort() + ": " + e.getMessage());
- return;
- }
- }
-
- // If we get here, we must have a valid registry.
- // Now register this servlet instance with that registry.
- try {
- registry.rebind(getRegistryName(), this);
- }
- catch (Exception e) {
- log("Could not bind to RMI registry: " + e.getMessage());
- return;
- }
- }
-
- /**
- * Unbinds the servlet from the registry.
- * Logs any errors.
- */
- protected void unbind() {
- try {
- if (registry != null) registry.unbind(getRegistryName());
- }
- catch (Exception e) {
- log("Problem unbinding from RMI registry: " + e.getMessage());
- }
- }
-}
-
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties 2009-08-12 05:57:41 UTC (rev 28916)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties 2009-08-12 06:56:49 UTC (rev 28917)
@@ -1,2 +0,0 @@
-systinet.reg.dir=/opt/hp/registry
-jboss.home.dir=/home/tcunning/jboss-4.2.2.GA
More information about the jboss-svn-commits
mailing list