riftsaw SVN: r1380 - trunk/distribution/src/main/release/conf/juddi.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2011-06-09 13:30:43 -0400 (Thu, 09 Jun 2011)
New Revision: 1380
Modified:
trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml
Log:
RIFTSAW-358 - using JAXWSTransport
Modified: trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml
===================================================================
--- trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml 2011-06-09 17:28:59 UTC (rev 1379)
+++ trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml 2011-06-09 17:30:43 UTC (rev 1380)
@@ -12,7 +12,7 @@
<property name="serviceDescription" value="BPEL Service deployed by Riftsaw"/>
<property name="bindingDescription" value="BPEL Endpoint deployed by Riftsaw"/>
</properties>
- <!--In VM Transport Settings -->
+ <!--In VM Transport Settings
<proxyTransport>org.apache.juddi.v3.client.transport.InVMTransport</proxyTransport>
<custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
<inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
@@ -21,6 +21,16 @@
<subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
<subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
+ -->
+ <!-- JAX-WS Transport -->
+ <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+ <custodyTransferUrl>${webservice.baseurl}/juddiv3/services/custody-transfer</custodyTransferUrl>
+ <inquiryUrl>${webservice.baseurl}/juddiv3/services/inquiry</inquiryUrl>
+ <publishUrl>${webservice.baseurl}/juddiv3/services/publish</publishUrl>
+ <securityUrl>${webservice.baseurl}/juddiv3/services/security</securityUrl>
+ <subscriptionUrl>${webservice.baseurl}/juddiv3/services/subscription</subscriptionUrl>
+ <subscriptionListenerUrl>${webservice.baseurl}/juddiv3/services/subscription-listener</subscriptionListenerUrl>
+ <juddiApiUrl>${webservice.baseurl}/juddiv3/services/juddi-api?wsdl</juddiApiUrl>
</node>
</nodes>
<clerks registerOnStartup="true">
13 years, 6 months
riftsaw SVN: r1379 - trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2011-06-09 13:28:59 -0400 (Thu, 09 Jun 2011)
New Revision: 1379
Modified:
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
Log:
RIFTSAW-358 - using async registration so we can use JAXWSTransport for UDDI registration.
Modified: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
===================================================================
--- trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2011-06-09 08:31:13 UTC (rev 1378)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2011-06-09 17:28:59 UTC (rev 1379)
@@ -36,13 +36,14 @@
import org.apache.juddi.v3.client.config.UDDIClerk;
import org.apache.juddi.v3.client.config.UDDIClerkManager;
import org.apache.juddi.v3.client.mapping.BPEL2UDDI;
-import org.apache.juddi.v3.client.mapping.ServiceLocator;
+import org.apache.juddi.v3.client.mapping.AsyncRegistration;
+import org.apache.juddi.v3.client.mapping.RegistrationInfo;
+import org.apache.juddi.v3.client.mapping.RegistrationType;
import org.apache.juddi.v3.client.mapping.URLLocalizer;
import org.apache.juddi.v3.client.transport.TransportException;
import org.jboss.soa.bpel.runtime.JBossDSPFactory;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.dsp.ws.WSDLReference;
-import org.uddi.api_v3.BindingTemplate;
/**
*
@@ -58,9 +59,9 @@
UDDIClerk bpelClerk = null;
boolean selfRegister = false;
- BPEL2UDDI bpel2UDDI = null;
- ServiceLocator serviceLocator = null;
+ URLLocalizer urlLocalizer = null;
Properties properties = null;
+ AsyncRegistration registration = null;
public UDDIRegistrationImpl(Properties properties) {
super();
@@ -69,7 +70,7 @@
String bpelUDDIConfig = properties.getProperty(BPEL_UDDI_CONFIG);
if (bpelUDDIConfig!=null) {
try {
- UDDIClerkManager clerkManager = new UDDIClerkManager(bpelUDDIConfig);
+ UDDIClerkManager clerkManager = new UDDIClerkManager(bpelUDDIConfig, properties);
clerkManager.start();
selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
@@ -81,9 +82,7 @@
throw new ConfigurationException("Could not find UDDI Clerk named "+ bpelClerk.getName());
}
this.properties = properties;
- URLLocalizer urlLocalizer = new JBossURLLocalizer(properties);
- bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
- serviceLocator = new ServiceLocator(bpelClerk, urlLocalizer, properties);
+ urlLocalizer = new JBossURLLocalizer(properties);
} catch (Exception e) {
log.error(e.getMessage(),e);
}
@@ -99,7 +98,7 @@
* @throws RemoteException
*/
public void shutdown() throws Exception {
- serviceLocator.shutdown();
+ registration.getServiceLocator(bpelClerk.getName()).shutdown();
}
/**
* Registers a BPEL ServiceEndpointReference (EPR) into a UDDI registry using the jUDDI client code.
@@ -109,18 +108,27 @@
* @param metaData
* @param wsdlRef
*/
- public void registerBPELProcess(QName serviceName, String version, String portName, URL serviceUrl,
+ public void registerBPELProcess(QName serviceQName, String version, String portName, URL serviceUrl,
URL wsdlURL, Definition wsdlDefinition) {
if (selfRegister) {
try {
- BindingTemplate binding = bpel2UDDI.register(serviceName, portName, serviceUrl, wsdlDefinition);
- serviceLocator.addService(binding.getServiceKey());
+ RegistrationInfo registrationInfo = new RegistrationInfo();
+ registrationInfo.setServiceQName(serviceQName);
+ registrationInfo.setVersion(version);
+ registrationInfo.setPortName(portName);
+ registrationInfo.setServiceUrl(serviceUrl);
+ registrationInfo.setWsdlUrl(wsdlURL);
+ registrationInfo.setWsdlDefinition(wsdlDefinition);
+ registrationInfo.setRegistrationType(RegistrationType.BPEL);
+ registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
+ Thread thread = new Thread(registration);
+ thread.start();
} catch (Exception e) {
- log.error("Unable to register service " + serviceName
+ log.error("Unable to register service " + serviceQName
+ " ." + e.getMessage(),e);
} catch (Throwable t) {
- log.error("Unable to register service " + serviceName
+ log.error("Unable to register service " + serviceQName
+ " ." + t.getMessage(),t);
}
@@ -136,8 +144,9 @@
public void unRegisterBPELEPR(QName serviceName, String portName, URL serviceURL) {
if (selfRegister) {
try {
+ BPEL2UDDI bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
String serviceKey = bpel2UDDI.unRegister(serviceName, portName, serviceURL);
- serviceLocator.removeService(serviceKey);
+ registration.getServiceLocator(bpelClerk.getName()).removeService(serviceKey);
} catch (Exception e) {
log.error("Unable to unRegister EPR for " + serviceName
+ " ." + e.getMessage(),e);
@@ -149,7 +158,7 @@
}
public String lookupEndpoint(QName serviceQName, String portName) {
- return serviceLocator.lookupEndpoint(serviceQName, portName);
+ return registration.getServiceLocator(bpelClerk.getName()).lookupEndpoint(serviceQName, portName);
}
/**
@@ -157,7 +166,7 @@
*/
public WSDLReference lookupWSDL(QName serviceQName, String portName) {
- log.info("No yet supported.");
+ log.info("Not yet supported.");
return null;
}
13 years, 6 months
riftsaw SVN: r1378 - trunk/integration-tests.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-06-09 04:31:13 -0400 (Thu, 09 Jun 2011)
New Revision: 1378
Modified:
trunk/integration-tests/pom.xml
Log:
* re-enable the jboss-as-client.
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
+++ trunk/integration-tests/pom.xml 2011-06-09 08:31:13 UTC (rev 1378)
@@ -56,11 +56,6 @@
<artifactId>xml-apis</artifactId>
<version>1.3.04</version>
</dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
<dependency>
<groupId>org.jboss.soa.bpel.dependencies.esb</groupId>
<artifactId>jbossesb-config-model</artifactId>
@@ -73,7 +68,7 @@
<version>${jbossts.version}</version>
<scope>test</scope>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>${jboss.version}</version>
@@ -96,8 +91,52 @@
<groupId>jboss.jbossws</groupId>
<artifactId>jboss-jaxws</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.security</groupId>
+ <artifactId>jacc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-slide</groupId>
+ <artifactId>webdavlib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jpl-pattern</groupId>
+ <artifactId>jpl-pattern</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jpl-util</groupId>
+ <artifactId>jpl-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.security</groupId>
+ <artifactId>jaas</artifactId>
+ </exclusion>
</exclusions>
- </dependency-->
+ </dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-aspects</artifactId>
@@ -141,10 +180,6 @@
<groupId>apache-log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
- <exclusion>
- <groupId>trove</groupId>
- <artifactId>trove</artifactId>
- </exclusion>
</exclusions>
</dependency>
<dependency>
13 years, 6 months
riftsaw SVN: r1377 - in trunk: console/bpaf and 5 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-06-09 04:00:42 -0400 (Thu, 09 Jun 2011)
New Revision: 1377
Modified:
trunk/console/bpaf/pom.xml
trunk/console/integration/pom.xml
trunk/distribution/pom.xml
trunk/integration-tests/pom.xml
trunk/pom.xml
trunk/runtime/clustering/pom.xml
trunk/runtime/engine/pom.xml
Log:
* remove the obsolete jars from deprecated jboss repo.
* fixing the maven3 warnning, mostly about the plugins' version.
Modified: trunk/console/bpaf/pom.xml
===================================================================
--- trunk/console/bpaf/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/console/bpaf/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -51,14 +51,8 @@
</dependency>
<!-- RiftSaw -->
-
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-bpel-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-bpel-schemas</artifactId>
</dependency>
Modified: trunk/console/integration/pom.xml
===================================================================
--- trunk/console/integration/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/console/integration/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -39,11 +39,6 @@
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-bpel-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-bpel-schemas</artifactId>
</dependency>
Modified: trunk/distribution/pom.xml
===================================================================
--- trunk/distribution/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/distribution/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -172,10 +172,6 @@
<artifactId>derbytools</artifactId>
<version>${derby.version}</version>
</dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
<!--
BPM Console
@@ -184,19 +180,19 @@
<dependency>
<groupId>org.jboss.soa.bpel.console</groupId>
<artifactId>bpel2svg</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel.console</groupId>
<artifactId>integration</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel.console</groupId>
<artifactId>bpaf</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
@@ -208,7 +204,7 @@
<dependency>
<groupId>org.jboss.soa.bpel.console</groupId>
<artifactId>identity</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/integration-tests/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -18,6 +18,7 @@
<jboss.version>5.1.0.GA</jboss.version>
<test.delay>20000</test.delay>
<ws.stack>native</ws.stack>
+ <quartz.version>1.6.0</quartz.version>
</properties>
<dependencies>
<dependency>
@@ -44,6 +45,22 @@
<version>4.9</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>quartz</artifactId>
+ <version>${quartz.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
<dependency>
<groupId>org.jboss.soa.bpel.dependencies.esb</groupId>
<artifactId>jbossesb-config-model</artifactId>
@@ -56,7 +73,7 @@
<version>${jbossts.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>${jboss.version}</version>
@@ -80,7 +97,7 @@
<artifactId>jboss-jaxws</artifactId>
</exclusion>
</exclusions>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-aspects</artifactId>
@@ -96,6 +113,38 @@
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.security</groupId>
+ <artifactId>jacc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-slide</groupId>
+ <artifactId>webdavlib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -104,12 +153,80 @@
<version>${jboss.version}</version>
<classifier>jboss-aspect-library</classifier>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-slide</groupId>
+ <artifactId>webdavlib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxws</groupId>
+ <artifactId>jsr181-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-aspects</artifactId>
<version>${jboss.version}</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-slide</groupId>
+ <artifactId>webdavlib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxws</groupId>
+ <artifactId>jsr181-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -403,29 +403,26 @@
<build>
<!-- This section defines the default plugin settings inherited by child projects. -->
<pluginManagement>
- <plugins>
- <!-- Fixes how test resources of a project can be used in projects dependent on it -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
<plugins>
+ <!-- Fixes how test resources of a project can be used in projects dependent on it -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
<!-- Specify the compiler options and settings -->
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <!--version>2.0.2</version-->
+ <version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -434,11 +431,12 @@
<optimize>true</optimize>
<compilerArgument>-verbose</compilerArgument>
</configuration>
- </plugin>
- <!-- Produce source jars during the 'verify' phase -->
- <plugin>
+ </plugin>
+ <!-- Produce source jars during the 'verify' phase -->
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -448,22 +446,25 @@
</goals>
</execution>
</executions>
- </plugin>
- <plugin>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.7.2</version>
<configuration>
<includes>
<include>**/*TestCase.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
- </plugin>
- <plugin>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
- </plugin>
- </plugins>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<reporting>
@@ -471,6 +472,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.7.2</version>
</plugin>
<!--plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -501,12 +503,6 @@
</snapshots>
</repository>
- <repository>
- <id>riftsaw-ode-2.3.0-SNAPSHOT</id>
- <name>JBoss RiftSaw 2.3.0-SNAPSHOT</name>
- <url>https://repository.jboss.org/nexus/content/repositories/jboss_release_sta...</url>
- </repository>
-
</repositories>
</project>
Modified: trunk/runtime/clustering/pom.xml
===================================================================
--- trunk/runtime/clustering/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/runtime/clustering/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -24,6 +24,24 @@
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-cluster</artifactId>
<version>${jboss.clustering.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>jpl-pattern</groupId>
+ <artifactId>jpl-pattern</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jpl-util</groupId>
+ <artifactId>jpl-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.security</groupId>
+ <artifactId>jaas</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
Modified: trunk/runtime/engine/pom.xml
===================================================================
--- trunk/runtime/engine/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
+++ trunk/runtime/engine/pom.xml 2011-06-09 08:00:42 UTC (rev 1377)
@@ -100,14 +100,13 @@
<artifactId>jboss-as-system-jmx</artifactId>
<version>${jboss.version}</version>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-client</artifactId>
- <version>${jboss.version}</version>
- <type>pom</type>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
13 years, 6 months
riftsaw SVN: r1376 - branches/ODE/RiftSaw-ODE-trunk.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-06-09 00:12:26 -0400 (Thu, 09 Jun 2011)
New Revision: 1376
Modified:
branches/ODE/RiftSaw-ODE-trunk/pom.xml
Log:
*upgrade xmlbeans-maven plugin version to 2.3.3 as MEAD needed, also explicitly make this plugin depending on xmlbeans:2.2.0
Modified: branches/ODE/RiftSaw-ODE-trunk/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-08 11:45:47 UTC (rev 1375)
+++ branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-09 04:12:26 UTC (rev 1376)
@@ -232,11 +232,18 @@
</dependency>
</dependencies>
</plugin>
-
+ <!-- have to use 2.3.3 version, the 2.2.0 version will pull in the xmlbeans:xmlbeans:2.2.0.jar which is not existed. (Needed for MEAD) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
- <version>${xmlbeans.version}</version>
+ <version>2.3.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.xmlbeans</groupId>
+ <artifactId>xmlbeans</artifactId>
+ <version>${xmlbeans.version}</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
13 years, 6 months
riftsaw SVN: r1375 - in branches/ODE/RiftSaw-ODE-trunk: bpel-runtime and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2011-06-08 07:45:47 -0400 (Wed, 08 Jun 2011)
New Revision: 1375
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml
branches/ODE/RiftSaw-ODE-trunk/dao-jpa-db/pom.xml
branches/ODE/RiftSaw-ODE-trunk/dao-jpa/pom.xml
branches/ODE/RiftSaw-ODE-trunk/pom.xml
Log:
* remove the openjpa dependencies as we don't need it.
* exclude the openjpa related modules.
* removing the warnings from maven3.
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml 2011-06-07 15:17:28 UTC (rev 1374)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml 2011-06-08 11:45:47 UTC (rev 1375)
@@ -80,11 +80,6 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-jpa-ojpa</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-dao-jpa-hibernate</artifactId>
<scope>test</scope>
</dependency>
@@ -117,24 +112,7 @@
<groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-agents</artifactId>
</dependency>
-
<dependency>
- <groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-jacob</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-bpel-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-bpel-dao</artifactId>
- </dependency>
- <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
@@ -197,13 +175,6 @@
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>tranql</groupId>
<artifactId>tranql-connector-derby-common</artifactId>
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa/pom.xml 2011-06-07 15:17:28 UTC (rev 1374)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa/pom.xml 2011-06-08 11:45:47 UTC (rev 1375)
@@ -76,11 +76,6 @@
<artifactId>xmlParserAPIs</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>net.sourceforge.serp</groupId>
<artifactId>serp</artifactId>
</dependency>
@@ -94,41 +89,7 @@
</dependencies>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>openjpa-enhancer</id>
- <phase>process-classes</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy todir="${basedir}/target/classes-openjpa">
- <fileset dir="${basedir}/target/classes">
- <include name="**/*" />
- </fileset>
- </copy>
- <property name="maven.compile.classpath" refid="maven.compile.classpath"/>
- <path id="classpath">
- <pathelement location="${basedir}/target/classes-openjpa"/>
- <pathelement path="${maven.compile.classpath}"/>
- </path>
- <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="classpath"/>
- <openjpac directory="${basedir}/target/classes-openjpa">
- <fileset dir="${basedir}/src/main">
- <include name="**/*.java" />
- </fileset>
- <classpath refid="classpath"/>
- </openjpac>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
+ <plugins>
<!-- copy orm.xml to classes folder for using custom sequence -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -152,24 +113,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>openjpa-enhancer-package</id>
- <phase>package</phase>
- <configuration>
- <classifier>openjpa</classifier>
- <classesDirectory>${project.build.directory}/classes-openjpa</classesDirectory>
- </configuration>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Modified: branches/ODE/RiftSaw-ODE-trunk/dao-jpa-db/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/dao-jpa-db/pom.xml 2011-06-07 15:17:28 UTC (rev 1374)
+++ branches/ODE/RiftSaw-ODE-trunk/dao-jpa-db/pom.xml 2011-06-08 11:45:47 UTC (rev 1375)
@@ -81,11 +81,6 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-jpa</artifactId>
- <classifier>openjpa</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-bpel-store</artifactId>
</dependency>
<dependency>
@@ -93,10 +88,6 @@
<artifactId>xercesImpl</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- </dependency>
- <dependency>
<groupId>net.sourceforge.serp</groupId>
<artifactId>serp</artifactId>
</dependency>
Modified: branches/ODE/RiftSaw-ODE-trunk/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-07 15:17:28 UTC (rev 1374)
+++ branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-08 11:45:47 UTC (rev 1375)
@@ -139,7 +139,6 @@
<persistence-api.version>1.0</persistence-api.version>
<xalan.version>2.7.1</xalan.version>
<ant.version>1.6.5</ant.version>
- <openjpa.version>1.3.0-SNAPSHOT</openjpa.version>
<serp.version>1.13.1</serp.version>
<dom4j.version>1.6.1</dom4j.version>
<derby.version>10.5.3.0_1</derby.version>
@@ -172,9 +171,9 @@
<!--module>dao-hibernate</module-->
<module>tools</module>
<module>dao-jpa-hibernate</module>
- <module>dao-jpa-ojpa</module>
+ <!--module>dao-jpa-ojpa</module>
<module>dao-jpa-db</module>
- <!--module>dao-hibernate-db</module-->
+ <module>dao-hibernate-db</module-->
<module>scheduler-simple</module>
<module>bpel-store</module>
<module>bpel-runtime</module>
@@ -268,6 +267,11 @@
<maxmemory>512m</maxmemory>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
</plugins>
</pluginManagement>
</build>
@@ -281,17 +285,6 @@
-->
<repositories>
<repository>
- <id>servicemix-repo</id>
- <name>ServiceMix Repository</name>
- <url>https://repository.apache.org/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
@@ -304,18 +297,6 @@
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
-
- <repository>
- <id>intalio</id>
- <name>intalio repo</name>
- <url>http://www.intalio.org/public/maven2</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
</repositories>
<!-- |
@@ -419,12 +400,6 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-jpa</artifactId>
- <version>${ode.version}</version>
- <classifier>openjpa</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-jca-ra</artifactId>
<version>${ode.version}</version>
</dependency>
@@ -450,11 +425,6 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-jpa-ojpa</artifactId>
- <version>${ode.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-scheduler-simple</artifactId>
<version>${ode.version}</version>
</dependency>
@@ -707,11 +677,6 @@
<version>${javax.mail.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <version>${openjpa.version}</version>
- </dependency>
- <dependency>
<groupId>net.sourceforge.serp</groupId>
<artifactId>serp</artifactId>
<version>${serp.version}</version>
13 years, 6 months
riftsaw SVN: r1374 - branches/ODE/RiftSaw-ODE-trunk.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-06-07 11:17:28 -0400 (Tue, 07 Jun 2011)
New Revision: 1374
Modified:
branches/ODE/RiftSaw-ODE-trunk/pom.xml
Log:
Comment out axis2 module as not required.
Modified: branches/ODE/RiftSaw-ODE-trunk/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-07 14:34:12 UTC (rev 1373)
+++ branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-07 15:17:28 UTC (rev 1374)
@@ -180,8 +180,8 @@
<module>bpel-runtime</module>
<module>bpel-connector</module>
<module>bpel-test</module>
- <module>axis2</module>
- <!--module>jbi</module>
+ <!--module>axis2</module>
+ <module>jbi</module>
<module>jbi-bundle</module>
<module>jbi-karaf</module>
<module>distro/src/examples-jbi/maven2/helloworld2-osgi</module>
13 years, 7 months
riftsaw SVN: r1373 - in trunk/runtime: uddi/src/main/java/org/jboss/soa/bpel/uddi and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2011-06-07 10:34:12 -0400 (Tue, 07 Jun 2011)
New Revision: 1373
Added:
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
Log:
RIFTSAW-358 - registration of BPEL processes according to OASIS technote 'uddi-spec-tc-tn-bpel-20040725'
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java 2011-06-07 14:32:54 UTC (rev 1372)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java 2011-06-07 14:34:12 UTC (rev 1373)
@@ -23,6 +23,7 @@
import java.net.URL;
+import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import org.jboss.soa.dsp.ws.WSDLReference;
@@ -32,7 +33,7 @@
* @author Kurt T Stam <kurt.stam(a)jboss.com>
*
*/
-public interface UDDIRegistration {
+public interface UDDIRegistration {
/**
* Registers a BPEL ServiceEndpointReference (EPR) into a UDDI registry using the jUDDI client code.
* If the serviceKey does not already exist we register the service along with the EPR.
@@ -41,17 +42,28 @@
* @param metaData
* @param wsdlRef
*/
- public void registerEPR(String serviceName, String portName, URL accessUrl);
+ public void registerBPELProcess(QName serviceName, String version, String portName,
+ URL accessUrl, URL wsdlUrl, Definition definition);
/**
* UnRegisters the binding from the UDDI Registry.
* @param QName of the service
* @param port name
*/
- public void unRegisterEPR(QName service, String port);
+ public void unRegisterBPELEPR(QName service, String port, URL accessUrl);
/**
*
* @param service
* @param port
*/
public WSDLReference lookupWSDL(QName serviceQName, String portName);
+ /**
+ *
+ * @param service
+ * @param port
+ */
+ public String lookupEndpoint(QName serviceQName, String portName);
+ /**
+ * Call shutdown to release all resources held by the UDDI client.
+ */
+ public void shutdown() throws Exception;
}
Added: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java
===================================================================
--- trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java (rev 0)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/JBossURLLocalizer.java 2011-06-07 14:34:12 UTC (rev 1373)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.uddi;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.juddi.v3.client.mapping.URLLocalizer;
+import org.jboss.soa.bpel.runtime.JBossDSPFactory;
+import org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl;
+import org.jboss.soa.dsp.server.ServerConfig;
+
+/**
+ *
+ * * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ *
+ */
+public class JBossURLLocalizer implements URLLocalizer {
+
+ protected static final Log log = LogFactory.getLog(JBossURLLocalizer.class);
+ private Properties properties = new Properties();
+
+ public JBossURLLocalizer(Properties properties) {
+ super();
+ this.properties = properties;
+ }
+
+ /**
+ *
+ * @param urlIn
+ * @return
+ */
+ public String rewriteToWSDLURL(URL url) {
+ return getWebserviceBaseUrl() + "/" + url.getPath() + "?wsdl";
+ }
+ /**
+ *
+ * @param urlIn
+ * @return
+ */
+ public String rewrite(URL url) {
+ return getWebserviceBaseUrl() + "/" + url.getPath();
+ }
+ /**
+ *
+ * @return
+ */
+ private String getWebserviceBaseUrl() {
+ String url = properties.getProperty(BPELEngineImpl.BPEL_WEBSERVICE_BASEURL);
+ if (url != null) {
+ return url;
+ }
+ return getDefaultWebServiceBaseUrl();
+ }
+
+ private String getDefaultWebServiceBaseUrl() {
+ try {
+ ServerConfig serverConfig=JBossDSPFactory.getServerConfig();
+ String webServiceHost = serverConfig.getWebServiceHost();
+ int webServicePort = serverConfig.getWebServicePort();
+ URL theURL = new URL("http://" + webServiceHost + ":" + webServicePort);
+ if (Boolean.valueOf(properties.getProperty(BPELEngineImpl.BPEL_WEBSERVICE_SECURE, "false"))) {
+ int secureWebServicePort = serverConfig.getWebServicePort();
+ theURL = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
+ }
+ return theURL.toExternalForm();
+ } catch (MalformedURLException e) {
+ log.error("Error in constructing the webservice base url.", e);
+ return null;
+ }
+ }
+}
Modified: trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
===================================================================
--- trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2011-06-07 14:32:54 UTC (rev 1372)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2011-06-07 14:34:12 UTC (rev 1373)
@@ -21,49 +21,28 @@
*/
package org.jboss.soa.bpel.uddi;
-import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
-import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.juddi.api_v3.AccessPointType;
import org.apache.juddi.v3.annotations.AnnotationProcessor;
-import org.apache.juddi.v3.client.config.TokenResolver;
import org.apache.juddi.v3.client.config.UDDIClerk;
import org.apache.juddi.v3.client.config.UDDIClerkManager;
-import org.apache.juddi.v3.client.config.UDDIClientContainer;
+import org.apache.juddi.v3.client.mapping.BPEL2UDDI;
+import org.apache.juddi.v3.client.mapping.ServiceLocator;
+import org.apache.juddi.v3.client.mapping.URLLocalizer;
import org.apache.juddi.v3.client.transport.TransportException;
-import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
-import org.jboss.soa.bpel.runtime.ws.WebServiceClient;
-import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.bpel.runtime.JBossDSPFactory;
+import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.dsp.ws.WSDLReference;
-import org.uddi.api_v3.AccessPoint;
import org.uddi.api_v3.BindingTemplate;
-import org.uddi.api_v3.BindingTemplates;
-import org.uddi.api_v3.BusinessService;
-import org.uddi.api_v3.CategoryBag;
-import org.uddi.api_v3.Description;
-import org.uddi.api_v3.FindQualifiers;
-import org.uddi.api_v3.FindService;
-import org.uddi.api_v3.GetAuthToken;
-import org.uddi.api_v3.Name;
-import org.uddi.api_v3.ServiceInfo;
-import org.uddi.api_v3.ServiceList;
-import org.uddi.api_v3.TModelInstanceDetails;
-import org.uddi.api_v3.TModelInstanceInfo;
-import org.uddi.v3_service.DispositionReportFaultMessage;
/**
*
@@ -73,77 +52,55 @@
public class UDDIRegistrationImpl extends AnnotationProcessor implements UDDIRegistration {
protected static final Log log = LogFactory.getLog(UDDIRegistrationImpl.class);
- private final static String BPEL_UDDI_CLERK_MANAGER = "bpel.uddi.clerk.manager";
private final static String BPEL_UDDI_CLERK = "bpel.uddi.clerk";
private final static String BPEL_UDDI_CONFIG = "bpel.uddi.config";
- private final static String DEFAULT_BPEL_UDDI_CLERK_MANAGER = "esb.manager";
private final static String DEFAULT_BPEL_UDDI_CLERK = "BPELClerk";
- private Properties properties = new Properties();
+
UDDIClerk bpelClerk = null;
+ boolean selfRegister = false;
+ BPEL2UDDI bpel2UDDI = null;
+ ServiceLocator serviceLocator = null;
+ Properties properties = null;
- public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
- public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-${nodeName}-";
- //Can be set in the uddi.xml property section
- public static final String LANG = "lang";
- public static final String SERVICE_DESCRIPTION = "serviceDescription";
- public static final String SERVICE_CATEGORY_BAG = "serviceCategoryBag";
- public static final String BINDING_DESCRIPTION = "bindingDescription";
- public static final String BINDING_CATEGORY_BAG = "bindingCategoryBag";
- public static final String BINDING_TMODEL_KEYS = "bindingTModelKeys";
- public static final String SERVICE_KEY_FORMAT = "serviceKeyFormat";
- public static final String BINDING_KEY_FORMAT = "bindingKeyFormat";
-
- private String clerkManagerName = null;
-
-
public UDDIRegistrationImpl(Properties properties) {
super();
- this.properties = properties;
- String bpelUDDIConfig = getBPELUDDIConfig();
+
+ properties.put("nodeName", JBossDSPFactory.getServerConfig().getUddiNodeName());
+ String bpelUDDIConfig = properties.getProperty(BPEL_UDDI_CONFIG);
if (bpelUDDIConfig!=null) {
try {
UDDIClerkManager clerkManager = new UDDIClerkManager(bpelUDDIConfig);
clerkManager.start();
- clerkManagerName = clerkManager.getName();
+ selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
+ Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
+ String clerkName = properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK);
+ bpelClerk = clerks.get(clerkName);
+ //Add the properties from the uddi.xml
+ properties.putAll(bpelClerk.getUDDINode().getProperties());
+ if (bpelClerk==null) {
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ bpelClerk.getName());
+ }
+ this.properties = properties;
+ URLLocalizer urlLocalizer = new JBossURLLocalizer(properties);
+ bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
+ serviceLocator = new ServiceLocator(bpelClerk, urlLocalizer, properties);
} catch (Exception e) {
log.error(e.getMessage(),e);
}
} else {
- log.debug("Using jbossesb.sar/esb.uddi.client.xml");
+ log.error("The 'bpel.uddi.config' property must be defined in the bpel.properties file");
}
}
-
- private String getBPELUDDIConfig() {
- return (properties.getProperty(BPEL_UDDI_CONFIG));
- }
- private String getClerkManagerName() {
- if (clerkManagerName!=null) {
- log.debug("ClerkManagerName is " + clerkManagerName);
- return clerkManagerName;
- } else {
- String clerkManager = (properties.getProperty(BPEL_UDDI_CLERK_MANAGER, DEFAULT_BPEL_UDDI_CLERK_MANAGER));
- log.debug("ClerkManagerName is " + clerkManager);
- return clerkManager;
- }
+ /**
+ * Releasing the resources we are holding (such as the subscriptionListener in the UDDIServiceCache).
+ * @throws TransportException
+ * @throws ConfigurationException
+ * @throws RemoteException
+ */
+ public void shutdown() throws Exception {
+ serviceLocator.shutdown();
}
-
- private String getClerkName() {
- return (properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK));
- }
-
- private synchronized UDDIClerk getBPELClerk() throws ConfigurationException {
- if (bpelClerk==null) {
- UDDIClerkManager clerkManager = UDDIClientContainer.getUDDIClerkManager(getClerkManagerName());
- Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
- bpelClerk = clerks.get(getClerkName());
- if (bpelClerk==null) {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
- }
- }
- return bpelClerk;
- }
-
/**
* Registers a BPEL ServiceEndpointReference (EPR) into a UDDI registry using the jUDDI client code.
* If the serviceKey does not already exist we register the service along with the EPR.
@@ -152,36 +109,23 @@
* @param metaData
* @param wsdlRef
*/
- public void registerEPR(String serviceName, String portName, URL accessUrl) {
- boolean selfRegister = false;
- try {
- UDDIClerkManager clerkManager = UDDIClientContainer.getUDDIClerkManager(getClerkManagerName());
- selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
- if (selfRegister) {
- Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(getClerkName());
- if (bpelClerk!=null) {
- try {
- BusinessService service = createBusinessService(bpelClerk, serviceName, portName, accessUrl);
- bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
- } catch (Exception e) {
- log.error("Unable to register service " + serviceName
- + " ." + e.getMessage(),e);
- } catch (Throwable t) {
- log.error("Unable to register service " + serviceName
- + " ." + t.getMessage(),t);
- }
- } else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
- }
+ public void registerBPELProcess(QName serviceName, String version, String portName, URL serviceUrl,
+ URL wsdlURL, Definition wsdlDefinition) {
+ if (selfRegister) {
+
+ try {
+ BindingTemplate binding = bpel2UDDI.register(serviceName, portName, serviceUrl, wsdlDefinition);
+ serviceLocator.addService(binding.getServiceKey());
+ } catch (Exception e) {
+ log.error("Unable to register service " + serviceName
+ + " ." + e.getMessage(),e);
+ } catch (Throwable t) {
+ log.error("Unable to register service " + serviceName
+ + " ." + t.getMessage(),t);
}
- } catch (ConfigurationException ce) {
- if (selfRegister) {
- log.error(ce.getMessage(),ce);
- } else {
- log.info(ce.getMessage());
- }
+
}
+
}
/**
* UnRegisters the binding from the UDDI Registry.
@@ -189,351 +133,33 @@
* @param metaData
* @param wsdlRef
*/
- public void unRegisterEPR(QName service, String port) {
- boolean selfRegister = false;
- try {
- UDDIClerkManager clerkManager = UDDIClientContainer.getUDDIClerkManager(getClerkManagerName());
- selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
- if (selfRegister) {
- Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(getClerkName());
- String bindingName = service.getLocalPart() + "-" + port;
- if (bpelClerk!=null) {
- try {
- Properties properties = bpelClerk.getUDDINode().getProperties();
- properties.put("nodeName", JBossDSPFactory.getServerConfig().getUddiNodeName());
- //Constructing the bindingKey
- String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + bindingName, properties);
- if (properties.containsKey(BINDING_KEY_FORMAT)) {
- bindingKey = TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + bindingName, properties);
- }
- bindingKey = bindingKey.toLowerCase();
- try {
- boolean isRemoveServiceIfNoTemplates = true; //we can make this configurable if needed.
- if (isRemoveServiceIfNoTemplates) {
- BindingTemplate bindingTemplate = bpelClerk.findServiceBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
- BusinessService businessService = bpelClerk.findService(bindingTemplate.getServiceKey(), bpelClerk.getUDDINode().getApiNode());
- if (businessService.getBindingTemplates().getBindingTemplate().size()==1 &&
- businessService.getBindingTemplates().getBindingTemplate().get(0).getBindingKey().equals(bindingKey)) {
- log.info("info removing service " + businessService.getServiceKey() + "from UDDI.");
- bpelClerk.unRegisterService(businessService.getServiceKey(),bpelClerk.getUDDINode().getApiNode());
- } else {
- log.info("info removing binding " + bindingKey + "from UDDI.");
- bpelClerk.unRegisterBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
- }
- } else {
- log.info("info removing binding " + bindingKey + "from UDDI.");
- bpelClerk.unRegisterBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
- }
- } catch (Exception e) {
- log.warn("Could not unRegister BindingTemplate with key " + bindingKey);
- }
- } catch (Exception e) {
- log.error("Unable to unRegister EPR " + bindingName
- + " ." + e.getMessage(),e);
- } catch (Throwable t) {
- log.error("Unable to unRegister EPR " + bindingName
- + " ." + t.getMessage(),t);
- }
- } else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
- }
+ public void unRegisterBPELEPR(QName serviceName, String portName, URL serviceURL) {
+ if (selfRegister) {
+ try {
+ String serviceKey = bpel2UDDI.unRegister(serviceName, portName, serviceURL);
+ serviceLocator.removeService(serviceKey);
+ } catch (Exception e) {
+ log.error("Unable to unRegister EPR for " + serviceName
+ + " ." + e.getMessage(),e);
+ } catch (Throwable t) {
+ log.error("Unable to unRegister EPR for " + serviceName
+ + " ." + t.getMessage(),t);
}
- } catch (ConfigurationException ce) {
- if (selfRegister) {
- log.error(ce.getMessage(),ce);
- } else {
- log.info(ce.getMessage());
- }
}
}
- private BusinessService createBusinessService(UDDIClerk clerk,
- String serviceName, String portName, URL accessUrl)
- throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
- Properties properties = clerk.getUDDINode().getProperties();
- properties.put("nodeName", JBossDSPFactory.getServerConfig().getUddiNodeName());
-
- //Constructing the serviceKey
- String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + serviceName, properties);
- if (properties.containsKey(SERVICE_KEY_FORMAT)) {
- serviceKey = TokenResolver.replaceTokens((String)properties.get(SERVICE_KEY_FORMAT) + serviceName, properties);
- }
- BusinessService service = null;
- try {
- //Checking if this serviceKey already exist
- service = clerk.findService(serviceKey, clerk.getUDDINode().getApiNode());
- if (service==null) {
- service = createBusinessService(serviceName, serviceKey, properties);
- } else {
- log.debug("Service " + serviceName + " already present in the UDDI Registry");
- }
- } catch (Exception e) {
-
- //This is here to support the jUDDI-client code prior to 3.0.3 where an
- //exception was thrown when a service was not found.
- //DEPRECATED, please remove when older jUDDI-client versions are no longer supported.
- service = createBusinessService(serviceName, serviceKey, properties);
- }
- //Construct bindingTemplate
- BindingTemplate binding = createBindingTemplate(clerk, serviceName, portName, accessUrl);
- //Add the bindingTemplate on the service
- if (service.getBindingTemplates()==null) {
- BindingTemplates bindingTemplates = new BindingTemplates();
- service.setBindingTemplates(bindingTemplates);
- }
- service.getBindingTemplates().getBindingTemplate().add(binding);
- return service;
+ public String lookupEndpoint(QName serviceQName, String portName) {
+ return serviceLocator.lookupEndpoint(serviceQName, portName);
}
- private BusinessService createBusinessService(String serviceName, String serviceKey, Properties properties) {
- //If it does not exist construct service information
- log.debug("Constructing Service UDDI Information for " + serviceName);
- BusinessService service = new BusinessService();
- service.setBusinessKey(TokenResolver.replaceTokens("uddi:${keyDomain}:${businessKey}", properties));
- service.setServiceKey(serviceKey);
- String lang = "en";
- if (properties.containsKey(SERVICE_DESCRIPTION)) {
- Description description = new Description();
- if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
- description.setLang(lang);
- description.setValue(properties.getProperty(SERVICE_DESCRIPTION));
- service.getDescription().add(description);
- }
- Name sName = new Name();
- sName.setLang(lang);
- sName.setValue(serviceName);
- service.getName().add(sName);
- //default categoryBag on the binding
- if (properties.containsKey(SERVICE_CATEGORY_BAG)) {
- String defaultCategoryBag = properties.getProperty(SERVICE_CATEGORY_BAG);
- log.info("Adding categoryBag: " + defaultCategoryBag);
- CategoryBag categoryBag = parseCategoryBag(defaultCategoryBag);
- service.setCategoryBag(categoryBag);
- }
- return service;
- }
-
- private BindingTemplate createBindingTemplate(UDDIClerk clerk,
- String serviceName, String portName, URL accessURL) {
-
- Properties properties = clerk.getUDDINode().getProperties();
- BindingTemplate bindingTemplate = new BindingTemplate();
-
- //Constructing the bindingKey
- String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + serviceName + "-"
- + portName, properties);
- if (properties.containsKey(BINDING_KEY_FORMAT)) {
- bindingKey = TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + serviceName + "-"
- + portName, properties);
- }
-
- bindingTemplate.setBindingKey(bindingKey);
-
- String lang = "en";
- if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
- if (properties.containsKey(BINDING_DESCRIPTION)) {
- Description bindingDescription = new Description();
- bindingDescription.setLang(lang);
- bindingDescription.setValue(properties.getProperty(BINDING_DESCRIPTION));
- bindingTemplate.getDescription().add(bindingDescription);
- }
-
- AccessPoint accessPoint = new AccessPoint();
- accessPoint.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
- accessURL = rewriteWSDLURL(accessURL);
- accessPoint.setValue(accessURL.toExternalForm());
- bindingTemplate.setAccessPoint(accessPoint);
-
- //default tModelKeys on the binding
- String defaultTModelKeys = properties.getProperty("tModelKeys");
- if (defaultTModelKeys!=null && !"".equals(defaultTModelKeys)) {
- String[] tModelKeys= defaultTModelKeys.split(",");
- for (String tModelKey : tModelKeys) {
- TModelInstanceInfo instanceInfo = new TModelInstanceInfo();
- instanceInfo.setTModelKey(tModelKey);
- if (bindingTemplate.getTModelInstanceDetails()==null) {
- bindingTemplate.setTModelInstanceDetails(new TModelInstanceDetails());
- }
- bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);
- }
- }
- //default categoryBag on the binding
- String defaultCategoryBag = properties.getProperty("bindingCategoryBag");
- if (defaultCategoryBag!=null && !"".equals(defaultCategoryBag)) {
- log.info("Adding categoryBag: " + defaultCategoryBag);
- CategoryBag categoryBag = parseCategoryBag(defaultCategoryBag);
- bindingTemplate.setCategoryBag(categoryBag);
- }
-
- return bindingTemplate;
- }
-
/**
- * Looks up the WSDL for the requested service and portName. The BPELClerk
- * is used to lookup the service in the UDDI Registry by ServiceName. For
- * each Service, it will loop over the BindingTemplates. If a BindingTemplate
- * is found containing an AccessPointType of "wsdlDeployment" then this
- * URL is used to obtain the WSDL. If successful the WSDLReference is returned,
- * if not successful the next bindingTemplate is tried. A null result will be
- * returned if none of the attempts are successful.
+ * Looks up the WSDL for the requested service and portName.
*/
public WSDLReference lookupWSDL(QName serviceQName, String portName) {
-
- try {
- UDDIClerk bpelClerk = getBPELClerk();
- FindService findService = new FindService();
- findService.setAuthInfo(getAuthToken(bpelClerk));
- Name serviceName = new Name();
-
- String lang = "en";
- if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
- serviceName.setLang(lang);
- serviceName.setValue(serviceQName.getLocalPart());
- findService.getName().add(serviceName);
-
- FindQualifiers findQualifiers = new FindQualifiers();
- findQualifiers.getFindQualifier().add("exactMatch");
- findService.setFindQualifiers(findQualifiers);
-
- ServiceList serviceList = bpelClerk.getUDDINode().getTransport().getUDDIInquiryService().findService(findService);
- //Loop over all services found.
- if (serviceList.getServiceInfos()!=null) {
- List<ServiceInfo> serviceInfos = serviceList.getServiceInfos().getServiceInfo();
- for (ServiceInfo serviceInfo : serviceInfos) {
- String serviceKey = serviceInfo.getServiceKey();
-
- BusinessService service = bpelClerk.findService(serviceKey, bpelClerk.getUDDINode().getApiNode());
- BindingTemplates bindingTemplates = service.getBindingTemplates();
- if (bindingTemplates==null) {
- log.warn("Found service " + serviceQName.getLocalPart()
- + " with serviceKey '" + serviceInfo.getServiceKey() + "'"
- + " but no EPRs");
- } else {
- log.info("Found service " + serviceQName.getLocalPart()
- + " with serviceKey '" + serviceInfo.getServiceKey() + "'"
- + " and " + bindingTemplates.getBindingTemplate().size() + " EPRs");
- //Loop over all bindingTemplates found
- for (BindingTemplate bindingTemplate : bindingTemplates.getBindingTemplate()) {
- AccessPoint accessPoint = bindingTemplate.getAccessPoint();
- if (AccessPointType.WSDL_DEPLOYMENT.toString().equals(accessPoint.getUseType())) {
- URL url = null;
- try {
- url = new URL(accessPoint.getValue());
- log.info("wsdlUrl for service " + serviceQName.getLocalPart() + " is " + url);
- WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
- Definition def = wsdlReader.readWSDL(url.toExternalForm());
-// if (log.isDebugEnabled()) {
-// log.debug(getWSDL(url));
-// }
- //Checking if this WSDL contains the right port name.
- Port port = def.getService(serviceQName).getPort(portName);
- if (port!=null) {
- //Current policy: "FirstSuccess" :)
- return new WSDLReference(def, url.toURI());
- } else {
- log.info("PortName " + portName + " could not be found in WSDL");
- }
- } catch (Exception e) {
- log.warn("Unable to obtain WSDL from " + url + ". " + e.getMessage(),e);
- }
- } else {
- log.debug("This accessPoint is of type " + accessPoint.getUseType() + " only "
- + AccessPointType.WSDL_DEPLOYMENT + " is supported at the moment.");
- }
- }
- }
- }
- } else {
- log.info("No Service by the name " + serviceQName.getLocalPart() + " was found in the registry.");
- }
-
- } catch (Exception e) {
- log.error(e.getMessage(),e);
- }
- log.info("No WSDL could be obtained using the UDDI Registry Lookup.");
+
+ log.info("No yet supported.");
return null;
}
- /**
- * Obtains an authToken for this clerk.
- *
- * @param clerk
- * @return
- * @throws TransportException
- * @throws DispositionReportFaultMessage
- * @throws RemoteException
- */
- private String getAuthToken(UDDIClerk clerk) throws TransportException, DispositionReportFaultMessage, RemoteException {
-
- String endpointURL = clerk.getUDDINode().getApiNode().getSecurityUrl();
- GetAuthToken getAuthToken = new GetAuthToken();
- getAuthToken.setUserID(clerk.getPublisher());
- getAuthToken.setCred(clerk.getPassword());
- String authToken = clerk.getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
-
- return authToken;
- }
-// /**
-// * Reads the WSDL from an endpoint URL and returns it in a formatted String.
-// *
-// * @param url - url of a WSDL Endpoint.
-// * @return - Formatted WSDL
-// * @throws IOException when there are IO issues reading the WSDL content from the url.
-// */
-// private String getWSDL(URL url) throws IOException {
-//
-// BufferedInputStream inputStream = (BufferedInputStream) url.getContent();
-// BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
-// StringBuffer buffer = new StringBuffer();
-// String inputLine;
-// while ((inputLine = in.readLine()) != null) {
-// buffer.append(inputLine).append("\r\n");
-// }
-// in.close();
-// return buffer.toString();
-// }
- /**
- *
- * @param urlIn
- * @return
- */
- public URL rewriteWSDLURL(URL urlIn) {
- URL outUrl = urlIn;
- try {
- String urlString = getWebserviceBaseUrl() + urlIn.getFile() + "?wsdl";
- outUrl = new URL(urlString);
- } catch (Exception e) {
- log.error(e.getMessage(),e);
- }
- return outUrl;
- }
- /**
- *
- * @return
- */
- private String getWebserviceBaseUrl() {
- String url = properties.getProperty(WebServiceClient.BPEL_WEBSERVICE_BASEURL);
- if (url != null) {
- return url;
- }
-
- return getDefaultWebServiceBaseUrl();
- }
-
- private String getDefaultWebServiceBaseUrl() {
- try {
- ServerConfig serverConfig=JBossDSPFactory.getServerConfig();
- String webServiceHost = serverConfig.getWebServiceHost();
- int webServicePort = serverConfig.getWebServicePort();
- URL theURL = new URL("http://" + webServiceHost + ":" + webServicePort);
- if (Boolean.valueOf(properties.getProperty(WebServiceClient.BPEL_WEBSERVICE_SECURE, "false"))) {
- int secureWebServicePort = serverConfig.getWebServicePort();
- theURL = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
- }
- return theURL.toExternalForm();
- } catch (MalformedURLException e) {
- log.error("Error in constructing the webservice base url.", e);
- return null;
- }
- }
+
+
}
13 years, 7 months
riftsaw SVN: r1372 - in trunk: distribution/src/main/release/conf/jboss and 5 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2011-06-07 10:32:54 -0400 (Tue, 07 Jun 2011)
New Revision: 1372
Added:
trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml
Removed:
trunk/distribution/src/main/release/conf/juddi/esb.juddi.client.xml
Modified:
trunk/distribution/src/main/release/conf/bpel.properties
trunk/distribution/src/main/release/conf/jboss/jboss-beans.xml
trunk/distribution/src/main/release/conf/juddi/riftsaw_BusinessEntity.xml
trunk/distribution/src/main/release/install/build.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/ExecutionEnvironment.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
trunk/runtime/uddi/pom.xml
Log:
RIFTSAW-368, adding a riftsaw.uddi.xml file, so we have our own client config. Also moved endpoint lookup to invokation time, rather then deploy time.
Modified: trunk/distribution/src/main/release/conf/bpel.properties
===================================================================
--- trunk/distribution/src/main/release/conf/bpel.properties 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/distribution/src/main/release/conf/bpel.properties 2011-06-07 14:32:54 UTC (rev 1372)
@@ -103,11 +103,8 @@
bpel.uddi.lookup=false
# implementation of the client integration class
bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistrationImpl
-# the uddi client config in case you want to use your own client config rather then
-# jbossesb.saw/esb.uddi.client.xml. Commented out by default.
-#bpel.uddi.config=META-INF/bpel.uddi.client.xml
-# only if you don't specify the bpel.uddi.config you need to specify the name of the clerk manager
-bpel.uddi.clerk.manager=uddi-portlet-manager
+# the uddi client config riftsaw.sar/META-INF/riftsaw.uddi.xml
+bpel.uddi.config=META-INF/riftsaw.uddi.xml
# name of the clerk
bpel.uddi.clerk=BPELClerk
Modified: trunk/distribution/src/main/release/conf/jboss/jboss-beans.xml
===================================================================
--- trunk/distribution/src/main/release/conf/jboss/jboss-beans.xml 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/distribution/src/main/release/conf/jboss/jboss-beans.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -18,6 +18,7 @@
<depends>jboss:service=Naming</depends>
<depends>BPELDatabaseInitializer</depends>
<depends>BPELDeployer</depends>
+ <!--<depends>jboss.esb:service=JuddiClient</depends>-->
</bean>
<!--
Deleted: trunk/distribution/src/main/release/conf/juddi/esb.juddi.client.xml
===================================================================
--- trunk/distribution/src/main/release/conf/juddi/esb.juddi.client.xml 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/distribution/src/main/release/conf/juddi/esb.juddi.client.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uddi>
- <reloadDelay>3600000</reloadDelay>
- <manager name="uddi-portlet-manager">
- <nodes>
- <node isHomeJUDDI="true">
- <!-- required 'default' node -->
- <name>default</name>
- <description>Main jUDDI node</description>
- <!-- JAX-WS Transport - The ESB transport requires Service Endpoint URLs and not the WSDL URLs.
- <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiJAXWSTransport</proxyTransport>
- <custodyTransferUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/custody-transfer</custodyTransferUrl>
- <inquiryUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/inquiry</inquiryUrl>
- <publishUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/publish</publishUrl>
- <securityUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/security</securityUrl>
- <subscriptionUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/subscription</subscriptionUrl>
- <subscriptionListenerUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/subscription-listener</subscriptionListenerUrl>
- <juddiApiUrl>http://REMOTE_HOST:REMOTE_PORT/juddiv3/services/juddi-api</juddiApiUrl>
- -->
- <!-- In VM Transport Settings -->
- <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiInVMTransport</proxyTransport>
- <custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
- <inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
- <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
- <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
- <subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
- <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
- <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
- <!-- RMI Transport Settings
- <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiRMITransport</proxyTransport>
- <custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
- <inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
- <publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
- <securityUrl>/juddiv3/UDDISecurityService</securityUrl>
- <subscriptionUrl>/juddiv3/UDDISubscriptionService</subscriptionUrl>
- <subscriptionListenerUrl>/juddiv3/UDDISubscriptionListenerService</subscriptionListenerUrl>
- <juddiApiUrl>/juddiv3/JUDDIApiService</juddiApiUrl>
- <javaNamingFactoryInitial>org.jnp.interfaces.NamingContextFactory</javaNamingFactoryInitial>
- <javaNamingFactoryUrlPkgs>org.jboss.naming</javaNamingFactoryUrlPkgs>
- <javaNamingProviderUrl>jnp://${jboss.esb.bind.address}:1099</javaNamingProviderUrl>
- -->
- </node>
- <node>
- <name>riftsaw</name>
- <description>Riftsaw node</description>
- <properties>
- <property name="keyDomain" value="riftsaw.jboss.org"/>
- <property name="businessKey" value="redhat-jboss"/>
- <property name="serviceDescription" value="BPEL Service deployed by Riftsaw"/>
- <property name="bindingDescription" value="BPEL Endpoint deployed by Riftsaw"/>
- </properties>
- <!--In VM Transport Settings -->
- <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiInVMTransport</proxyTransport>
- <custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
- <inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
- <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
- <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
- <subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
- <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
- <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
-
- </node>
- </nodes>
- <clerks registerOnStartup="true">
- <clerk name="BPELClerk" node="riftsaw" password="" publisher="riftsaw"/>
- </clerks>
- </manager>
-</uddi>
\ No newline at end of file
Copied: trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml (from rev 1351, trunk/distribution/src/main/release/conf/juddi/esb.juddi.client.xml)
===================================================================
--- trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml (rev 0)
+++ trunk/distribution/src/main/release/conf/juddi/riftsaw.uddi.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uddi>
+ <reloadDelay>3600000</reloadDelay>
+ <manager name="riftsaw-manager">
+ <nodes>
+ <node isHomeJUDDI="true">
+ <name>riftsaw</name>
+ <description>Riftsaw node</description>
+ <properties>
+ <property name="keyDomain" value="riftsaw.jboss.org"/>
+ <property name="businessName" value="redhat-jboss"/>
+ <property name="serviceDescription" value="BPEL Service deployed by Riftsaw"/>
+ <property name="bindingDescription" value="BPEL Endpoint deployed by Riftsaw"/>
+ </properties>
+ <!--In VM Transport Settings -->
+ <proxyTransport>org.apache.juddi.v3.client.transport.InVMTransport</proxyTransport>
+ <custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
+ <inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
+ <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
+ <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
+ <subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
+ <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
+ <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
+ </node>
+ </nodes>
+ <clerks registerOnStartup="true">
+ <clerk name="BPELClerk" node="riftsaw" password="" publisher="riftsaw"/>
+ </clerks>
+ </manager>
+</uddi>
\ No newline at end of file
Modified: trunk/distribution/src/main/release/conf/juddi/riftsaw_BusinessEntity.xml
===================================================================
--- trunk/distribution/src/main/release/conf/juddi/riftsaw_BusinessEntity.xml 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/distribution/src/main/release/conf/juddi/riftsaw_BusinessEntity.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -38,7 +38,7 @@
See below for other fields that you may want to edit...
-->
-<businessEntity xmlns="urn:uddi-org:api_v3" xmlns:xml="http://www.w3.org/XML/1998/namespace" businessKey="uddi:riftsaw.jboss.org:redhat-jboss">
+<businessEntity xmlns="urn:uddi-org:api_v3" xmlns:xml="http://www.w3.org/XML/1998/namespace" businessKey="uddi:riftsaw.jboss.org:business_redhat-jboss">
<name xml:lang="en">Riftsaw Business</name>
<!-- Change the description field to provided a brief description of your registry -->
<description xml:lang="en">The business that owns all the services deployed by Riftsaw</description>
Modified: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/distribution/src/main/release/install/build.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -322,7 +322,7 @@
</condition>
</target>
- <target name="deploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry,renameEsbJUDDIClientXML">
+ <target name="deploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry">
<echo>deploy jUDDI configuration</echo>
<copy file="../conf/juddi/riftsaw_Publisher.xml"
@@ -331,34 +331,22 @@
todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" overwrite="true"/>
<copy file="../conf/juddi/riftsaw_BusinessEntity.xml"
todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" overwrite="true" />
+ <copy file="../conf/juddi/riftsaw.uddi.xml"
+ todir="${deploy.dir}/riftsaw.sar/META-INF/" overwrite="true" />
<replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
token="bpel.uddi.registration=false"
value="bpel.uddi.registration=true"/>
<replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
token="bpel.uddi.lookup=false"
value="bpel.uddi.lookup=true"/>
+ <replace file="${deploy.dir}/riftsaw.sar/META-INF/jboss-beans.xml"
+ token="<!--<depends>jboss.esb:service=JuddiClient</depends>-->"
+ value="<depends>jboss.esb:service=JuddiClient</depends>"/>
- <!-- juddi-client, should be removed once esb catches up to 3.0.4-->
- <!-- now deletes the 3.0.3 version, and then copy the 3.0.4 into the esb.deployer/lib-->
- <delete file="${deployers.dir}/esb.deployer/lib/juddi-client-3.0.3.jar" />
- <copy todir="${deployers.dir}/esb.deployer/lib" overwrite="true">
- <fileset dir="../conf/juddi">
- <include name="juddi-client-*.jar"/>
- </fileset>
- </copy>
-
</target>
-
- <target name="renameEsbJUDDIClientXML" if="isNot.renamedToOld" depends="check.esb.juddi.client.xml.old">
- <move file="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml"
- tofile="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml.old" />
- <copy file="../conf/juddi/esb.juddi.client.xml"
- tofile="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml" />
- </target>
-
+
<target name="undeploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry">
<echo>undeploy jUDDI configuration</echo>
- <move file="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml.old" tofile="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml"/>
<delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_Publisher.xml" />
<delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_BusinessEntity.xml" />
<delete file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/riftsaw_tModels.xml" />
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2011-06-07 14:32:54 UTC (rev 1372)
@@ -43,12 +43,14 @@
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
import org.jboss.soa.bpel.runtime.ws.ODEMessageAdapter;
import org.jboss.soa.dsp.InvocationAdapter;
+import org.jboss.soa.dsp.server.ServerConfig;
import org.jboss.soa.bpel.runtime.JBossDSPFactory;
import org.w3c.dom.Element;
import javax.transaction.*;
import javax.transaction.xa.XAResource;
+import java.net.URL;
import java.util.List;
import java.util.StringTokenizer;
import java.util.concurrent.*;
@@ -61,7 +63,10 @@
*/
public class BPELEngineImpl implements BPELEngine, ExecutionEnvironment
{
-
+ private final static String BPEL_UDDI_REGISTRATION = "uddi.registration";
+ public final static String BPEL_WEBSERVICE_SECURE = "webservice.secure";
+ public final static String BPEL_WEBSERVICE_BASEURL = "webservice.baseurl";
+
protected final Log __log = LogFactory.getLog(getClass());
protected final Log __logTx = LogFactory.getLog("org.apache.ode.tx");
@@ -77,6 +82,7 @@
protected ExecutorService _executorService;
protected CronScheduler _cronScheduler;
protected CacheProvider _cacheProvider;
+ protected UDDIRegistration _uddiRegistration;
/**
* The default constructor.
@@ -299,6 +305,8 @@
initCacheProvider();
__log.debug("Initializing BPEL process store.");
initProcessStore(eprContext);
+ __log.debug("Initializing UDDI registration");
+ initUDDIRegistration();
__log.debug("Initializing BPEL server.");
initBpelServer(eprContext);
@@ -350,6 +358,16 @@
_cacheProvider.stop();
+ if (_uddiRegistration != null)
+ try {
+ __log.debug("shutting down UDDI Registration client.");
+ _uddiRegistration.shutdown();
+ _uddiRegistration = null;
+ } catch (Throwable ex) {
+ __log.debug("Error stopping UDDI Registration client.", ex);
+ }
+
+
if( _cronScheduler != null ) {
try {
__log.debug("shutting down cron scheduler.");
@@ -478,6 +496,33 @@
_store = createProcessStore(eprContext, _txMgr, _storeCF);
_store.registerListener(new ProcessStoreListenerImpl());
}
+
+ protected void initUDDIRegistration() {
+ _odeConfig.getProperties();
+ boolean isRegistration = Boolean.valueOf(_odeConfig.getProperty(BPEL_UDDI_REGISTRATION, "false"));
+ boolean isWebserviceSecure = Boolean.valueOf(_odeConfig.getProperty(BPEL_WEBSERVICE_SECURE, "false"));
+ if (isRegistration) {
+ try {
+
+ ServerConfig serverConfig=JBossDSPFactory.getServerConfig();
+ String webServiceHost = serverConfig.getWebServiceHost();
+ int webServicePort = serverConfig.getWebServicePort();
+ URL url = new URL("http://" + webServiceHost + ":" + webServicePort);
+ if (isWebserviceSecure) {
+ int secureWebServicePort = serverConfig.getWebServicePort();
+ url = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
+ }
+ //give the user the option to override
+ if (_odeConfig.getProperty(BPEL_WEBSERVICE_BASEURL)==null) {
+ _odeConfig.getProperties().setProperty(BPEL_WEBSERVICE_BASEURL, url.toExternalForm());
+ }
+ _uddiRegistration = UDDIClientFactory.newInstance(_odeConfig.getProperties());
+ } catch (Exception e) {
+ __log.error(e.getMessage());
+ __log.error("Continuing without UDDI integration.");
+ }
+ }
+ }
protected ProcessStoreImpl createProcessStore(EndpointReferenceContext eprContext, TransactionManager txm, ConfStoreDAOConnectionFactory cf) {
return new RiftSawProcessStore(eprContext, txm, cf, _cacheProvider);
@@ -816,4 +861,8 @@
return _txMgr;
}
+ public UDDIRegistration getUDDIRegistration() {
+ return _uddiRegistration;
+ }
+
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/ExecutionEnvironment.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/ExecutionEnvironment.java 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/ExecutionEnvironment.java 2011-06-07 14:32:54 UTC (rev 1372)
@@ -39,4 +39,6 @@
CronScheduler getCronScheduler();
OdeConfigProperties getOdeConfig();
+
+ UDDIRegistration getUDDIRegistration();
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2011-06-07 14:32:54 UTC (rev 1372)
@@ -48,7 +48,6 @@
private BPELEngineImpl engine;
private EndpointManager endpointManager;
- private UDDIRegistration uddiRegistration = null;
public JAXWSBindingContext(BPELEngineImpl server) {
this.engine = server;
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2011-06-07 14:32:54 UTC (rev 1372)
@@ -29,12 +29,10 @@
import org.jboss.soa.bpel.runtime.JBossDSPFactory;
import org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl;
import org.jboss.soa.bpel.runtime.engine.ode.ExecutionEnvironment;
-import org.jboss.soa.bpel.runtime.engine.ode.UDDIClientFactory;
import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
import org.jboss.soa.dsp.EndpointMetaData;
import org.jboss.soa.dsp.ServiceEndpointReference;
import org.jboss.soa.dsp.server.ServerConfig;
-import org.jboss.soa.bpel.runtime.JBossDSPFactory;
import org.jboss.soa.dsp.ws.BaseWebServiceEndpoint;
import org.jboss.soa.dsp.ws.DeploymentBuilder;
import org.jboss.soa.dsp.ws.WSDLParser;
@@ -61,29 +59,21 @@
public class EndpointManager
{
protected final Log log = LogFactory.getLog(getClass());
- // we should consider having our own OdeConfigProperties class if we need more properties
- private final static String BPEL_UDDI_REGISTRATION = "uddi.registration";
+
private static final String BPEL_WS_STABLE_INTERFACE = "ws.stableInterface";
private Map<String, ServiceEndpointReference> endpointMapping = new ConcurrentHashMap<String, ServiceEndpointReference>();
private ServerConfig serverConfig;
private ExecutionEnvironment executionEnvironment;
- private UDDIRegistration uddiRegistration = null;
+ private UDDIRegistration uddiRegistration;
private boolean stableInterface=false;
public EndpointManager(ExecutionEnvironment executionEnvironment)
{
this.executionEnvironment = executionEnvironment;
this.serverConfig = JBossDSPFactory.getServerConfig();
- if (isUDDIRegistration()) {
- try {
- uddiRegistration = UDDIClientFactory.newInstance(executionEnvironment.getOdeConfig().getProperties());
- } catch (Exception e) {
- log.error(e.getMessage());
- log.error("Running without UDDI integration.");
- }
- }
+ this.uddiRegistration = executionEnvironment.getUDDIRegistration();
stableInterface = executionEnvironment.getOdeConfig().getProperty(BPEL_WS_STABLE_INTERFACE,
"false").equalsIgnoreCase("true");
@@ -202,8 +192,10 @@
ref
);
if (uddiRegistration!=null) {
- uddiRegistration.registerEPR(metaData.getServiceName().getLocalPart(), metaData.getPortName(),
- ref.getServiceUrl());
+ String processId = metaData.getProcessId().getLocalPart();
+ String version = processId.substring(processId.lastIndexOf("-")+1,processId.length());
+ uddiRegistration.registerBPELProcess(metaData.getServiceName(),
+ version, metaData.getPortName(), serviceUrl, wsdlRef.getWsdlURL(), wsdlRef.getDefinition());
}
return ODEServiceEndpointReference.toODE(ref);
@@ -252,7 +244,7 @@
log.warn(ref.getArchiveLocation() + " cannot be removed (doesn't exist).");
}
if (uddiRegistration!=null) {
- uddiRegistration.unRegisterEPR(service, port);
+ uddiRegistration.unRegisterBPELEPR(service, port, ref.getServiceUrl());
}
}
catch (Exception e)
@@ -301,8 +293,4 @@
return( path.delete() );
}
- public boolean isUDDIRegistration() {
- return Boolean.valueOf(executionEnvironment.getOdeConfig().getProperty(BPEL_UDDI_REGISTRATION, "false"));
- }
-
}
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2011-06-07 14:32:54 UTC (rev 1372)
@@ -35,6 +35,7 @@
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
@@ -72,10 +73,6 @@
public class WebServiceClient implements PartnerChannel
{
private static final String JAXWS_CLIENT_INITIALIZER = "jaxws.client.initializer.impl";
-//we should consider having our own OdeConfigProperties class if we need more properties
- public final static String BPEL_UDDI_LOOKUP = "uddi.lookup";
- public final static String BPEL_WEBSERVICE_SECURE = "webservice.secure";
- public final static String BPEL_WEBSERVICE_BASEURL = "webservice.baseurl";
protected final Log log = LogFactory.getLog(getClass());
private boolean isInitialized=false;
@@ -105,6 +102,7 @@
this.engine = engine;
this.executionEnvironment = env;
this.metaData = metaData;
+ this.uddiRegistration = executionEnvironment.getUDDIRegistration();
this.id = metaData.getEndpointId();
this.serviceName = metaData.getServiceName();
@@ -127,41 +125,11 @@
}
private synchronized void initialize() {
- if (isUDDILookup()) {
- try {
- ServerConfig serverConfig=JBossDSPFactory.getServerConfig();
- String webServiceHost = serverConfig.getWebServiceHost();
- int webServicePort = serverConfig.getWebServicePort();
- URL url = new URL("http://" + webServiceHost + ":" + webServicePort);
- if (isWebserviceSecure()) {
- int secureWebServicePort = serverConfig.getWebServicePort();
- url = new URL("https://" + webServiceHost + ":" + secureWebServicePort);
- }
- //give the user the option to override
- if (engine.getOdeConfig().getProperty(BPEL_WEBSERVICE_BASEURL)==null) {
- engine.getOdeConfig().getProperties().setProperty(BPEL_WEBSERVICE_BASEURL, url.toExternalForm());
- }
- uddiRegistration = UDDIClientFactory.newInstance(engine.getOdeConfig().getProperties());
- } catch (Exception e) {
- log.error(e.getMessage());
- log.error("Continuing without UDDI integration.");
- }
- }
- if (isUDDILookup()) {
- WSDLReference wsdlReference = uddiRegistration.lookupWSDL(
- metaData.getServiceName(),
- metaData.getPortName());
- if (wsdlReference!=null) {
- wsdlDefinition = wsdlReference.getDefinition();
- wsdlUrl = wsdlReference.getWsdlURL();
- }
- }
- if (isUDDILookup()==false || wsdlUrl==null) {
- WSDLReference wsdlReference = new WSDLHelper().createWSDLReference(engine,
- metaData.getProcessId(), metaData.getServiceName(), metaData.getPortName());
- wsdlDefinition = wsdlReference.getDefinition();
- wsdlUrl = wsdlReference.getWsdlURL();
- }
+
+ WSDLReference wsdlReference = new WSDLHelper().createWSDLReference(engine,
+ metaData.getProcessId(), metaData.getServiceName(), metaData.getPortName());
+ wsdlDefinition = wsdlReference.getDefinition();
+ wsdlUrl = wsdlReference.getWsdlURL();
this.messageAdapter = new SOAPMessageAdapter(this.wsdlDefinition, serviceName, port.getLocalPart());
isInitialized=true;
@@ -287,6 +255,7 @@
// The actual WS invocation
Dispatch<SOAPMessage> proxy = getDispatcher(epr, port);
+ setEndpointFromUDDI(proxy);
try {
// Set SOAPAction
@@ -302,7 +271,7 @@
// Set client side timeout for the invocation
proxy.getRequestContext().put("javax.xml.ws.client.receiveTimeout", Long.toString(timeout));
- SOAPMessage soapResponseMessage = (SOAPMessage)proxy.invoke(soapRequestMessage);
+ SOAPMessage soapResponseMessage = proxy.invoke(soapRequestMessage);
if (log.isDebugEnabled()) {
log.debug("Riftsaw soap response message: \n" + JavaUtils.getSoapMessageASString(soapResponseMessage));
@@ -415,7 +384,8 @@
}
// The actual WS invocation
- Dispatch proxy = getDispatcher(epr, port);
+ Dispatch<SOAPMessage> proxy = getDispatcher(epr, port);
+ setEndpointFromUDDI(proxy);
// Set SOAPAction
if (soapAction != null) {
@@ -485,7 +455,7 @@
private synchronized Dispatch<SOAPMessage> getDispatcher(javax.xml.ws.EndpointReference epr, QName portName)
{
-
+
if(null==dispatcher) {
log.debug("Creating Dispatcher ("+this.id+") on " + wsdlUrl + ": "+serviceName);
@@ -512,7 +482,6 @@
initializer.serviceCreated();
}
}
-
return dispatcher;
}
@@ -540,21 +509,22 @@
return(initializer);
}
+
+ private void setEndpointFromUDDI(Dispatch<SOAPMessage> proxy) {
+ if (uddiRegistration!=null) {
+ String endpoint = uddiRegistration.lookupEndpoint(serviceName, port.getLocalPart());
+ if (endpoint!=null) {
+ proxy.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);
+ } else {
+ log.debug("Could not find endpoint in UDDI registry for service " + serviceName.getLocalPart());
+ }
+ }
+ }
public String toString()
{
return "WebServiceClient {service="+serviceName+",port="+port+"}";
}
- public boolean isUDDILookup() {
- return Boolean.valueOf(engine.getOdeConfig().getProperty(BPEL_UDDI_LOOKUP, "false"));
- }
-
- public boolean isWebserviceSecure() {
- return Boolean.valueOf(engine.getOdeConfig().getProperty(BPEL_WEBSERVICE_SECURE, "false"));
- }
-
-
-
}
Modified: trunk/runtime/uddi/pom.xml
===================================================================
--- trunk/runtime/uddi/pom.xml 2011-06-07 13:39:25 UTC (rev 1371)
+++ trunk/runtime/uddi/pom.xml 2011-06-07 14:32:54 UTC (rev 1372)
@@ -26,7 +26,7 @@
<dependency>
<artifactId>juddi-client</artifactId>
<groupId>org.apache.juddi</groupId>
- <version>3.0.4</version>
+ <version>3.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
13 years, 7 months
riftsaw SVN: r1371 - in branches/ODE/RiftSaw-ODE-trunk: bpel-runtime and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2011-06-07 09:39:25 -0400 (Tue, 07 Jun 2011)
New Revision: 1371
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/engine/cron/CronSchedulerTest.java
branches/ODE/RiftSaw-ODE-trunk/pom.xml
Log:
Applied Doug's patch (thanks Doug) and commented out reference to dao hib class in CronScheduler test.
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml 2011-06-07 11:58:27 UTC (rev 1370)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/pom.xml 2011-06-07 13:39:25 UTC (rev 1371)
@@ -89,11 +89,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-hibernate</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Modified: branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/engine/cron/CronSchedulerTest.java
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/engine/cron/CronSchedulerTest.java 2011-06-07 11:58:27 UTC (rev 1370)
+++ branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/engine/cron/CronSchedulerTest.java 2011-06-07 13:39:25 UTC (rev 1371)
@@ -35,7 +35,7 @@
import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.bpel.iapi.ProcessConf.CLEANUP_CATEGORY;
import org.apache.ode.bpel.iapi.ProcessConf.CleanupInfo;
-import org.apache.ode.dao.hib.bpel.BpelDAOConnectionImpl;
+//import org.apache.ode.dao.hib.bpel.BpelDAOConnectionImpl;
import org.apache.ode.utils.CronExpression;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;
@@ -52,7 +52,7 @@
BasicConfigurator.configure();
LogManager.getRootLogger().setLevel(Level.DEBUG);
LogManager.getLogger(RuntimeDataCleanupRunnable.class).setLevel(Level.DEBUG);
- LogManager.getLogger(BpelDAOConnectionImpl.class).setLevel(Level.DEBUG);
+ //LogManager.getLogger(BpelDAOConnectionImpl.class).setLevel(Level.DEBUG);
LogManager.getLogger("org.apache.ode").setLevel(Level.DEBUG);
}
Modified: branches/ODE/RiftSaw-ODE-trunk/pom.xml
===================================================================
--- branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-07 11:58:27 UTC (rev 1370)
+++ branches/ODE/RiftSaw-ODE-trunk/pom.xml 2011-06-07 13:39:25 UTC (rev 1371)
@@ -399,11 +399,6 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
- <artifactId>riftsaw-dao-hibernate</artifactId>
- <version>${ode.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-jacob</artifactId>
<version>${ode.version}</version>
</dependency>
13 years, 7 months