Remove compileconf, Glassfish 2.1 dependencies, update HTTP BC and REST BC to versions from separate repositories

master
Vitaliy Filippov 2015-12-26 01:59:16 +03:00
parent 6d34112b44
commit fc7baf637c
690 changed files with 3826 additions and 5966 deletions

8
build.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# Full build script
JV_SRCROOT=`dirname $0`
JV_SRCROOT=`realpath $JV_SRCROOT`
export JV_SRCROOT
mvn clean -Dmaven.repo.local=$JV_SRCROOT/m2/repository $*
mvn install -Dmaven.test.skip=true -e -Dmaven.repo.local=$JV_SRCROOT/m2/repository $*

View File

@ -64,7 +64,6 @@
11/19/09: Ed W. 11/19/09: Ed W.
--> -->
<property name="junit.maxmemory" value="512m" /> <property name="junit.maxmemory" value="512m" />
<property name="junit.gfbase" value="${env.JV_GFBASE}" />
<property name="junit.srcroot" value="${project.build.testSourceDirectory}" /> <property name="junit.srcroot" value="${project.build.testSourceDirectory}" />
<!-- default ant-junit version if caller does not supply: --> <!-- default ant-junit version if caller does not supply: -->
@ -134,7 +133,6 @@
<property name="echo.jbicomps.junit.sysproperties" refid="jbicomps.junit.sysproperties" /> <property name="echo.jbicomps.junit.sysproperties" refid="jbicomps.junit.sysproperties" />
<echo> <echo>
work.dir=${work.dir} work.dir=${work.dir}
junit.gfbase=${junit.gfbase}
junit.maxmemory=${junit.maxmemory} junit.maxmemory=${junit.maxmemory}
junit.srcroot=${junit.srcroot} junit.srcroot=${junit.srcroot}
jbicomps.junit.sysproperties=${echo.jbicomps.junit.sysproperties} jbicomps.junit.sysproperties=${echo.jbicomps.junit.sysproperties}

View File

@ -67,6 +67,9 @@
<jbicomps.currentVersion>3.0.6-SNAPSHOT</jbicomps.currentVersion> <jbicomps.currentVersion>3.0.6-SNAPSHOT</jbicomps.currentVersion>
<ojc.default.release.version>3.0.6-SNAPSHOT</ojc.default.release.version> <ojc.default.release.version>3.0.6-SNAPSHOT</ojc.default.release.version>
<!-- The version number for openesb-core components. 2.4.2 is available in central, 2.4.3-SNAPSHOT = git master. -->
<openesb-core-version>2.4.2</openesb-core-version>
<!-- The version number for OSGi bundles. Has to be triple. Cannot be SNAPSHOT. --> <!-- The version number for OSGi bundles. Has to be triple. Cannot be SNAPSHOT. -->
<OSGI_VERSION>3.0.6</OSGI_VERSION> <OSGI_VERSION>3.0.6</OSGI_VERSION>
@ -931,13 +934,6 @@
<version>${iepse.artifact.version}</version> <version>${iepse.artifact.version}</version>
</dependency> </dependency>
<!-- special dependency jar to inject appserver classpath: -->
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
<version>${jbicomps.currentVersion}</version>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>restjbiadapter</artifactId> <artifactId>restjbiadapter</artifactId>

View File

@ -183,7 +183,6 @@
<!-- required env. vars: --> <!-- required env. vars: -->
<SRCROOT>${env.JV_SRCROOT}</SRCROOT> <SRCROOT>${env.JV_SRCROOT}</SRCROOT>
<TOOLROOT>${env.JV_TOOLROOT}</TOOLROOT> <TOOLROOT>${env.JV_TOOLROOT}</TOOLROOT>
<gfbase>${env.JV_GFBASE}</gfbase>
<!-- this file is created by ant task in top pom, and used to filter resources: --> <!-- this file is created by ant task in top pom, and used to filter resources: -->
<version.properties>${SRCROOT}/bld/version.properties</version.properties> <version.properties>${SRCROOT}/bld/version.properties</version.properties>

0
nbactions.xml Executable file → Normal file
View File

View File

@ -11,7 +11,6 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -55,9 +54,8 @@
<version>3.0</version> <version>3.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
<version>1.1</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -107,16 +107,26 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>bpelmodel</artifactId> <artifactId>bpelmodel</artifactId>
</dependency> </dependency>
--> -->
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>org.glassfish</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>javax.management.j2ee</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jbicompsplatform</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>compileconf</artifactId> <artifactId>jbi-admin-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>

View File

@ -119,7 +119,7 @@
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>

View File

@ -124,7 +124,6 @@
</goals> </goals>
<configuration> <configuration>
<tasks> <tasks>
<property name="derbylibs" value="${JV_GFBASE}/javadb/lib" />
<property name="derbydb" value="${project.build.directory}/javadb" /> <property name="derbydb" value="${project.build.directory}/javadb" />
<patternset id="jbicomps.junit.test.patternset" > <patternset id="jbicomps.junit.test.patternset" >
@ -142,7 +141,6 @@
<property name="project.build.testSourceDirectory" value="${project.build.testSourceDirectory}" /> <property name="project.build.testSourceDirectory" value="${project.build.testSourceDirectory}" />
<property name="work.dir" value="${project.build.directory}" /> <property name="work.dir" value="${project.build.directory}" />
<property name="derbylibs" value="${derbylibs}" />
<property name="derbydb" value="${derbydb}" /> <property name="derbydb" value="${derbydb}" />
<!-- no junit system properties are needed: --> <!-- no junit system properties are needed: -->
@ -170,10 +168,6 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>debuggerbdi</artifactId> <artifactId>debuggerbdi</artifactId>
@ -225,7 +219,6 @@
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>js-engine</groupId> <groupId>js-engine</groupId>

View File

@ -249,7 +249,6 @@
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.0</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -103,10 +103,8 @@
</goals> </goals>
<configuration> <configuration>
<tasks> <tasks>
<property name="derbylibs" value="${gfbase}/javadb/lib"/>
<property name="derbydb" value="${project.build.directory}/javadb"/> <property name="derbydb" value="${project.build.directory}/javadb"/>
<property name="junit.srcroot" value="${SRCROOT}"/> <property name="junit.srcroot" value="${SRCROOT}"/>
<property name="junit.gfbase" value="${gfbase}"/>
<property name="junit.suite.classpath" refid="maven.test.classpath"/> <property name="junit.suite.classpath" refid="maven.test.classpath"/>
<patternset id="jbicomps.junit.test.patternset"> <patternset id="jbicomps.junit.test.patternset">
<include name="**/*Test.java"/> <include name="**/*Test.java"/>
@ -119,11 +117,9 @@
<property name="project.build.directory" value="${project.build.directory}"/> <property name="project.build.directory" value="${project.build.directory}"/>
<property name="project.build.testSourceDirectory" value="${project.build.testSourceDirectory}"/> <property name="project.build.testSourceDirectory" value="${project.build.testSourceDirectory}"/>
<property name="work.dir" value="${project.build.directory}"/> <property name="work.dir" value="${project.build.directory}"/>
<property name="derbylibs" value="${derbylibs}"/>
<property name="derbydb" value="${derbydb}"/> <property name="derbydb" value="${derbydb}"/>
<propertyset id="jbicomps.junit.sysproperties"> <propertyset id="jbicomps.junit.sysproperties">
<propertyref name="junit.srcroot"/> <propertyref name="junit.srcroot"/>
<propertyref name="junit.gfbase"/>
<propertyref name="junit.suite.classpath"/> <propertyref name="junit.suite.classpath"/>
</propertyset> </propertyset>
<reference refid="maven.test.classpath"/> <reference refid="maven.test.classpath"/>

View File

@ -160,12 +160,6 @@ java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg(
</build> </build>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- <dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency> -->
<dependency> <dependency>
<groupId>org.apache.ant</groupId> <groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId> <artifactId>ant</artifactId>
@ -283,11 +277,6 @@ java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg(
<version>1.6.1</version> <version>1.6.1</version>
</dependency> </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.2</version>
</dependency>
<dependency> <dependency>
<groupId>com.sun.xml.bind</groupId> <groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId> <artifactId>jaxb-xjc</artifactId>
@ -549,27 +538,43 @@ java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg(
<artifactId>serializer</artifactId> <artifactId>serializer</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<!-- open-esb dependency versions: -->
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-ext</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-admin-common</artifactId>
<version>1.1</version>
</dependency>
<dependency> <dependency>
<groupId>opensymphony</groupId> <groupId>opensymphony</groupId>
<artifactId>quartz-all</artifactId> <artifactId>quartz-all</artifactId>
<version>1.6.1</version> <version>1.6.1</version>
</dependency> </dependency>
<dependency>
<groupId>net.java.hulp.i18ntask</groupId>
<artifactId>net.java.hulp.i18ntask</artifactId>
<version>${I18NTASK_VERSION}</version>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<!-- open-esb dependency versions: -->
<dependency>
<groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId>
<version>${openesb-core-version}</version>
</dependency>
<dependency>
<groupId>net.open-esb.core</groupId>
<artifactId>jbi-ext</artifactId>
<version>${openesb-core-version}</version>
</dependency>
<dependency>
<groupId>net.open-esb.core</groupId>
<artifactId>jbi-admin-common</artifactId>
<version>${openesb-core-version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -85,11 +85,7 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>jbicompsplatform</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
@ -120,5 +116,35 @@
<groupId>xalan</groupId> <groupId>xalan</groupId>
<artifactId>xalan</artifactId> <artifactId>xalan</artifactId>
</dependency> </dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>glassfish</groupId>
<artifactId>appserv-rt</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>glassfish</groupId>
<artifactId>appserv-admin</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>glassfish</groupId>
<artifactId>appserv-se</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>glassfish</groupId>
<artifactId>appserv-ext</artifactId>
<version>1.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -55,10 +55,6 @@
<groupId>xerces</groupId> <groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>camimpl</artifactId> <artifactId>camimpl</artifactId>

View File

@ -52,11 +52,7 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>jbicompsplatform</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -100,11 +100,6 @@
</dependency>--> </dependency>-->
<!-- TEST DEPENDENCIES--> <!-- TEST DEPENDENCIES-->
<!--<dependency> <!--<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jmock</groupId> <groupId>jmock</groupId>
<artifactId>jmock</artifactId> <artifactId>jmock</artifactId>
<scope>test</scope> <scope>test</scope>

View File

@ -231,13 +231,11 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency>--> </dependency>-->
</dependencies> </dependencies>

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
name="compileconf" default="run">
<target name="create-compileconf" >
<!-- initialize properties for compileconf jar: -->
<pathconvert property="compileconf_dir">
<path>
<pathelement location="${maven.repo.local}/jbicompsplatform/compileconf/${jbicomps.currentVersion}"/>
</path>
</pathconvert>
<property name="compileconf_jar"
value="${project.build.directory}${file.separator}compileconf-${jbicomps.currentVersion}.jar"
/>
<mkdir dir="${project.build.directory}"/>
<!--
# prime maven repository with appserver jars that we link against
# we do a clean install to avoid upgrade/downgrade issues:
-->
<delete dir="${compileconf_dir}" />
<copy todir="${compileconf_dir}" preservelastmodified="true" overwrite="false" >
<fileset dir="${gfbase}/lib" >
<!-- files common to ee81 and glassfish -->
<include name="activation.jar"/>
<include name="ant/lib/ant.jar"/>
<include name="appserv-admin.jar"/>
<include name="appserv-rt.jar"/>
<include name="j2ee.jar"/>
<include name="jmxremote_optional.jar"/>
<include name="mail.jar"/>
<!-- files specific to ee81 -->
<include name="dom.jar"/>
<include name="jaxrpc-impl.jar"/>
<include name="jmxremote.jar"/>
<include name="saaj-impl.jar"/>
<include name="xalan.jar"/>
<include name="xercesImpl.jar"/>
<!-- files specific to glassfish -->
<include name="appserv-deployment-client.jar"/>
<include name="appserv-ext.jar"/>
<include name="appserv-se.jar"/>
<include name="javaee.jar"/>
<include name="jsf-impl.jar"/>
<include name="webservices-rt.jar"/>
</fileset>
</copy>
<!-- prime maven repository with imq jars that we link against -->
<copy todir="${compileconf_dir}" preservelastmodified="true" overwrite="false" >
<fileset dir="${gfbase}/imq/lib" >
<!-- files common to ee81 and glassfish -->
<include name="imq.jar"/>
</fileset>
</copy>
<!-- prime maven repository with jbi jars that we link against -->
<!--
<copy todir="${compileconf_dir}" preservelastmodified="true" overwrite="false" >
<fileset dir="${gfbase}/jbi/lib" >
<include name="jbi.jar"/>
<include name="jbi-admin-common.jar"/>
</fileset>
</copy>
-->
<!--
# create compileconf.jar in 4 steps.
-->
<!-- 1. set list of jars to include in the manifest class-path: -->
<fileset id="jarlist" dir="${compileconf_dir}">
<include name="**/*.jar"/>
</fileset>
<!-- 2. delete the old jar if it is there: -->
<delete file="${compileconf_jar}" />
<!-- 3. convert classpath to relative files names: -->
<pathconvert dirsep="/" pathsep=" " property="jarlist" refid="jarlist">
<!-- note: "from" attribute must be in local path format. RT 5/16/06 -->
<map from="${compileconf_dir}${file.separator}" to="" />
</pathconvert>
<!-- 4. create the jar.
# NOTE: jar manifest classpaths are NOT recognized by javac prior to JDK 5.0.
# See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212732
-->
<jar destfile="${compileconf_jar}">
<manifest>
<attribute name="Class-Path" value= "${jarlist}" />
</manifest>
</jar>
<echo message="Compile Classpath is ${jarlist}, output is ${compileconf_jar}" />
</target>
</project>

View File

@ -45,39 +45,6 @@
<plugin> <plugin>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions> <executions>
<execution>
<id>top_clean</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="${SRCROOT}/global-common/m2.ant" dir="${basedir}" target="clean_top" >
<property name="SRCROOT" value="${SRCROOT}" />
<property name="maven.repo.local" value="${maven.repo.local}" />
</ant>
</tasks>
</configuration>
</execution>
<execution>
<id>${project.artifactId}-create-jar</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="m2.ant" dir="${basedir}" target="create-compileconf" >
<property environment="env" />
<property name="gfbase" value="${gfbase}" />
<property name="maven.repo.local" value="${maven.repo.local}" />
<property name="jbicomps.currentVersion" value="${jbicomps.currentVersion}" />
<property name="project.build.directory" value="${project.build.directory}" />
</ant>
</tasks>
</configuration>
</execution>
<execution> <execution>
<id>download-ojdbc5</id> <id>download-ojdbc5</id>
<phase>clean</phase> <phase>clean</phase>
@ -249,21 +216,6 @@
<file>${SRCROOT}/ojc-core/vendor-libs/woodstock/jars/webui-jsf-4.0.jar</file> <file>${SRCROOT}/ojc-core/vendor-libs/woodstock/jars/webui-jsf-4.0.jar</file>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>install-compileconf</id>
<phase>clean</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<generatePom>true</generatePom>
<packaging>jar</packaging>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
<version>${jbicomps.currentVersion}</version>
<file>${project.build.directory}${file.separator}compileconf-${jbicomps.currentVersion}.jar</file>
</configuration>
</execution>
<execution> <execution>
<id>install-jinterop-j-interop</id> <id>install-jinterop-j-interop</id>
<phase>clean</phase> <phase>clean</phase>
@ -804,51 +756,10 @@
</execution> </execution>
<!-- OPEN-ESB dependencies --> <!-- OPEN-ESB dependencies -->
<execution> <!-- openesb-core/jbi/api -->
<id>install-jbi</id> <!-- openesb-core/esb-packages/jbi-ext -->
<phase>clean</phase> <!-- openesb-core/ri-clients/jbi-admin-common -->
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<generatePom>true</generatePom>
<packaging>jar</packaging>
<groupId>open-esb</groupId>
<artifactId>jbi</artifactId>
<version>${OPEN_ESB_VERSION}</version>
<file>${gfbase}/jbi/lib/jbi.jar</file>
</configuration>
</execution>
<execution>
<id>install-jbi-ext</id>
<phase>clean</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<generatePom>true</generatePom>
<packaging>jar</packaging>
<groupId>open-esb</groupId>
<artifactId>jbi-ext</artifactId>
<version>${OPEN_ESB_VERSION}</version>
<file>${gfbase}/jbi/lib/jbi-ext.jar</file>
</configuration>
</execution>
<execution>
<id>install-jbi-admin-common</id>
<phase>clean</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<generatePom>true</generatePom>
<packaging>jar</packaging>
<groupId>open-esb</groupId>
<artifactId>jbi-admin-common</artifactId>
<version>1.1</version>
<file>${gfbase}/jbi/lib/jbi-admin-common.jar</file>
</configuration>
</execution>
<execution> <execution>
<id>install-hulp-meas-itf</id> <id>install-hulp-meas-itf</id>
<phase>clean</phase> <phase>clean</phase>

View File

@ -102,7 +102,7 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -77,13 +77,12 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.hulp.i18ntask</groupId> <groupId>net.java.hulp.i18ntask</groupId>
<artifactId>net.java.hulp.i18ntask</artifactId> <artifactId>net.java.hulp.i18ntask</artifactId>
<version>2.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>

View File

@ -93,7 +93,7 @@
<artifactId>wsdl4j</artifactId> <artifactId>wsdl4j</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<!-- TEST DEPENDENCIES--> <!-- TEST DEPENDENCIES-->

View File

@ -79,13 +79,12 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.hulp.i18ntask</groupId> <groupId>net.java.hulp.i18ntask</groupId>
<artifactId>net.java.hulp.i18ntask</artifactId> <artifactId>net.java.hulp.i18ntask</artifactId>
<version>2.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>

View File

@ -64,10 +64,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>

View File

@ -72,6 +72,7 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId> <artifactId>servlet-api</artifactId>
<version>2.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -71,7 +71,7 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -84,7 +84,7 @@
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi</artifactId> <artifactId>jbi</artifactId>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -58,14 +58,9 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>wsdl4j</groupId> <groupId>wsdl4j</groupId>

View File

@ -192,13 +192,11 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -56,10 +56,6 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -68,10 +68,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -143,10 +143,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -144,10 +144,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -137,10 +137,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -145,10 +145,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -143,10 +143,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>

View File

@ -59,10 +59,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>

View File

@ -77,10 +77,6 @@
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>etlmonitor</artifactId> <artifactId>etlmonitor</artifactId>
@ -118,6 +114,16 @@
<artifactId>webui-jsf</artifactId> <artifactId>webui-jsf</artifactId>
<version>4.0</version> <version>4.0</version>
</dependency> </dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies> </dependencies>
<properties> <properties>
<msgs.package>com/sun/jbi/cam/plugin/etlse/model</msgs.package> <msgs.package>com/sun/jbi/cam/plugin/etlse/model</msgs.package>

View File

@ -171,11 +171,6 @@
<version>build210</version> <version>build210</version>
</dependency> </dependency>
<!-- TEST DEPENDENCIES--> <!-- TEST DEPENDENCIES-->
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>jmock</groupId> <groupId>jmock</groupId>
<artifactId>jmock</artifactId> <artifactId>jmock</artifactId>

View File

@ -180,12 +180,18 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>compositelock</artifactId> <artifactId>compositelock</artifactId>
</dependency> </dependency>
<!-- TEST DEPENDENCIES-->
<dependency> <dependency>
<groupId>jbicompsplatform</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>compileconf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<scope>test</scope> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional>
</dependency>
<!-- TEST DEPENDENCIES-->
<dependency> <dependency>
<groupId>jmock</groupId> <groupId>jmock</groupId>
<artifactId>jmock</artifactId> <artifactId>jmock</artifactId>
@ -198,20 +204,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>

View File

@ -163,13 +163,11 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -93,10 +93,10 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi-ext</artifactId> <artifactId>jbi-ext</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>qos</artifactId> <artifactId>qos</artifactId>
@ -106,7 +106,17 @@
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>compositelock</artifactId> <artifactId>compositelock</artifactId>
</dependency> </dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
</dependency>
<!-- TEST DEPENDENCIES-->
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId> <artifactId>derbyclient</artifactId>
@ -122,23 +132,5 @@
<artifactId>ant-junit</artifactId> <artifactId>ant-junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<optional>true</optional>
</dependency>
<!-- TEST DEPENDENCIES-->
<dependency>
<groupId>com.sun.jbi</groupId>
<artifactId>componentsl</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -199,13 +199,11 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -145,11 +145,6 @@
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jbicompsplatform</groupId>
<artifactId>compileconf</artifactId>
</dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>encoder-fw</artifactId> <artifactId>encoder-fw</artifactId>
@ -183,19 +178,14 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<!-- TEST DEPENDENCIES--> <!-- TEST DEPENDENCIES-->
<dependency> <dependency>
<groupId>jmock</groupId> <groupId>jmock</groupId>
<artifactId>jmock</artifactId> <artifactId>jmock</artifactId>

View File

@ -216,13 +216,11 @@
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId> <artifactId>net.sf.hulp.meas.itf</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.hulp.meas</groupId> <groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.impl</artifactId> <artifactId>net.sf.hulp.meas.impl</artifactId>
<optional>true</optional> <optional>true</optional>
<version>2.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

3
ojc-core/httpsoapbc/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
!.gitignore
target/

View File

@ -1,157 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
# BEGIN_HEADER - DO NOT EDIT
#
# The contents of this file are subject to the terms
# of the Common Development and Distribution License
# (the "License"). You may not use this file except
# in compliance with the License.
#
# You can obtain a copy of the license at
# https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
# See the License for the specific language governing
# permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# HEADER in each file and include the License file at
# https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
# If applicable add the following below this CDDL HEADER,
# with the fields enclosed by brackets "[]" replaced with
# your own identifying information: Portions Copyright
# [year] [name of copyright owner]
-->
<!--
# @(#)pom.xml
# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.
#
# END_HEADER - DO NOT EDIT
-->
<project> <project>
<parent>
<artifactId>build-common</artifactId>
<groupId>open-jbi-components</groupId>
<version>1.1</version>
<relativePath>../../build-common</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>open-jbi-components</groupId>
<parent>
<groupId>net.open-esb.components.httpbc</groupId>
<artifactId>parent</artifactId>
<version>${httpsoapbc.artifact.version}</version>
</parent>
<artifactId>httpsoapbcimpl</artifactId> <artifactId>httpsoapbcimpl</artifactId>
<name>httpsoapbcimpl</name> <name>OpenESB - Components - HTTPBC - Implementation</name>
<version>${httpsoapbc.artifact.version}</version> <version>${httpsoapbc.artifact.version}</version>
<description>httpsoapbcimpl description</description> <description>httpsoapbcimpl description</description>
<properties> <properties>
<component.name>sun-http-binding</component.name> <component.name>sun-http-binding</component.name>
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}-ant-junit</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<patternset id="jbicomps.junit.test.patternset" >
<exclude name="**/framework/*.java"/>
<exclude name="**/integrationtest/*.java"/>
<exclude name="**/test/jbi/integration/**/*.java"/>
<include name="**/*Test*.java"/>
</patternset>
<ant antfile="${SRCROOT}/global-common/m2.ant"
dir="${project.build.sourceDirectory}/.." target="run_junit" >
<property name="maven.test.skip" value="${maven.test.skip}" />
<property name="maven.repo.local" value="${maven.repo.local}" />
<property name="project.artifactId" value="${project.artifactId}" />
<property name="project.build.directory" value="${project.build.directory}" />
<property name="project.build.testSourceDirectory" value="${project.build.testSourceDirectory}" />
<!-- no junit system properties are needed: -->
<propertyset id="jbicomps.junit.sysproperties" />
<reference refid="maven.test.classpath"/>
<reference refid="jbicomps.junit.sysproperties"/>
<reference refid="jbicomps.junit.test.patternset"/>
</ant>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration> <configuration>
<archive> <archive>
<manifestEntries> <manifestEntries>
<Component-Version>${httpbc.artifact.version}</Component-Version> <Component-Version>${project.version}</Component-Version>
<Component-Name>${component.name}</Component-Name> <Component-Name>${component.name}</Component-Name>
</manifestEntries> </manifestEntries>
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<skip>true</skip> <excludes>
<exclude>**/framework/*.java</exclude>
<exclude>**/integrationtest/*.java</exclude>
<exclude>**/test/jbi/integration/**/*.java</exclude>
<exclude>**/validator/*.java</exclude>
</excludes>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<!-- OpenESB Components Common dependencies -->
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>open-jbi-components</groupId>
<artifactId>componentsl</artifactId> <artifactId>componentsl</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jbicompsplatform</groupId> <groupId>open-jbi-components</groupId>
<artifactId>compileconf</artifactId> <artifactId>qos</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>sun-identity</groupId> <groupId>open-jbi-components</groupId>
<artifactId>amclientsdk</artifactId> <artifactId>common-util</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>open-esb</groupId>
<artifactId>jbi-ext</artifactId>
</dependency> </dependency>
<!-- Metro dependencies -->
<dependency> <dependency>
<groupId>org.glassfish.metro</groupId> <groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId> <artifactId>webservices-rt</artifactId>
<version>2.2.0-4</version>
</dependency> </dependency>
<!-- TEST DEPENDENCIES--> <!-- Grizzly dependencies -->
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
</dependency>
<!-- Glassfish dependencies -->
<!-- Must be used only in the case of Glassfish container -->
<dependency>
<groupId>org.glassfish.main.security</groupId>
<artifactId>security-ee</artifactId>
<version>4.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sf.hulp.meas</groupId>
<artifactId>net.sf.hulp.meas.itf</artifactId>
</dependency>
<dependency>
<groupId>net.open-esb.core</groupId>
<artifactId>jbi-ext</artifactId>
</dependency>
<!-- TEST DEPENDENCIES -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>jmock</groupId> <groupId>jmock</groupId>
<artifactId>jmock</artifactId> <artifactId>jmock</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-esb</groupId> <groupId>net.open-esb.core</groupId>
<artifactId>jbi-admin-common</artifactId> <artifactId>jbi-admin-common</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>open-jbi-components</groupId> <groupId>org.apache.ant</groupId>
<artifactId>qos</artifactId> <artifactId>ant</artifactId>
</dependency> <version>1.9.4</version>
<dependency> <scope>test</scope>
<groupId>open-jbi-components</groupId>
<artifactId>common-util</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -1,449 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)BCCoyoteConnector.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import java.util.Timer;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Request;
import org.apache.catalina.Response;
import org.apache.coyote.tomcat5.CoyoteConnector;
import org.apache.coyote.tomcat5.CoyoteResponse;
import com.sun.jbi.httpsoapbc.HttpSoapBindingLifeCycle;
public class BCCoyoteConnector extends CoyoteConnector{
private static final String USE_COYOTE_CONNECTOR =
"com.sun.enterprise.web.connector.useCoyoteConnector";
private static final String GRIZZLY_CONNECTOR =
"com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol";
/**
* Are we recycling objects
*/
protected boolean recycleObjects;
/**
* The number of acceptor threads.
*/
protected int maxAcceptWorkerThreads;
/**
* The number of reader threads.
*/
protected int maxReadWorkerThreads;
/**
* The request timeout value used by the processor threads.
*/
protected int processorWorkerThreadsTimeout;
/**
* The increment number used by the processor threads.
*/
protected int minProcessorWorkerThreadsIncrement;
/**
* The size of the accept queue.
*/
protected int minAcceptQueueLength;
/**
* The size of the read queue
*/
protected int minReadQueueLength;
/**
* The size of the processor queue.
*/
protected int minProcessorQueueLength;
/**
* Use direct or non direct byte buffer.
*/
protected boolean useDirectByteBuffer;
/*
* Number of seconds before idle keep-alive connections expire
*/
private int keepAliveTimeoutInSeconds;
/*
* Number of keep-alive threads
*/
private int keepAliveThreadCount;
/*
* Specifies whether response chunking is enabled/disabled
*/
private boolean chunkingDisabled;
/**
* Maximum pending connection before refusing requests.
*/
private int maxPendingCount = 4096;
/**
* Set the number of <code>Selector</code> used by Grizzly.
*/
public int selectorReadThreadsCount = 0;
private int maxQueueSizeInBytes = -1;
private HttpSoapBindingLifeCycle lifeCycle;
public BCCoyoteConnector(HttpSoapBindingLifeCycle lifeCycle) {
boolean coyoteOn = false;
if (System.getProperty(USE_COYOTE_CONNECTOR) != null){
coyoteOn =
Boolean.valueOf(System.getProperty(USE_COYOTE_CONNECTOR))
.booleanValue();
}
// By default, turn on the Coyote Connector
if (!coyoteOn)
setProtocolHandlerClassName(GRIZZLY_CONNECTOR);
this.lifeCycle = lifeCycle;
}
/**
* Enables or disables chunked encoding for any responses returned by this
* Connector.
*
* @param chunkingDisabled true if chunking is to be disabled, false
* otherwise
*/
public void setChunkingDisabled(boolean chunkingDisabled) {
this.chunkingDisabled = chunkingDisabled;
}
/**
* @return true if chunking is disabled on this Connector, and false
* otherwise
*/
public boolean isChunkingDisabled() {
return this.chunkingDisabled;
}
/**
* Create (or allocate) and return a Request object suitable for
* specifying the contents of a Request to the responsible Container.
*/
public Request createRequest() {
BCCoyoteRequest request = new BCCoyoteRequest();
request.setConnector(this);
return (request);
}
/**
* Creates and returns Response object.
*
* @return Response object
*/
public Response createResponse() {
//CoyoteResponse response = new CoyoteResponse(isChunkingDisabled());
CoyoteResponse response = new BCCoyoteResponse(isChunkingDisabled());
response.setConnector(this);
return (response);
}
/**
* Gets the number of seconds before a keep-alive connection that has
* been idle times out and is closed.
*
* @return Keep-alive timeout in number of seconds
*/
public int getKeepAliveTimeoutInSeconds() {
return keepAliveTimeoutInSeconds;
}
/**
* Sets the number of seconds before a keep-alive connection that has
* been idle times out and is closed.
*
* @param timeout Keep-alive timeout in number of seconds
*/
public void setKeepAliveTimeoutInSeconds(int timeout) {
keepAliveTimeoutInSeconds = timeout;
setProperty("keepAliveTimeoutInSeconds", String.valueOf(timeout));
}
/**
* Gets the number of keep-alive threads.
*
* @return Number of keep-alive threads
*/
public int getKeepAliveThreadCount() {
return keepAliveThreadCount;
}
/**
* Sets the number of keep-alive threads.
*
* @param threadCount Number of keep-alive threads
*/
public void setKeepAliveThreadCount(int threadCount) {
keepAliveThreadCount = threadCount;
setProperty("keepAliveThreadCount", String.valueOf(threadCount));
}
/**
* Set the maximum pending connection this <code>Connector</code>
* can handle.
*/
public void setMaxPendingConnection(int maxPendingCount){
this.maxPendingCount = maxPendingCount;
setProperty("maxPendingConnection", String.valueOf(maxPendingCount));
}
/**
* Return the maximum pending connection.
*/
public int getMaxPendingConnection(){
return maxPendingCount;
}
/**
* Set the <code>recycle-tasks</code> used by this <code>Selector</code>
*/
public void setRecycleObjects(boolean recycleObjects){
this.recycleObjects= recycleObjects;
setProperty("recycleObjects",
String.valueOf(recycleObjects));
}
/**
* Return the <code>recycle-tasks</code> used by this
* <code>Selector</code>
*/
public boolean getRecycleObjects(){
return recycleObjects;
}
/**
* Set the <code>reader-thread</code> from domian.xml.
*/
public void setMaxReadWorkerThreads(int maxReadWorkerThreads){
this.maxReadWorkerThreads = maxReadWorkerThreads;
setProperty("maxReadWorkerThreads",
String.valueOf(maxReadWorkerThreads));
}
/**
* Return the <code>read-thread</code> used by this <code>Selector</code>
*/
public int getMaxReadWorkerThreads(){
return maxReadWorkerThreads;
}
/**
* Set the <code>reader-thread</code> from domian.xml.
*/
public void setMaxAcceptWorkerThreads(int maxAcceptWorkerThreads){
this.maxAcceptWorkerThreads = maxAcceptWorkerThreads;
setProperty("maxAcceptWorkerThreads",
String.valueOf(maxAcceptWorkerThreads));
}
/**
* Return the <code>read-thread</code> used by this <code>Selector</code>
*/
public int getMaxAcceptWorkerThreads(){
return maxAcceptWorkerThreads;
}
/**
* Set the <code>acceptor-queue-length</code> value
* on this <code>Selector</code>
*/
public void setMinAcceptQueueLength(int minAcceptQueueLength){
this.minAcceptQueueLength = minAcceptQueueLength;
setProperty("minAcceptQueueLength",
String.valueOf(minAcceptQueueLength));
}
/**
* Return the <code>acceptor-queue-length</code> value
* on this <code>Selector</code>
*/
public int getMinAcceptQueueLength(){
return minAcceptQueueLength;
}
/**
* Set the <code>reader-queue-length</code> value
* on this <code>Selector</code>
*/
public void setMinReadQueueLength(int minReadQueueLength){
this.minReadQueueLength = minReadQueueLength;
setProperty("minReadQueueLength",
String.valueOf(minReadQueueLength));
}
/**
* Return the <code>reader-queue-length</code> value
* on this <code>Selector</code>
*/
public int getMinReadQueueLength(){
return minReadQueueLength;
}
/**
* Set the <code>processor-queue-length</code> value
* on this <code>Selector</code>
*/
public void setMinProcessorQueueLength(int minProcessorQueueLength){
this.minProcessorQueueLength = minProcessorQueueLength;
setProperty("minProcessorQueueLength",
String.valueOf(minProcessorQueueLength));
}
/**
* Return the <code>processor-queue-length</code> value
* on this <code>Selector</code>
*/
public int getMinProcessorQueueLength(){
return minProcessorQueueLength;
}
/**
* Set the <code>use-nio-non-blocking</code> by this <code>Selector</code>
*/
public void setUseDirectByteBuffer(boolean useDirectByteBuffer){
this.useDirectByteBuffer = useDirectByteBuffer;
setProperty("useDirectByteBuffer",
String.valueOf(useDirectByteBuffer));
}
/**
* Return the <code>use-nio-non-blocking</code> used by this
* <code>Selector</code>
*/
public boolean getUseDirectByteBuffer(){
return useDirectByteBuffer;
}
public void setProcessorWorkerThreadsTimeout(int timeout){
this.processorWorkerThreadsTimeout = timeout;
setProperty("processorWorkerThreadsTimeout",
String.valueOf(timeout));
}
public int getProcessorWorkerThreadsTimeout(){
return processorWorkerThreadsTimeout;
}
public void setProcessorWorkerThreadsIncrement(int increment){
this.minProcessorWorkerThreadsIncrement = increment;
setProperty("processorThreadsIncrement",
String.valueOf(increment));
}
public int getMinProcessorWorkerThreadsIncrement(){
return minProcessorWorkerThreadsIncrement;
}
public void setSelectorReadThreadsCount(int selectorReadThreadsCount){
setProperty("selectorReadThreadsCount",
String.valueOf(selectorReadThreadsCount));
}
public void start() throws LifecycleException {
super.start();
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol protocolHandler =
(com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol)getProtocolHandler();
com.sun.enterprise.web.connector.grizzly.SelectorThread selThread = protocolHandler.selectorThread();
if (selThread.getProcessorPipeline() instanceof LinkedListThrottlePipeline) {
LinkedListThrottlePipeline pipeline = (LinkedListThrottlePipeline)selThread.getProcessorPipeline();
pipeline.setHttpSoapBindingLifeCycle(lifeCycle);
}
}
public void stop() throws LifecycleException {
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol protocolHandler =
(com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol)getProtocolHandler();
com.sun.enterprise.web.connector.grizzly.SelectorThread selThread = protocolHandler.selectorThread();
if (selThread.getProcessorPipeline() instanceof LinkedListThrottlePipeline) {
LinkedListThrottlePipeline pipeline = (LinkedListThrottlePipeline)selThread.getProcessorPipeline();
pipeline.cleanup();
}
super.stop();
}
}

View File

@ -1,345 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)BCCoyoteRequest.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import com.sun.jbi.internationalization.Messages;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Logger;
import java.util.logging.Level;
import javax.servlet.ServletRequest;
import javax.servlet.http.Cookie;
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
import org.apache.coyote.tomcat5.CoyoteRequest;
import org.apache.coyote.tomcat5.CoyoteResponse;
import org.apache.coyote.tomcat5.CoyoteConnector;
import org.apache.coyote.tomcat5.CoyoteInputStream;
import org.apache.coyote.tomcat5.CoyoteReader;
import org.apache.coyote.tomcat5.InputBuffer;
import org.apache.tomcat.util.http.Parameters;
import com.sun.enterprise.web.PwcWebModule;
import com.sun.enterprise.web.session.SessionCookieConfig;
/**
* Customized version of the Tomcat 5 CoyoteRequest
* This is required for supporting Web Programmatic Login and setting the
* request encoding (charset).
*
*/
public class BCCoyoteRequest extends CoyoteRequest {
private static final Messages mMessages =
Messages.getMessages(BCCoyoteRequest.class);
//private static Logger logger = LogDomains.getLogger(LogDomains.PWC_LOGGER);
private final static Logger logger =
Messages.getLogger(BCCoyoteRequest.class);
private boolean requestEncodingSet = false;
// START SJSAS 6346738
private byte[] formData = null;
private int formDataLen = 0;
// END SJSAS 6346738
public void setContext(Context ctx) {
super.setContext(ctx);
CoyoteResponse response = (CoyoteResponse) getResponse();
// Assert response!=null
if (response != null) {
String[] cacheControls = ((PwcWebModule) ctx).getCacheControls();
for (int i=0; cacheControls!=null && i<cacheControls.length; i++) {
response.addHeader("Cache-Control", cacheControls[i]);
}
}
requestEncodingSet = false;
}
public BufferedReader getReader() throws IOException {
setRequestEncoding();
return super.getReader();
}
/**
* Return the character encoding for this Request.
*
* If there is no request charset specified in the request, determines and
* sets the request charset using the locale-charset-info,
* locale-charset-map, and parameter-encoding elements provided in the
* sun-web.xml.
*/
public String getCharacterEncoding() {
String enc = super.getCharacterEncoding();
if (enc != null) {
return enc;
}
setRequestEncoding();
return super.getCharacterEncoding();
}
/*
* Configures the given JSESSIONID cookie with the cookie-properties from
* sun-web.xml.
*
* @param cookie The JSESSIONID cookie to be configured
*/
public void configureSessionCookie(Cookie cookie) {
super.configureSessionCookie(cookie);
PwcWebModule wm = (PwcWebModule) getContext();
SessionCookieConfig cookieConfig = wm.getSessionCookieConfig();
if (cookieConfig != null) {
String name = cookieConfig.getName();
if (name != null && !name.equals(Globals.SESSION_COOKIE_NAME)) {
logger.log(Level.WARNING,
"HTTPBC-W00619.Illegal_cookie_name",
new String[] { name, Globals.SESSION_COOKIE_NAME });
}
if (cookieConfig.getPath() != null) {
cookie.setPath(cookieConfig.getPath());
}
cookie.setMaxAge(cookieConfig.getMaxAge());
if (cookieConfig.getDomain() != null) {
cookie.setDomain(cookieConfig.getDomain());
}
if (cookieConfig.getComment() != null) {
cookie.setVersion(1);
cookie.setComment(cookieConfig.getComment());
}
}
}
// START SJSAS 6346738
public void recycle() {
super.recycle();
formDataLen = 0;
}
// END SJSAS 6346738
/**
* If there is no request charset specified in the request, determines and
* sets the request charset using the locale-charset-info,
* locale-charset-map, and parameter-encoding elements provided in the
* sun-web.xml.
*/
private void setRequestEncoding() {
if (requestEncodingSet) {
return;
}
requestEncodingSet = true;
if (super.getCharacterEncoding() != null) {
return;
}
PwcWebModule wm = (PwcWebModule) getContext();
String encoding = getFormHintFieldEncoding(wm);
if (encoding == null) {
encoding = wm.getDefaultCharset();
if (encoding == null && wm.hasLocaleToCharsetMapping()) {
encoding = wm.mapLocalesToCharset(getLocales());
}
}
if (encoding != null) {
try {
setCharacterEncoding(encoding);
} catch (UnsupportedEncodingException uee) {
if (logger.isLoggable(Level.WARNING)) {
String text = mMessages.getString("HTTPBC-W00611.Unsupported_character_encoding", new Object[] { encoding, uee.getLocalizedMessage() } );
logger.log(Level.WARNING, "text", uee);
}
}
}
}
/*
* Returns the value of the query parameter whose name
* corresponds to the value of the form-hint-field attribute of the
* <parameter-encoding> element in sun-web.xml.
*
* @return The value of the query parameter whose name corresponds to the
* value of the form-hint-field attribute in sun-web.xml, or null if the
* request does not have any query string, or the query string does not
* contain a query parameter with that name
*/
private String getFormHintFieldEncoding(PwcWebModule wm) {
String encoding = null;
String formHintField = wm.getFormHintField();
if (formHintField == null){
return null;
}
if ("POST".equalsIgnoreCase(getMethod())) {
// POST
encoding = getPostDataEncoding(formHintField);
} else {
String query = getQueryString();
if (query != null) {
encoding = parseFormHintField(query, formHintField);
}
}
return encoding;
}
private String getPostDataEncoding(String formHintField) {
if (!getMethod().equalsIgnoreCase("POST")) {
return null;
}
String contentType = getContentType();
if (contentType == null)
contentType = "";
int semicolon = contentType.indexOf(';');
if (semicolon >= 0) {
contentType = contentType.substring(0, semicolon).trim();
} else {
contentType = contentType.trim();
}
if (!("application/x-www-form-urlencoded".equals(contentType))) {
return null;
}
int len = getContentLength();
if (len <= 0) {
return null;
}
int maxPostSize = ((CoyoteConnector) connector).getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
if (logger.isLoggable(Level.WARNING)) {
logger.log(Level.WARNING, "HTTPBC-W00610.Post_size_too_large",
new Object[] { Integer.valueOf(len), Integer.valueOf(maxPostSize) });
}
throw new IllegalStateException("Post too large");
}
String encoding = null;
try {
formData = null;
if (len < CACHED_POST_LEN) {
if (postData == null)
postData = new byte[CACHED_POST_LEN];
formData = postData;
} else {
formData = new byte[len];
}
int actualLen = readPostBody(formData, len);
if (actualLen == len) {
// START SJSAS 6346738
formDataLen = actualLen;
// END SJSAS 6346738
String formDataString = new String(formData).substring(0, len);
encoding = parseFormHintField(formDataString, formHintField);
}
} catch (Throwable t) {
; // Ignore
}
return encoding;
}
/*
* Parses the value of the specified form-hint-field from the given
* parameter string.
*
* @param paramsString Parameter string
* @param formHintField From-hint-field
*
* @return Value of form-hint-field, or null if not found
*/
private String parseFormHintField(String paramsString,
String formHintField) {
String encoding = null;
formHintField += "=";
int index = paramsString.indexOf(formHintField);
if (index != -1) {
int endIndex = paramsString.indexOf('&', index);
if (endIndex != -1) {
encoding = paramsString.substring(
index + formHintField.length(), endIndex);
} else {
encoding = paramsString.substring(
index + formHintField.length());
}
}
return encoding;
}
// START SJSAS 6346738
/**
* Gets the POST body of this request.
*
* @return The POST body of this request
*/
protected byte[] getPostBody() throws IOException {
if (formDataLen > 0) {
// POST body already read
return formData;
} else {
return super.getPostBody();
}
}
// END SJSAS 6346738
}

View File

@ -1,59 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)BCCoyoteResponse.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import com.sun.jbi.internationalization.Messages;
import java.util.logging.Logger;
import org.apache.catalina.Context;
import org.apache.coyote.tomcat5.CoyoteResponse;
import org.apache.coyote.tomcat5.CoyoteOutputStream;
import org.apache.coyote.tomcat5.CoyoteWriter;
import org.apache.coyote.tomcat5.OutputBuffer;
/**
* Customized version of the Tomcat 5 CoyoteResponse
*/
public class BCCoyoteResponse extends CoyoteResponse {
//private static Logger logger = LogDomains.getLogger(LogDomains.PWC_LOGGER);
private final static Logger logger = Messages.getLogger(BCCoyoteResponse.class);
/*
* Constructor.
*/
public BCCoyoteResponse(boolean chunkingDisabled) {
super(chunkingDisabled);
}
}

View File

@ -1,615 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)GrizzlyRequestProcessor.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import com.sun.jbi.httpsoapbc.HttpSoapComponentContext;
import com.sun.jbi.httpsoapbc.MessageExchangeSupport;
import com.sun.jbi.httpsoapbc.ReplyListener;
import com.sun.jbi.httpsoapbc.servletsupport.HttpServletDenormalizer;
import com.sun.jbi.httpsoapbc.servletsupport.HttpServletNormalizer;
import com.sun.jbi.internationalization.Messages;
import com.sun.jbi.httpsoapbc.Normalizer;
import com.sun.jbi.httpsoapbc.Denormalizer;
import com.sun.jbi.httpsoapbc.ReplyListener;
import com.sun.jbi.httpsoapbc.HttpSoapBindingLifeCycle;
import com.sun.jbi.httpsoapbc.InboundMessageProcessor;
import com.sun.jbi.httpsoapbc.Endpoint;
import com.sun.jbi.httpsoapbc.FaultException;
import com.sun.jbi.httpsoapbc.OperationMetaData;
import com.sun.jbi.httpsoapbc.util.DebugLog;
import com.sun.jbi.nms.exchange.ExchangePattern;
import com.sun.enterprise.web.connector.grizzly.AsyncTask;
import com.sun.enterprise.web.connector.grizzly.ByteBufferStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.net.URI;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.Map;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.ExchangeStatus;
import javax.jbi.messaging.InOut;
import javax.jbi.messaging.Fault;
import javax.jbi.messaging.NormalizedMessage;
import javax.jbi.messaging.MessagingException;
import javax.jbi.component.ComponentLifeCycle;
import java.util.Set;
import org.apache.catalina.Connector;
import org.apache.coyote.Adapter;
import org.apache.coyote.Request;
import org.apache.coyote.Response;
import org.apache.coyote.http11.InternalInputBuffer;
import org.apache.coyote.http11.InternalOutputBuffer;
import org.apache.coyote.tomcat5.CoyoteConnector;
import org.apache.coyote.tomcat5.CoyoteRequest;
import org.apache.coyote.tomcat5.CoyoteResponse;
/**
* Implementation of a coyote adapter to process HTTP requests asynchronously
*
*/
public class GrizzlyRequestProcessor implements Adapter, ReplyListener {
private static final Messages mMessages =
Messages.getMessages(GrizzlyRequestProcessor.class);
private final static Logger mLogger =
Messages.getLogger(GrizzlyRequestProcessor.class);
/**
* Index into the requests and response notes
*/
final static int ADAPTER_NOTES = 1;
/**
* The CoyoteConnector with which this processor is associated.
*/
private CoyoteConnector connector = null;
/**
* A mapping from the JBI message exchange ID to the request context
*/
Map exchangeIDToContext = new java.util.concurrent.ConcurrentHashMap();
HttpSoapBindingLifeCycle lifeCycle;
/**
* Creates a new instance
* @param connector CoyoteConnector that owns this processor
*/
public GrizzlyRequestProcessor(CoyoteConnector connector) throws MessagingException {
this.connector = connector;
initialize();
}
/**
* Initialize the request processor
*/
void initialize() throws MessagingException {
lifeCycle = (HttpSoapBindingLifeCycle) HttpSoapComponentContext.getInstance().getAssociatedLifeCycle();
}
/**
* Main entry point of the adapter to service a request
* @param the incoming http request
* @param the http response to prepare
*/
public void service(Request req, Response res) {
// Get the task associated with this request. This could be solved as a request note instead.
AsyncTask asyncTask = JBIGrizzlyAsyncFilter.removeTaskMapping(req);
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Got task mapping from request "
+ req.toString() + ", asyncProcessorTask " + asyncTask);
}
int port = connector.getPort();
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Servicing async request for " + req.requestURI());
}
CoyoteRequest request = (CoyoteRequest) req.getNote(ADAPTER_NOTES);
CoyoteResponse response = (CoyoteResponse) res.getNote(ADAPTER_NOTES);
// TODO: we should be able to re-use the CoyoteRequest/CoyoteResponse instances
//if (request == null) {
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Initializing servicing objects");
}
// Create objects
request = (CoyoteRequest) connector.createRequest();
request.setCoyoteRequest(req);
response = (CoyoteResponse) connector.createResponse();
response.setCoyoteResponse(res);
// Link objects
request.setResponse(response);
response.setRequest(request);
// Set as notes
req.setNote(ADAPTER_NOTES, request);
res.setNote(ADAPTER_NOTES, response);
// Set query string encoding
req.getParameters().setQueryStringEncoding(connector.getURIEncoding());
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Query string encoding: " + connector.getURIEncoding());
}
//}
// Prepare the request context
Context currentContext = new Context();
currentContext.port = port;
currentContext.anInputBuffer = (InternalInputBuffer) req.getInputBuffer();
currentContext.anOutputBuffer = (InternalOutputBuffer) res.getOutputBuffer();
currentContext.req = req;
currentContext.res = res;
currentContext.coyoteRequest = request;
currentContext.coyoteResponse = response;
currentContext.connector = connector;
currentContext.asyncTask = asyncTask;
// TODO: beware, request parsing does not always seem intuitive
//currentContext.contextPath = req.localName().toString();
currentContext.contextPath = "";
currentContext.pathInfo = req.requestURI().toString();
// if the request is looking for the WSDL, don't process the actual message
// just let the reply handler load the WSDL and return it.
if ("WSDL".equalsIgnoreCase(request.getQueryString())) {
processSynchronousReply(currentContext, null, null);
} else {
try {
String exchangeID = processAsynchRequest(currentContext);
} catch (Exception ex) {
// Trigger an immediate reply if the request processing resulted in an exception
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Exception reported in process synchronous request-reply.", ex);
}
processSynchronousReply(currentContext, null, ex);
}
}
}
/**
* @see Adapter
*/
public void afterService(Request req, Response res) {
}
/**
* Process a HttpRequest and send a JBI request.
* @param request embedded server request
* @return JBI message exchange ID
*/
public String processAsynchRequest(Context reqContext) throws FaultException, HttpException {
String exchangeID = null;
CoyoteRequest request = reqContext.coyoteRequest;
String context = reqContext.contextPath + reqContext.pathInfo;
int port = reqContext.port;
Endpoint targetEndpoint = lifeCycle.getEndpointBeanForContext(context, port);
if (targetEndpoint == null) {
if (mLogger.isLoggable(Level.WARNING)) {
mLogger.log(Level.WARNING,
"HTTPBC-W00652.Web_service_mapping_failed",
new Object[] { context, new Integer(port)});
}
// Send an HTTP 404 error
throw new HttpException(CoyoteResponse.SC_NOT_FOUND,
mMessages.getString("HTTPBC-W00652.Web_service_mapping_failed",
new Object[] {context, new Integer(port)}));
} else {
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Web service mapping found for the requested URL. " + context + " at port " + port);
}
try {
InboundMessageProcessor anInboundProcessor = getProcessorSupport().inboundProcessor;
anInboundProcessor.setInput(request);
anInboundProcessor.setTargetEndpoint(targetEndpoint);
exchangeID = anInboundProcessor.execute(reqContext);
} catch (MessagingException ex) {
if (mLogger.isLoggable(Level.WARNING)) {
mLogger.log(Level.WARNING, "HTTPBC-W00653.Exception_during_request_processing", ex);
}
throw new FaultException(ex);
}
}
return exchangeID;
}
/**
* The inbound message processor will call us back in execute() once it knows the message exchange for the request.
* @see ReplyListener
*/
public void setMessageExchangeId(String messageExchangeId, Object clientContext) {
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "setMessageExchangeId: " + messageExchangeId + ", clientContext: " + clientContext);
}
exchangeIDToContext.put(messageExchangeId, clientContext);
}
public void setMessageContextForCallback(Object obj1, Object obj2) {
// do nothing
}
/**
* Removes a message exchange ID and its associated call back context
* @see ReplyListener
*/
public void removeMessageExchangeId(String messageExchangeId) {
exchangeIDToContext.remove(messageExchangeId);
}
/**
* Handle the reply available from JBI.
*/
public void onReply(MessageExchange exchange) throws MessagingException {
// MEP is complete, we do not expect any further replies. Remove from MessageExchangeSupport.
MessageExchangeSupport.removeReplyListener(exchange.getExchangeId());
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Got reply message exchange " + exchange.getExchangeId());
}
Context context = (Context) exchangeIDToContext.remove(exchange.getExchangeId());
if (mLogger.isLoggable(Level.FINEST)) {
StringBuffer idsStr = new StringBuffer();
Set s = exchangeIDToContext.keySet();
if (s.size() == 0) {
idsStr.append("none");
} else {
for (Object key : s) {
idsStr.append(key.toString()).append(" ");
}
}
mLogger.log(Level.FINEST, "Outstanding exchanges: " + idsStr.toString());
}
try {
processAsynchReply(context, exchange, null);
} catch (RuntimeException ex) {
throw new MessagingException(mMessages.getString("HTTPBC-E00654.Exception_during_reply_processing"),
ex);
} finally {
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Finishing response");
}
JBIGrizzlyAsyncFilter.finishResponse(context.asyncTask);
/* This clean-up help may affect coyote/grizzly. Disable for now.
// As currently we can not re-use these, help in cleaning up request and response
if (context != null && context.coyoteRequest != null ) {
if (context.req != null) {
context.req.setNote(ADAPTER_NOTES, null);
context.req.recycle();
context.req = null;
}
if (context.res != null) {
context.res.setNote(ADAPTER_NOTES, null);
context.res.recycle();
context.res = null;
}
// remove linking
if (context.coyoteRequest != null) {
context.coyoteRequest.setResponse(null);
context.coyoteRequest.setCoyoteRequest(null);
context.coyoteRequest.recycle();
context.coyoteRequest = null;
}
if (context.coyoteResponse != null) {
context.coyoteResponse.setRequest(null);
context.coyoteResponse.setCoyoteResponse(null);
context.coyoteResponse.recycle();
context.coyoteResponse = null;
}
}
*/
}
}
/**
* Reply synchronously in this service() invocation.
* This is useful for responding with errors and any other exchanges where no
* asynchronous exchange with the JBI NMR will occur.
*/
public void processSynchronousReply(Context reqContext, MessageExchange exchange, Exception requestFailedException) {
processAsynchReply(reqContext, exchange, requestFailedException);
JBIGrizzlyAsyncFilter.finishResponseSynchronously(reqContext.asyncTask);
}
/**
* Process a JBI reply and prepare an HttpResponse
* @param reqContext the original request context
* @param exchange the JBI message exchange which has a reply available. Maybe null if requestFailedException is not null.
* @param requestFailedException The exception that occurred in the processAsynchRequest phase.
*/
public void processAsynchReply(Context reqContext, MessageExchange exchange, Exception requestFailedException) {
CoyoteResponse response = reqContext.coyoteResponse;
try {
CoyoteRequest request = reqContext.coyoteRequest;
String context = reqContext.contextPath + reqContext.pathInfo;
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Lifecycle: "
+ lifeCycle + ", context path: " + context
+ ", request context: " + reqContext);
}
Endpoint targetEndpoint = lifeCycle.getEndpointBeanForContext(context, reqContext.port);
OperationMetaData operationMetaData = null;
// SOAP 1.1 we'll set it as text/xml
// TODO: for SOAP 1.2, content type will have to be application/soap+xml
response.setContentType("text/xml");
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Request query string: " + request.getQueryString());
}
// if user is looking for the wsdl file, read it from disk and return it synchronously
if (targetEndpoint != null && "WSDL".equalsIgnoreCase(request.getQueryString())) {
try {
ByteBuffer mbb = targetEndpoint.getServiceDescriptorAsByteBuffer();
java.io.OutputStream os = response.getOutputStream();
java.nio.channels.WritableByteChannel channel = java.nio.channels.Channels.newChannel(os);
channel.write(mbb);
os.flush();
response.setStatus(CoyoteResponse.SC_OK);
} catch (Exception e) {
if (mLogger.isLoggable(Level.WARNING)) {
mLogger.log(Level.WARNING, "HTTPBC-W00651.WSDL_retrieval_exception", e);
}
// Reply with http error
response.setStatus(CoyoteResponse.SC_INTERNAL_SERVER_ERROR);
}
return;
}
String pat = null;
String operation = null;
if (exchange != null) {
URI pattern = exchange.getPattern();
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Pattern for exchange id "
+ exchange.getExchangeId() + " is " + pattern);
}
pat = pattern.toString().trim();
operation = exchange.getOperation().getLocalPart();
} else {
// If the exchange is null make sure there is an exception reported.
if (requestFailedException == null) {
requestFailedException = new MessagingException("Null message exchange");
}
}
// Get the operation meta data if available
if (targetEndpoint != null) {
Map nameToMeta = targetEndpoint.getOperationNameToMetaData();
operationMetaData = (OperationMetaData) nameToMeta.get(operation);
}
if (targetEndpoint == null || exchange == null || ExchangePattern.isInOut(exchange)) {
try {
if (requestFailedException != null) {
// Process a failure in processing the request
if (requestFailedException instanceof HttpException) {
// Temporary Support for retrieving resources for WSDLs retrieved via ?WSDL that have relative imports
// If an address context is not unique (e.g. multiple endpoints are deployed under /service that import resources with the same name),
// this will simply return the first match it can find.
ByteBuffer resource = lifeCycle.queryResource(context, targetEndpoint);
if (resource != null) {
if (mLogger.isLoggable(Level.FINE)) {
mLogger.log(Level.FINE, "Request context "
+ context + " at port " + reqContext.port
+ " mapped to resource " + resource);
}
ByteBuffer mbb = resource;
java.io.OutputStream os = response.getOutputStream();
java.nio.channels.WritableByteChannel channel = java.nio.channels.Channels.newChannel(os);
channel.write(mbb);
os.flush();
response.setStatus(CoyoteResponse.SC_OK);
} else {
response.setStatus(((HttpException) requestFailedException).getErrorCode());
}
} else {
Denormalizer aDenormalizer = getProcessorSupport().denormalizer;
response = (CoyoteResponse) aDenormalizer.denormalizeException(requestFailedException, response);
int statusCode = CoyoteResponse.SC_INTERNAL_SERVER_ERROR;
response.setStatus(statusCode);
}
} else {
if (operationMetaData == null) {
throw new MessagingException(mMessages.getString("HTTPBC-E00667.No_opmeta_for_operation", operation));
}
if (exchange.getError() != null) {
Denormalizer aDenormalizer = getProcessorSupport().denormalizer;
response = (CoyoteResponse) aDenormalizer.denormalizeError(exchange, response);
} else {
NormalizedMessage outMsg = null;
if (exchange.getFault() != null) {
// TODO: check that a message exchange fault can be used
// the same way as an output message!
Fault aFault = exchange.getFault();
outMsg = aFault;
} else {
if (exchange instanceof InOut) {
InOut inout = (InOut) exchange;
outMsg = inout.getOutMessage();
}
}
if (mLogger.isLoggable(Level.FINE)) {
if (outMsg != null) {
DebugLog.debugLog(mLogger, Level.FINE, "Denormalizing received msg", outMsg.getContent());
} else {
mLogger.log(Level.FINE, "Message received is empty");
}
}
Denormalizer aDenormalizer = getProcessorSupport().denormalizer;
response = (CoyoteResponse) aDenormalizer.denormalize(outMsg, exchange, response, operationMetaData);
}
}
} catch (Throwable ex) {
if (mLogger.isLoggable(Level.WARNING)) {
mLogger.log(Level.WARNING, "HTTPBC-W00654.Exception_during_reply_processing",ex);
}
// Reply with fault.
Denormalizer aDenormalizer = getProcessorSupport().denormalizer;
response = (CoyoteResponse) aDenormalizer.denormalizeException(ex, response);
}
} else if (ExchangePattern.isInOnly(exchange)) {
int statusCode = CoyoteResponse.SC_ACCEPTED; // one-way should send accepted 202 - not OK 200
if (requestFailedException != null) {
if (requestFailedException instanceof HttpException) {
statusCode = ((HttpException) requestFailedException).getErrorCode();
} else {
mLogger.log(Level.SEVERE, "HTTPBC-E00653.Exception_during_request_processing",
requestFailedException);
statusCode = CoyoteResponse.SC_INTERNAL_SERVER_ERROR;
}
} else {
// If the SE does not report a successful 'transmission' (for in-only exchange status DONE)
// respond with an http error
if (exchange.getStatus().equals(ExchangeStatus.ERROR)) {
mLogger.log(Level.SEVERE, "HTTPBC-E00653.Exception_during_request_processing");
statusCode = CoyoteResponse.SC_INTERNAL_SERVER_ERROR;
}
}
response.setStatus(statusCode);
} else {
mLogger.log(Level.SEVERE,"HTTPBC-E00668.Unsupported_message_type", pat);
int statusCode = CoyoteResponse.SC_INTERNAL_SERVER_ERROR;
response.setStatus(statusCode);
}
} catch (Throwable ex) {
// Make sure that no exceptions get propagated to the embedded server, this might terminate the server
mLogger.log(Level.SEVERE, "HTTPBC-E00654.Exception_during_reply_processing", ex);
int statusCode = CoyoteResponse.SC_INTERNAL_SERVER_ERROR;
response.setStatus(statusCode);
} finally {
try {
response.finishResponse();
} catch (IOException ex) {
mLogger.log(Level.SEVERE, "HTTPBC-E00654.Exception_during_reply_processing", ex);
}
if (mLogger.isLoggable(Level.FINEST)) {
mLogger.log(Level.FINEST, "Wrote response");
}
}
}
// START SJSAS 6349248
/**
* Not supported by this adapter implementation.
*
* Notify all container event listeners that a particular event has
* occurred for this Adapter. The default implementation performs
* this notification synchronously using the calling thread.
*
* @param type Event type
* @param data Event data
*/
public void fireAdapterEvent(String type, Object data) {
mLogger.log(Level.FINE, "Not supported by this implementation");
}
// END SJSAS 6349248
/**
* Get the thread specific processor support
* Beware: Do not use the processor support instances in a different thread than
* the one calling getProcessorSupport.
*/
ProcessorSupport getProcessorSupport() throws MessagingException {
// Get the processor support instances associated with the thread if present, create if not.
ProcessorSupport currentProcSupport = (ProcessorSupport) processorSupport.get();
if (currentProcSupport == null) {
currentProcSupport = new ProcessorSupport();
currentProcSupport.normalizer = new HttpServletNormalizer();
currentProcSupport.denormalizer = new HttpServletDenormalizer();
currentProcSupport.inboundProcessor = new InboundMessageProcessor(currentProcSupport.normalizer, this);
processorSupport.set(currentProcSupport);
}
return currentProcSupport;
}
/**
* Holds instances that are not thread safe
*/
private static ThreadLocal processorSupport = new ThreadLocal();
/**
* Holds instances that are not thread safe
*/
static class ProcessorSupport {
Normalizer normalizer;
Denormalizer denormalizer;
InboundMessageProcessor inboundProcessor;
}
/**
* Holds request context information
*/
static class Context {
int port;
InternalInputBuffer anInputBuffer;
InternalOutputBuffer anOutputBuffer;
Request req;
Response res;
CoyoteRequest coyoteRequest;
CoyoteResponse coyoteResponse;
Connector connector;
String contextPath;
String pathInfo;
AsyncTask asyncTask;
}
}

View File

@ -1,169 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)JBIGrizzlyAsyncFilter.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import com.sun.enterprise.web.connector.grizzly.AsyncExecutor;
import com.sun.enterprise.web.connector.grizzly.AsyncFilter;
import com.sun.enterprise.web.connector.grizzly.AsyncHandler;
import com.sun.enterprise.web.connector.grizzly.AsyncTask;
import com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask;
import com.sun.enterprise.web.connector.grizzly.ProcessorTask;
import com.sun.jbi.internationalization.Messages;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.Map;
import java.util.Queue;
import org.apache.coyote.Request;
import org.apache.coyote.tomcat5.CoyoteResponse;
/**
* Grizzly filter to asynchronously invoke JBI HTTP BC
*
* Also has support to mark an exchange as synchronous when needed, e.g. for
* reporting errors
*
*/
public class JBIGrizzlyAsyncFilter implements AsyncFilter {
private final static Logger logger =
Messages.getLogger(JBIGrizzlyAsyncFilter.class);
/**
* Mapping from the request to the processing task, used by the adapter
* to retrieve the task associated with a request.
*/
private static Map requestToTask = new java.util.concurrent.ConcurrentHashMap();
/**
* List of task instances that should be handled in a synchronous manner.
* By the adapter adding tasks to this queue it can control whether
* a given request is dealt with in a synchronous or asynchronous fashion.
*/
private static Queue respondSynchronously = new java.util.concurrent.ConcurrentLinkedQueue();
/**
* Filter implementation, invoke the BC adapter implementation.
*/
public boolean doFilter(AsyncExecutor asyncExecutor) {
boolean continueSynchronously = false;
AsyncTask asyncProcessorTask = asyncExecutor.getAsyncTask();
// In Grizzly v1, the asynchronous extenstions are tied to the DefaultProcessorTask
DefaultProcessorTask defaultProcTask = (DefaultProcessorTask) asyncProcessorTask.getProcessorTask();
Request req = defaultProcTask.getRequest();
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "doFilter on request " + req.toString() + ", asyncProcessorTask " + asyncProcessorTask.toString());
}
requestToTask.put(req, asyncProcessorTask);
try {
asyncProcessorTask.getProcessorTask().invokeAdapter();
boolean wasPresent = respondSynchronously.remove(asyncProcessorTask);
continueSynchronously = wasPresent;
} catch (RuntimeException ex) {
logger.log(Level.WARNING, "HTTPBC-W00641.Adapter_invoke_exception", ex);
// make sure this is removed; just in case.
respondSynchronously.remove(asyncProcessorTask);
continueSynchronously = true;
} finally {
// make sure this mapping is cleaned up; just in case
requestToTask.remove(req);
}
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "Continue synchronously flag set to " + continueSynchronously);
}
return continueSynchronously;
}
/**
* Mark request as responding synchronously, from the same thread as the request thread.
*/
public static void finishResponseSynchronously(AsyncTask asyncProcessorTask) {
if (asyncProcessorTask != null) {
DefaultProcessorTask task = (DefaultProcessorTask) asyncProcessorTask.getProcessorTask();
AsyncHandler asyncHandler = task.getAsyncHandler();
asyncHandler.removeFromInterruptedQueue(asyncProcessorTask);
// Mark task as synchronous
respondSynchronously.add(asyncProcessorTask);
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "Marking exchange as synchronous");
}
}
}
/**
* Finish the response asynchronously, i.e. from a different thread than the request thread.
*/
public static void finishResponse(AsyncTask asyncProcessorTask) {
if (asyncProcessorTask != null) {
// In Grizzly v1, the asynchronous extenstions are tied to the DefaultProcessorTask
DefaultProcessorTask task = (DefaultProcessorTask) asyncProcessorTask.getProcessorTask();
if (task != null) {
AsyncHandler asyncHandler = task.getAsyncHandler();
if (asyncHandler != null) {
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "Finish response for asyncProcessorTask "
+ asyncProcessorTask.toString());
}
asyncHandler.handle(asyncProcessorTask);
} else {
logger.log(Level.SEVERE, "HTTPBC-E00642.No_response_handler_for_request");
}
} else {
logger.log(Level.WARNING, "HTTPBC-W00642.No_correlating_request_for_response");
}
} else {
logger.log(Level.WARNING, "HTTPBC-W00643.Null_response");
}
}
/**
* Remove the task mapping for a given request
* @param request the request
* @return the task if there was a mapping for the request, null if not
*/
public static AsyncTask removeTaskMapping(Request request) {
return (AsyncTask) requestToTask.remove(request);
}
}

View File

@ -1,443 +0,0 @@
/*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)LinkedListThrottlePipeline.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.jbi.httpsoapbc.embedded;
import java.nio.channels.SelectionKey;
import java.nio.ByteBuffer;
import java.nio.BufferUnderflowException;
import java.nio.channels.SocketChannel;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.Iterator;
import com.sun.enterprise.web.connector.grizzly.LinkedListPipeline;
import com.sun.enterprise.web.connector.grizzly.SelectorThread;
import com.sun.enterprise.web.connector.grizzly.Task;
import com.sun.enterprise.web.connector.grizzly.ReadTask;
import com.sun.enterprise.web.connector.grizzly.HtmlHelper;
import com.sun.enterprise.web.connector.grizzly.AsyncReadTask;
import com.sun.enterprise.web.connector.grizzly.WorkerThread;
import com.sun.jbi.internationalization.Messages;
import com.sun.jbi.httpsoapbc.HttpSoapBindingLifeCycle;
import com.sun.jbi.httpsoapbc.Endpoint;
import com.sun.jbi.httpsoapbc.RequestThrottlingController;
/**
*
* Throttle pipeline for throttling requests
*/
public class LinkedListThrottlePipeline extends LinkedListPipeline implements RequestThrottlingController {
private static final Messages mMessages =
Messages.getMessages(LinkedListThrottlePipeline.class);
private static final Logger mLogger =
Messages.getLogger(LinkedListThrottlePipeline.class);
private SelectorThread st;
private final static String QUERY_STRING="?";
private final static String PATH_STRING="/";
private HttpSoapBindingLifeCycle lifeCycle;
private ExecutorService resumeThreadPool;
protected ConcurrentHashMap<String, ConcurrentLinkedQueue<SelectionKeyByteBuffer>> suspendedKeys =
new ConcurrentHashMap<String, ConcurrentLinkedQueue<SelectionKeyByteBuffer>>();
protected ConcurrentLinkedQueue<ByteBuffer> bbPool =
new ConcurrentLinkedQueue<ByteBuffer>();
class SelectionKeyByteBuffer {
private SelectionKey sk;
private ByteBuffer bb;
SelectionKeyByteBuffer (SelectionKey sk, ByteBuffer bb) {
this.sk = sk;
this.bb = bb;
}
SelectionKey getSelectionKey() { return sk; }
ByteBuffer getByteBuffer() {return bb; }
}
class ResumerTask implements Runnable {
LinkedListThrottlePipeline pipeline;
Endpoint endpoint;
ResumerTask (LinkedListThrottlePipeline pipeline, Endpoint endpoint) {
this.pipeline = pipeline;
this.endpoint = endpoint;
}
public void run() {
synchronized (pipeline) {
String uri = endpoint.getUrlContext();
int port = endpoint.getUrlPort();
int resumeCount = endpoint.getMaxConcurrencyLimit() - endpoint.getPendingExchangeReplies();
String key = uri+":"+port;
ConcurrentLinkedQueue<SelectionKeyByteBuffer> linkQ = pipeline.suspendedKeys.get(key);
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "Resume SelectionKey(s) triggered; URI '"+uri+
"', port '"+port+
"'; resumeCount= "+resumeCount+
", suspended size="+linkQ.size());
}
if (linkQ != null && linkQ.size() > 0) {
for (int i=0; i < resumeCount; i++){
// only resume if there are still suspended ones..
if (linkQ.size()>0) {
SelectionKeyByteBuffer skbb = linkQ.poll();
try {
SelectionKey sk = skbb.getSelectionKey();
ByteBuffer bb = skbb.getByteBuffer();
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "Request URI '" + uri + "', port '" + port + "'; got cached Selectionkey [" + sk + "] and cached ByteBuffer [" + bb + "]");
}
AsyncReadTask task = (AsyncReadTask)st.getReadTask(sk);
task.getByteBuffer().put(bb);
task.setBytesAvailable(true);
endpoint.incrementPendingExchangeReplies();
pipeline.internalAddTask(task);
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "Request URI '" + uri + "', port '" + port + "'; RESUMED Selectionkey [" + task.getSelectionKey() + "], ByteBuffer [" + task.getByteBuffer() + "] on Task [" + task + "]");
}
returnReadByteBuffer(bb);
} catch (Throwable t) {
String error = mMessages.getString("HTTPBC-E00670.Exception_during_resume_suspended_selectionkey",
new Object [] {uri, new Integer(port), skbb.getSelectionKey(), t.getLocalizedMessage()});
mLogger.log(Level.WARNING, error, t);
}
}
}
if (linkQ.size() == 0) {
pipeline.suspendedKeys.remove(key);
}
}
}
}
}
public LinkedListThrottlePipeline () {
super();
}
public synchronized void addTask(Task task) {
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log (Level.FINER, "addTask called with Task [" + task + "]");
}
if (task.getType() == Task.READ_TASK) {
String requestURI = null;
boolean isWsdlQuery = false;
ByteBuffer bb = getReadByteBuffer();
try {
PeekBuffer pb = peekRequestURI((ReadTask)task, bb);
requestURI = pb.getToken();
isWsdlQuery = pb.getIsWsdlQuery();
} catch (Throwable t) {
AsyncReadTask asyncRT = (AsyncReadTask)task;
asyncRT.terminate(false);
returnReadByteBuffer(bb);
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log (Level.FINER, "Client has closed the socket...");
}
return;
}
if (requestURI != null) {
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log (Level.FINER, "Request URI is '" + requestURI + "'");
}
int port = task.getSelectorThread().getPort();
Endpoint endpoint = this.lifeCycle.getEndpointBeanForContext(requestURI, port);
// Only associate throttler controler to endpoint if endpoint is configured for throttling
if (endpoint != null && endpoint.getMaxConcurrencyLimit() > 0) {
int maxConcurrencyLimit = endpoint.getMaxConcurrencyLimit();
// associate this controller with endpoint first
endpoint.setInboundRequestThrottlingController(this);
int pendingExchangeReplies = endpoint.getPendingExchangeReplies();
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "Found Endpoint for request URI '" + requestURI + "' and port '" + port + "'; maxConcurrencyLimit="+maxConcurrencyLimit+", pendingExchangeReplies="+pendingExchangeReplies);
}
String key = requestURI+":"+port;
// suspend selection key if maxed out concurrent messages
if (maxConcurrencyLimit != -1 && (pendingExchangeReplies >= maxConcurrencyLimit) && !isWsdlQuery) {
// Disable keep-alive
task.getSelectionKey().attach(null);
st = task.getSelectorThread();
if (!suspendedKeys.containsKey(key)) {
suspendedKeys.put(key, new ConcurrentLinkedQueue<SelectionKeyByteBuffer>());
}
ConcurrentLinkedQueue<SelectionKeyByteBuffer> linkQ = suspendedKeys.get(key);
SelectionKey sk = task.getSelectionKey();
SelectionKeyByteBuffer skbb = new SelectionKeyByteBuffer(sk, bb);
linkQ.offer(skbb); // add the byte buffer and selection key to our internal cache
task.recycle(); // tells Grizzly to reuse the task for the next request
st.returnTask(task);
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "Request URI '" + requestURI + "', port '" + port + "'; SUSPENDED Selectionkey [" + sk + "], ByteBuffer [" + bb + "] from Task [" + task + "]; suspended size="+linkQ.size());
}
return;
}
}
// Proceed with the read task - copying the contents of the "temp" ByteBuffer to
// the one in ReadTask.
((ReadTask)task).getByteBuffer().put(bb);
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "ReadTask ByteBuffer [" + ((ReadTask)task).getByteBuffer()+ "]");
}
((ReadTask)task).setBytesAvailable(true); // tells Grizzly not to start reading from the stream buffer until the temp buffer is read
if (endpoint != null && !isWsdlQuery) {
endpoint.incrementPendingExchangeReplies();
}
}
returnReadByteBuffer(bb);
}
super.addTask(task); // calls the super to resume normal processing of the LinkedListPipeline
}
public void resumeSuspendedRequests(Endpoint endpoint) {
if (resumeThreadPool == null) {
resumeThreadPool = Executors.newCachedThreadPool();
}
resumeThreadPool.submit(new ResumerTask(this,endpoint));
}
public synchronized void cleanup() {
if (resumeThreadPool != null) {
resumeThreadPool.shutdown();
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "shutdown resume task thread pool");
}
}
// Cancel any suspended tasks
if (suspendedKeys != null && suspendedKeys.size() > 0) {
for (Iterator<String> iter1=suspendedKeys.keySet().iterator(); iter1.hasNext();) {
String uriPort = iter1.next();
String uri = uriPort.substring(0,uriPort.indexOf(":"));
String port = uriPort.substring(uriPort.indexOf(":")+1, uriPort.length());
ConcurrentLinkedQueue<SelectionKeyByteBuffer> linkQ = suspendedKeys.remove(uri);
if (linkQ != null && linkQ.size() > 0) {
for (Iterator iter2=linkQ.iterator();iter2.hasNext();) {
SelectionKeyByteBuffer ssbb = linkQ.poll();
SelectionKey selkey = ssbb.getSelectionKey();
try {
Task task = st.getReadTask(selkey);
task.cancelTask("No resources available.", HtmlHelper.OK);
} catch (Throwable t) {
String error = mMessages.getString("HTTPBC-E00671.Exception_during_cancel_suspended_selectionkey",
new Object [] {uri, port, selkey, t.getLocalizedMessage()});
mLogger.log(Level.WARNING, error, t);
}
}
}
if (mLogger.isLoggable(Level.FINER)) {
mLogger.log(Level.FINER, "cancelled all suspended selection key read tasks for URI '" + uri + "' on port '" + port + "'");
}
}
}
}
public void setHttpSoapBindingLifeCycle (HttpSoapBindingLifeCycle lifeCycle) {
this.lifeCycle = lifeCycle;
}
/***
* Get the request URI from the <code>ByteBuffer</code>
*/
protected PeekBuffer peekRequestURI(ReadTask readTask, ByteBuffer byteBuffer) throws Exception {
SocketChannel socketChannel =
(SocketChannel)readTask.getSelectionKey().channel();
String token = null;
boolean isWsdlQuery = false;
if (socketChannel.isOpen()) {
socketChannel.read(byteBuffer);
int limit = byteBuffer.limit();
int position = byteBuffer.position();
if (parse (byteBuffer)) {
byte[] chars = new byte[byteBuffer.limit() - byteBuffer.position()];
byteBuffer.get(chars);
token = new String(chars);
String normalizedToken = token.toLowerCase();
if (normalizedToken.indexOf ("?wsdl") != -1) {
isWsdlQuery = true;
}
int index = token.indexOf(0x20);
if ( index != -1){
token = token.substring(0,index);
}
// Remove query string.
index = token.indexOf(QUERY_STRING);
if ( index != -1){
token = token.substring(0,index);
}
boolean slash = token.endsWith(PATH_STRING);
if ( slash ){
token = token.substring(0,token.length() -1);
}
}
byteBuffer.limit(limit);
byteBuffer.position(position);
byteBuffer.flip();
}
return new PeekBuffer(token, isWsdlQuery);
}
protected ByteBuffer getReadByteBuffer() {
int size = 1028; // keep it small
ByteBuffer bb = bbPool.poll();
if (bb == null) {
bb = ByteBuffer.allocate(size);
}
return bb;
}
protected void returnReadByteBuffer(ByteBuffer bb) {
bb.clear();
bbPool.offer(bb);
}
protected void internalAddTask (Task task) {
super.addTask(task);
}
/**
* Parse the request line in search of the context-root bytes of the HTTP
* Method. The <code>ByteBuffer</code> position and limit refer
* respectively to the start and the end of the context root.
* @param byteBuffer The byteBuffer containing the requests bytes
* @return true if the context-root has been found.
*/
public boolean parse(ByteBuffer byteBuffer) {
boolean isFound = false;
int curPosition = byteBuffer.position();
int curLimit = byteBuffer.limit();
// Rule a - If nothing, return to the Selector.
if (byteBuffer.position() == 0)
return false;
byteBuffer.position(0);
byteBuffer.limit(curPosition);
int state =0;
int start =0;
int end = 0;
try {
byte c;
// Rule b - try to determine the context-root
while(byteBuffer.hasRemaining()) {
c = byteBuffer.get();
// State Machine
// 0 - Search for the first SPACE ' ' between the method and the
// the request URI
// 1 - Search for the second SPACE ' ' between the request URI
// and the method
switch(state) {
case 0: // Search for first ' '
if (c == 0x20){
state = 1;
start = byteBuffer.position();
//start = byteBuffer.position() + 1;
}
break;
case 1: // Search for next ' '
if (c == 0x20){
end = byteBuffer.position() - 1;
return true;
}
break;
default:
throw new IllegalArgumentException("Unexpected state");
}
}
return false;
} catch (BufferUnderflowException bue) {
return false;
} finally {
if ( end > 0 ){
byteBuffer.position(start);
byteBuffer.limit(end);
} else {
byteBuffer.limit(curLimit);
byteBuffer.position(curPosition);
}
}
}
class PeekBuffer {
private boolean isWsdlQuery = false;
private String token;
PeekBuffer(String token, boolean isWsdlQuery) {
this.token = token;
this.isWsdlQuery = isWsdlQuery;
}
String getToken() {
return this.token;
}
boolean getIsWsdlQuery() {
return this.isWsdlQuery;
}
}
}

View File

@ -68,7 +68,6 @@ import javax.wsdl.Output;
import javax.wsdl.Part; import javax.wsdl.Part;
import javax.wsdl.Port; import javax.wsdl.Port;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Dispatch; import javax.xml.ws.Dispatch;
import javax.xml.ws.Service; import javax.xml.ws.Service;
import javax.xml.ws.Service.Mode; import javax.xml.ws.Service.Mode;
@ -455,15 +454,11 @@ public class HttpEndpoint extends AbstractEndpoint {
public <T> Dispatch<T> createDispatch(String url, Class<T> type){ public <T> Dispatch<T> createDispatch(String url, Class<T> type){
Dispatch<T> d = dispatchCache.get(type); Dispatch<T> d = dispatchCache.get(type);
if (d == null) { if (d == null) {
mService.addPort(mPortName, javax.xml.ws.http.HTTPBinding.HTTP_BINDING, url); mService.addPort(mPortName, javax.xml.ws.http.HTTPBinding.HTTP_BINDING, url);
d = mService.createDispatch(mPortName, type, Mode.MESSAGE); d = mService.createDispatch(mPortName, type, Mode.MESSAGE);
dispatchCache.put(type, d); dispatchCache.put(type, d);
} }
d.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
d.getRequestContext().put(javax.xml.ws.http.HTTPBinding.HTTP_BINDING, url);
return d; return d;
} }
} }

View File

@ -113,6 +113,11 @@ import org.xml.sax.SAXException;
import com.sun.jbi.httpsoapbc.async.AsyncResponseDispatcher; import com.sun.jbi.httpsoapbc.async.AsyncResponseDispatcher;
import com.sun.jbi.httpsoapbc.DispatchPool; import com.sun.jbi.httpsoapbc.DispatchPool;
import com.sun.jbi.httpsoapbc.embedded.EndpointsManagerHttpHandler;
import com.sun.jbi.httpsoapbc.embedded.GrizzlyEmbeddedWebContainer;
import java.util.HashSet;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.grizzly.http.server.NetworkListener;
/** /**
@ -229,10 +234,8 @@ public class HttpSoapBindingLifeCycle
mLogger = Messages.getLogger(getClass()); mLogger = Messages.getLogger(getClass());
mJAXWSEndpointFactory = new JAXWSEndpointFactory(); mJAXWSEndpointFactory = new JAXWSEndpointFactory();
mEmbeddedController = new EmbeddedServerController(this); mEmbeddedController = new EmbeddedServerController(this);
MBeanServer mbServer = jbiContext.getMBeanServer(); MBeanServer mbServer = jbiContext.getMBeanServer();
MBeanNames mbnHndl = jbiContext.getMBeanNames(); MBeanNames mbnHndl = jbiContext.getMBeanNames();
mProcessingExtensionMBeanName = mbnHndl.createCustomComponentMBeanName(PROCESSING_EXTENSION); mProcessingExtensionMBeanName = mbnHndl.createCustomComponentMBeanName(PROCESSING_EXTENSION);
@ -769,6 +772,11 @@ public class HttpSoapBindingLifeCycle
} }
} }
inboundThreadPool.shutdownNow();
if (endpoint.getWSEndpoint() != null) {
endpoint.getWSEndpoint().dispose();
}
//de-register the external endpoint //de-register the external endpoint
ServiceEndpoint sep = endpoint.getEndpointReference(); ServiceEndpoint sep = endpoint.getEndpointReference();
if (sep != null) { if (sep != null) {
@ -1079,6 +1087,10 @@ public class HttpSoapBindingLifeCycle
return mServiceUnitManager.queryResource(context, endpoint); return mServiceUnitManager.queryResource(context, endpoint);
} }
public Set<Endpoint> getRegisteredEndpoints() {
return new HashSet<Endpoint>(mEndpoints.values());
}
private void logComponentInfo() { private void logComponentInfo() {
StringBuffer msgBuf = new StringBuffer( StringBuffer msgBuf = new StringBuffer(
mMessages.getString("HTTPBC-R00101.Binding_started_detailed", mMessages.getString("HTTPBC-R00101.Binding_started_detailed",

View File

@ -80,6 +80,8 @@ import com.sun.jbi.nms.wsdl11wrapper.HelperFactory;
import com.sun.jbi.nms.wsdl11wrapper.WrapperBuilder; import com.sun.jbi.nms.wsdl11wrapper.WrapperBuilder;
import com.sun.jbi.nms.wsdl11wrapper.WrapperProcessingException; import com.sun.jbi.nms.wsdl11wrapper.WrapperProcessingException;
import com.sun.jbi.nms.wsdl11wrapper.util.WrapperUtil; import com.sun.jbi.nms.wsdl11wrapper.util.WrapperUtil;
import java.util.HashSet;
import java.util.Set;
/** /**
* *
@ -369,7 +371,9 @@ public class Soap11Normalizer implements SoapNormalizer {
mimeParts = metaData.getOutputSOAPMimeContents(); mimeParts = metaData.getOutputSOAPMimeContents();
} }
//MimeHeaders mimeHeaders = soapMessage.getMimeHeaders(); Set<String> resolvedAttachments = new HashSet<String>();
// Process MIME attachments
Iterator mimeContents = mimeParts.values().iterator(); Iterator mimeContents = mimeParts.values().iterator();
while (mimeContents.hasNext()) { while (mimeContents.hasNext()) {
MIMEContent mimeContent = (MIMEContent) mimeContents.next(); MIMEContent mimeContent = (MIMEContent) mimeContents.next();
@ -389,9 +393,27 @@ public class Soap11Normalizer implements SoapNormalizer {
// rely on the WrapperBuilder API to create the cid per the URI scheme // rely on the WrapperBuilder API to create the cid per the URI scheme
String cid = wrapperBuilder.addPartWithAttachment(mimePart); String cid = wrapperBuilder.addPartWithAttachment(mimePart);
normalMsg.addAttachment(cid, dataHandler); normalMsg.addAttachment(cid, dataHandler);
resolvedAttachments.add(contentId);
} }
} }
} }
// Process other attachments : MTOM, SWAREF
for (Iterator attachments = soapMessage.getAttachments(); attachments.hasNext();) {
AttachmentPart attachment = (AttachmentPart) attachments.next();
String contentId = attachment.getContentId();
if (! resolvedAttachments.contains(contentId)) {
DataHandler dataHandler = attachment.getDataHandler();
// Be careful about <cid: ...>
if (contentId.indexOf('<') == 0 && (contentId.indexOf('>') == contentId.length() - 1)) {
contentId = contentId.substring(1, contentId.length() - 1);
}
normalMsg.addAttachment(contentId, dataHandler);
}
}
} }
protected void processSoapBody(WrapperBuilder wrapperBuilder, SOAPBody soapElement, OperationMetaData meta, boolean inMsg) protected void processSoapBody(WrapperBuilder wrapperBuilder, SOAPBody soapElement, OperationMetaData meta, boolean inMsg)

Some files were not shown because too many files have changed in this diff Show More