riftsaw SVN: r531 - in trunk/docs/docbook/userguide/src/main: module and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-02 01:34:22 -0500 (Tue, 02 Mar 2010)
New Revision: 531
Added:
trunk/docs/docbook/userguide/src/main/module/uddi.xml
Modified:
trunk/docs/docbook/userguide/src/main/master.xml
Log:
RIFTSAW-151 adding UDDI integration documentation.
Modified: trunk/docs/docbook/userguide/src/main/master.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/master.xml 2010-03-02 06:25:04 UTC (rev 530)
+++ trunk/docs/docbook/userguide/src/main/master.xml 2010-03-02 06:34:22 UTC (rev 531)
@@ -14,5 +14,6 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/introduction.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/admin.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/deploy.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/uddi.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="module/esb.xml"/>
</book>
Added: trunk/docs/docbook/userguide/src/main/module/uddi.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/uddi.xml (rev 0)
+++ trunk/docs/docbook/userguide/src/main/module/uddi.xml 2010-03-02 06:34:22 UTC (rev 531)
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<chapter id="uddi">
+ <title>UDDI Integration</title>
+
+ <section>
+ <title>Overview</title>
+
+ <para>
+ The integration of a UDDI client into the RiftSaw runtime codebase allows for the auto-registration
+ of BPEL services to an UDDI registry upon deployment of the service. The registration
+ process uses the jUDDI-3 client libraries which are capable of communicating to any
+ UDDI v3 complaint registry.
+ </para>
+
+ <para>Upon deployment both the Service and its BindingTemplate (EndPoint information) are registered, upon undeployment
+ the BindingTemplate is removed.
+ </para>
+
+ </section>
+
+ <section>
+ <title>UDDI config properties</title>
+
+ <para>
+ By default RiftSaw uses the jUDDI client libraries of JBossESB/SOA-P, and the client
+ configuration is found in the deploy/jbossesb.saw/esb.juddi.client.xml. Both the
+ name of the ClerkManager and the Clerk itself are specified in the
+ <emphasis>bpel.properties</emphasis> file.
+ </para>
+
+ <para>
+ The UDDI properties in the bpel.properties file are:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ bpel.uddi.registration
+ </para>
+ <para>
+ boolean
+ </para>
+ <para>
+ If set to 'false', the UDDI integration is turned off. The RiftSaw installation process
+ sets this value to 'true' only if the jbossesb-registry.sar is detected containing a jUDDI v3
+ registry. In all other case it is defaulted to false.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ bpel.uddi.client.impl
+ </para>
+ <para>
+ String
+ </para>
+ <para>
+ Name of the a class that implements the org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration interface.
+ The RiftSaw installation process set this value to org.jboss.soa.bpel.uddi300.UDDI300RegistrationImpl
+ if JBossESB-4.7 is detected. JBossESB-4.7 uses
+ the jUDDI-3.0.0 client libary, while SOA-P-5.0.0 and future version of JBossESB will use jUDDI-3.0.1 or higher and
+ for those it is set to org.jboss.soa.bpel.uddi.UDDIRegistrationImpl.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ bpel.uddi.clerk.config
+ </para>
+ <para>
+ String
+ </para>
+ <para>
+ Defines the path to the bpel.uddi.client.xml config file. This can be left commented out if
+ you want to use the jbossesb.sar/esb.uddi.client.xml. However in that case a bpel.uddi.clerk.manager
+ needs to be defined.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ bpel.uddi.clerk.manager
+ </para>
+ <para>
+ String
+ </para>
+ <para>
+ Defines the ClerkManager name that will be used if the bpel.uddi.clerk.config is left commented out.
+ This value should correspond to the name of the manager
+ in the esb.juddi.client.xml. For JBossESB-4.7 this is 'test-manager', while for SOA-P-5.0.0
+ and newer version of JBossESB it is 'esb-registry'. Note that if the bpel.uddi.clerk.manager is defined, the
+ setting of the bpel.uddi.clerk.manager is ignored.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ bpel.uddi.clerk
+ </para>
+ <para>
+ String
+ </para>
+ <para>
+ Defines the Clerk name that will be used. This value should correspond to the name of the clerk
+ in the esb.juddi.client.xml. By default this is set to 'BPEL_clerk'.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Default configurations</title>
+ <para>When RiftSaw is deployed to a JBossAS-5.1.0, jUDDI v3 is not installed, and therefor
+ the UDDI integration is turned off (bpel.uddi.registration=false).</para>
+
+ <para>When RiftSaw is deployed to JBossAS-5.1.0 + JBossESB-4.7, the UDDI integration is
+ turned on. By default we use the jUDDI client library which ships with the JBossESB, which
+ is configured in the jbossesb.sar/esb.uddi.client.xml, with manager name 'test-manager'. The bpel.uddi.client.impl is set
+ to org.jboss.soa.bpel.uddi300.UDDI300RegistrationImpl.
+ </para>
+
+ <para>When RiftSaw is deployed to SOA-P-5.0.0 (or JBossESB > 4.7) UDDI integration is
+ turned on and the bpel.uddi.client.impl is set to org.jboss.soa.bpel.uddi.UDDIRegistrationImpl.
+ Again the jbossesb.sar/esb.uddi.client.xml is used, with manager name 'esb.registry'.
+ </para>
+ </section>
+
+ <section>
+ <title>Other UDDI v3 Registries</title>
+
+ <para>Other UDDI v3 complaint registries can be used, however the UDDIv3 spec only requires
+ communication using the UDDI WebServices. To set up SOAP based communication specify the JAXWS-Transport.
+ At this point it makes sense to no longer use the the esb.uddi.client.xml, but rather use your
+ own bpel.uddi.client.xml. For more details please see the jUDDI v3 documentain.
+ </para>
+ </section>
+
+ <section>
+ <title>UDDI Registry Entities and UDDI Seed Data</title>
+
+ <para>In the esb.uddi.client.xml a few properties are defined that are used by the Clerk at
+ registration time. These settings of these values can be customized, however they must
+ correspond to the UDDI seed data specified for the jbossesb publisher, in the
+ jbossesb-registry.sar/juddi_custom_install_data. So you will need to change it there as well.
+ </para>
+
+ <para>The clerk is configured to use the jbossesb publisher and the <emphasis>keyDomain
+ </emphasis> is set to "esb.jboss.org".
+ </para>
+
+ <para>The <emphasis>businessKey</emphasis> is set to "redhat-jboss".</para>
+
+ <para>The <emphasis>serviceDescription</emphasis> is set to "BPEL Service deployed by Riftsaw".</para>
+
+ <para>The <emphasis>bindingDescription</emphasis> is set to "BPEL Endpoint deployed by Riftsaw".</para>
+
+ <para>Note that in soa-p-5 the jbossesb-registry.sar/esb.uddi.xml contains a property
+ <emphasis>juddi.seed.always</emphasis> which is set to "true". This means that that it
+ is always trying to load the root seed data on startup of the server. It is recommended
+ to turn this value to "false" once you are content with the UDDI Seed Data.
+ </para>
+
+ </section>
+
+</chapter>
14 years, 4 months
riftsaw SVN: r530 - in trunk: runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode and 3 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-02 01:25:04 -0500 (Tue, 02 Mar 2010)
New Revision: 530
Modified:
trunk/distribution/src/main/release/db/bpel.properties
trunk/runtime/engine-assembly/src/main/resources/bpel.properties
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
Log:
riftsaw-140, fixing up some details uncovered during writing documentation and testing
Modified: trunk/distribution/src/main/release/db/bpel.properties
===================================================================
--- trunk/distribution/src/main/release/db/bpel.properties 2010-03-02 03:49:32 UTC (rev 529)
+++ trunk/distribution/src/main/release/db/bpel.properties 2010-03-02 06:25:04 UTC (rev 530)
@@ -92,11 +92,14 @@
# file
bpel.uddi.registration=false
# implementation of the client integration class
-bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration
-# name of the clerk manager
+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=esb-registry
# name of the clerk
-bpel.uddi.clerk=BPEL_clerk
+bpel.uddi.clerk=BPELClerk
hibernate.dialect=@dialect@
hibernate.hbm2ddl.auto=update
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java 2010-03-02 03:49:32 UTC (rev 529)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java 2010-03-02 06:25:04 UTC (rev 530)
@@ -35,8 +35,8 @@
public class UDDIClientFactory {
private static Logger log = Logger.getLogger(UDDIClientFactory.class);
- public static final String UDDI_REGISTRATION_IMPL="UDDI-registration-impl";
- public static final String DEFAULT_UDDI_REG_IMPL="org.jboss.soa.bpel.uddi.UDDIRegistration";
+ public static final String UDDI_REGISTRATION_IMPL="bpel.uddi.client.impl";
+ public static final String DEFAULT_UDDI_REG_IMPL="org.jboss.soa.bpel.uddi.UDDIRegistrationImpl";
public static UDDIRegistration newInstance(Properties properties) throws ClassNotFoundException,
InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel.properties
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel.properties 2010-03-02 03:49:32 UTC (rev 529)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel.properties 2010-03-02 06:25:04 UTC (rev 530)
@@ -92,11 +92,14 @@
# file
bpel.uddi.registration=false
# implementation of the client integration class
-bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration
-# name of the clerk manager
+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=esb-registry
# name of the clerk
-bpel.uddi.clerk=BPEL_clerk
+bpel.uddi.clerk=BPELClerk
hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.hbm2ddl.auto=update
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 2010-03-02 03:49:32 UTC (rev 529)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-03-02 06:25:04 UTC (rev 530)
@@ -59,13 +59,13 @@
public class UDDIRegistrationImpl extends AnnotationProcessor implements UDDIRegistration {
protected static final Log log = LogFactory.getLog(UDDIRegistrationImpl.class);
- private final static String BPEL_UDDI_CLERK_MANAGER = "uddi.clerk.manager";
- private final static String BPEL_UDDI_CLERK = "uddi.clerk";
+ 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 = "default.uddi.clerk";
+ private final static String DEFAULT_BPEL_UDDI_CLERK = "BPELClerk";
private Properties properties = new Properties();
- public static final String BPEL_CLERK = "BPELClerk";
public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
//Can be set in the uddi.xml property section
@@ -78,15 +78,39 @@
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();
+ if (bpelUDDIConfig!=null) {
+ try {
+ UDDIClerkManager clerkManager = new UDDIClerkManager(bpelUDDIConfig);
+ clerkManager.start();
+ clerkManagerName = clerkManager.getName();
+ } catch (Exception e) {
+ log.error(e.getMessage(),e);
+ }
+ } else {
+ log.debug("Using jbossesb.sar/esb.uddi.client.xml");
+ }
}
+ private String getBPELUDDIConfig() {
+ return (properties.getProperty(BPEL_UDDI_CONFIG));
+ }
+
private String getClerkManagerName() {
- return (properties.getProperty(BPEL_UDDI_CLERK_MANAGER, DEFAULT_BPEL_UDDI_CLERK_MANAGER));
+ 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;
+ }
}
private String getClerkName() {
@@ -121,7 +145,7 @@
+ " ." + t.getMessage(),t);
}
} else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
}
}
} catch (ConfigurationException ce) {
@@ -145,7 +169,7 @@
selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
if (selfRegister) {
Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ UDDIClerk bpelClerk = clerks.get(getClerkName());
String bindingName = service.getLocalPart() + "-" + port;
if (bpelClerk!=null) {
try {
@@ -174,7 +198,7 @@
+ " ." + t.getMessage(),t);
}
} else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
}
}
} catch (ConfigurationException ce) {
Modified: trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
===================================================================
--- trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java 2010-03-02 03:49:32 UTC (rev 529)
+++ trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java 2010-03-02 06:25:04 UTC (rev 530)
@@ -60,7 +60,8 @@
protected static final Log log = LogFactory.getLog(UDDI300RegistrationImpl.class);
@SuppressWarnings("unused")
private Properties properties = new Properties();
- public static final String BPEL_CLERK = "BPELClerk";
+ private final static String BPEL_UDDI_CLERK = "bpel.uddi.clerk";
+ private final static String DEFAULT_BPEL_UDDI_CLERK = "BPELClerk";
public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
//Can be set in the uddi.xml property section
@@ -73,10 +74,14 @@
public static final String SERVICE_KEY_FORMAT = "serviceKeyFormat";
public static final String BINDING_KEY_FORMAT = "bindingKeyFormat";
- public UDDI300RegistrationImpl(Properties properties) {
+ public UDDI300RegistrationImpl(Properties properties) {
super();
this.properties = properties;
- }
+ }
+
+ private String getClerkName() {
+ return (properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK));
+ }
/**
* 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.
@@ -91,7 +96,7 @@
selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
if (selfRegister) {
Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ UDDIClerk bpelClerk = clerks.get(getClerkName());
if (bpelClerk!=null) {
try {
BusinessService service = createBusinessService(bpelClerk, metaData, wsdlRef);
@@ -104,7 +109,7 @@
+ " ." + t.getMessage(),t);
}
} else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
}
}
} catch (ConfigurationException ce) {
@@ -127,7 +132,7 @@
selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
if (selfRegister) {
Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ UDDIClerk bpelClerk = clerks.get(getClerkName());
String bindingName = service.getLocalPart() + "-" + port;
if (bpelClerk!=null) {
try {
@@ -156,7 +161,7 @@
+ " ." + t.getMessage(),t);
}
} else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ getClerkName());
}
}
} catch (ConfigurationException ce) {
14 years, 4 months
riftsaw SVN: r529 - trunk/docs/docbook/gettingstartedguide/src/main/module.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2010-03-01 22:49:32 -0500 (Mon, 01 Mar 2010)
New Revision: 529
Modified:
trunk/docs/docbook/gettingstartedguide/src/main/module/installation.xml
Log:
* update the installation steps.
Modified: trunk/docs/docbook/gettingstartedguide/src/main/module/installation.xml
===================================================================
--- trunk/docs/docbook/gettingstartedguide/src/main/module/installation.xml 2010-03-02 03:14:18 UTC (rev 528)
+++ trunk/docs/docbook/gettingstartedguide/src/main/module/installation.xml 2010-03-02 03:49:32 UTC (rev 529)
@@ -21,13 +21,10 @@
<section>
<title>Prerequisites</title>
<orderedlist>
- <listitem>JBossAS (version 5.1.GA or higher), available from <ulink url="http://www.jboss.org/jbossas">http://www.jboss.org/jbossas</ulink></listitem>
+ <listitem>JBossAS (version 5.1.0.GA or higher) <strong>jdk6</strong> version, available from <ulink url="http://www.jboss.org/jbossas">http://www.jboss.org/jbossas</ulink></listitem>
<listitem>JBossESB (version 4.7.GA or higher), should download the <emphasis role="bold">jbossesb-4.7.GA.zip</emphasis>, available from <ulink url="http://www.jboss.org/jbossesb">http://www.jboss.org/jbossesb</ulink>.
This is only required to run the ESB/BPEL example.</listitem>
<listitem>RiftSaw (version 2.0 or higher), available from <ulink url="http://www.jboss.org/riftsaw">http://www.jboss.org/riftsaw</ulink></listitem>
- <listitem>If using version 5.1.GA of JBossAS then it will be necessary to
- upgrade JBossWS (version 3.2.1.GA or higher),
- available from <ulink url="http://www.jboss.org/jbossws">http://www.jboss.org/jbossws</ulink></listitem>
<listitem>
Ant, available from <ulink url="http://ant.apache.org/">http://ant.apache.org</ulink>
</listitem>
@@ -65,18 +62,6 @@
</para>
</listitem>
- <listitem>
- Upgrade JBossWS
- <para>
- This is only required if you are using 5.1.GA of JBossAS.
- </para>
- <para>
- Unpack the JBossWS installation into a location alongside the JBossAS installation.
- Then follow the instructions in the JBossWS installation (docs/Install.txt), to upgrade
- the JBossWS version in the JBossAS environment.
- </para>
- </listitem>
-
<listitem>
Install the RiftSaw distribution
<para>
@@ -144,6 +129,8 @@
<orderedlist>
<listitem>mysql</listitem>
<listitem>postgres</listitem>
+ <listitem>oracle</listitem>
+ <listitem>sqlserver</listitem>
</orderedlist>
<para>
@@ -153,6 +140,24 @@
command.
</para>
</section>
+
+ <section>
+ <title>Upgrade web service for JBoss AS</title>
+ <para>
+ If you want to upgrade the web service stack for JBoss AS, in the ${RiftSaw}/install folder, just run command as following:
+ <command>ant deploy -Ddatabase=... -Dws.stack=... -Dws.version=...</command>
+ It will help you download the web service stack, and then upgrade it for JBoss AS.
+ <itemizedlist>
+ <listitem>
+ Available ws.stack options are: 'default', 'cxf', 'metro'. 'default' means the jbossws-native.
+ </listitem>
+ <listitem>
+ Available ws.version options are: '3.2.1.GA', '3.2.2.GA'
+ </listitem>
+ </itemizedlist>
+
+ </para>
+ </section>
</section>
</chapter>
14 years, 4 months
riftsaw SVN: r528 - trunk/runtime/uddi300.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:14:18 -0500 (Mon, 01 Mar 2010)
New Revision: 528
Modified:
trunk/runtime/uddi300/
Log:
riftsaw-140
Property changes on: trunk/runtime/uddi300
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 4 months
riftsaw SVN: r527 - trunk/runtime/uddi.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:14:03 -0500 (Mon, 01 Mar 2010)
New Revision: 527
Modified:
trunk/runtime/uddi/
Log:
riftsaw-140
Property changes on: trunk/runtime/uddi
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 4 months
riftsaw SVN: r526 - trunk/runtime/uddi300.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:12:26 -0500 (Mon, 01 Mar 2010)
New Revision: 526
Removed:
trunk/runtime/uddi300/target/
Log:
riftsaw-140
14 years, 4 months
riftsaw SVN: r525 - trunk/runtime/uddi.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:11:56 -0500 (Mon, 01 Mar 2010)
New Revision: 525
Removed:
trunk/runtime/uddi/target/
Log:
riftsaw-140
14 years, 4 months
riftsaw SVN: r524 - in trunk/runtime: uddi300 and 9 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:11:18 -0500 (Mon, 01 Mar 2010)
New Revision: 524
Added:
trunk/runtime/uddi300/
trunk/runtime/uddi300/README.txt
trunk/runtime/uddi300/pom.xml
trunk/runtime/uddi300/src/
trunk/runtime/uddi300/src/main/
trunk/runtime/uddi300/src/main/java/
trunk/runtime/uddi300/src/main/java/org/
trunk/runtime/uddi300/src/main/java/org/jboss/
trunk/runtime/uddi300/src/main/java/org/jboss/soa/
trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/
trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/
trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
trunk/runtime/uddi300/target/
trunk/runtime/uddi300/target/classes/
Log:
riftsaw-140
Added: trunk/runtime/uddi300/README.txt
===================================================================
--- trunk/runtime/uddi300/README.txt (rev 0)
+++ trunk/runtime/uddi300/README.txt 2010-03-02 03:11:18 UTC (rev 524)
@@ -0,0 +1 @@
+We need this as long as we are supporting jbossesb-4.7.
\ No newline at end of file
Added: trunk/runtime/uddi300/pom.xml
===================================================================
--- trunk/runtime/uddi300/pom.xml (rev 0)
+++ trunk/runtime/uddi300/pom.xml 2010-03-02 03:11:18 UTC (rev 524)
@@ -0,0 +1,126 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-uddi300</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0-CR2</version>
+ <name>RiftSaw::Runtime::UDDI300</name>
+
+ <parent>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>runtime</artifactId>
+ <version>2.0-CR2</version>
+ </parent>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- UDDI v3 -->
+ <dependency>
+ <artifactId>juddi-client</artifactId>
+ <groupId>org.apache.juddi</groupId>
+ <version>3.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-engine</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+
+ </dependencies>
+
+
+ <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>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.1.1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <excludes>
+ <exclude>jboss:jboss-common</exclude>
+ <exclude>jboss:jboss-system</exclude>
+ <exclude>jboss:jboss-jmx</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <!-- Specify the compiler options and settings -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>false</showWarnings>
+ </configuration>
+ </plugin>
+
+ <!-- Produce source jars during the 'verify' phase -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+</project>
Added: trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java
===================================================================
--- trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java (rev 0)
+++ trunk/runtime/uddi300/src/main/java/org/jboss/soa/bpel/uddi300/UDDI300RegistrationImpl.java 2010-03-02 03:11:18 UTC (rev 524)
@@ -0,0 +1,277 @@
+/*
+ * 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.uddi300;
+
+import java.rmi.RemoteException;
+import java.util.Map;
+import java.util.Properties;
+
+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.transport.TransportException;
+import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
+import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
+import org.jboss.soa.bpel.runtime.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.Name;
+import org.uddi.api_v3.TModelInstanceDetails;
+import org.uddi.api_v3.TModelInstanceInfo;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ *
+ * * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ *
+ */
+public class UDDI300RegistrationImpl extends AnnotationProcessor implements UDDIRegistration {
+
+ protected static final Log log = LogFactory.getLog(UDDI300RegistrationImpl.class);
+ @SuppressWarnings("unused")
+ private Properties properties = new Properties();
+ public static final String BPEL_CLERK = "BPELClerk";
+ public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
+ public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
+ //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";
+
+ public UDDI300RegistrationImpl(Properties properties) {
+ super();
+ this.properties = properties;
+ }
+ /**
+ * 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.
+ *
+ * @param EPR
+ * @param metaData
+ * @param wsdlRef
+ */
+ public void registerEPR(EndpointMetaData metaData, WSDLReference wsdlRef) {
+ boolean selfRegister = false;
+ try {
+ selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
+ if (selfRegister) {
+ Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
+ UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ if (bpelClerk!=null) {
+ try {
+ BusinessService service = createBusinessService(bpelClerk, metaData, wsdlRef);
+ bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
+ } catch (Exception e) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + e.getMessage(),e);
+ } catch (Throwable t) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + t.getMessage(),t);
+ }
+ } else {
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ }
+ }
+ } catch (ConfigurationException ce) {
+ if (selfRegister) {
+ log.error(ce.getMessage(),ce);
+ } else {
+ log.info(ce.getMessage());
+ }
+ }
+ }
+ /**
+ * UnRegisters the binding from the UDDI Registry.
+ * @param EPR
+ * @param metaData
+ * @param wsdlRef
+ */
+ public void unRegisterEPR(QName service, String port) {
+ boolean selfRegister = false;
+ try {
+ selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
+ if (selfRegister) {
+ Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
+ UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ String bindingName = service.getLocalPart() + "-" + port;
+ if (bpelClerk!=null) {
+ try {
+ Properties properties = bpelClerk.getUDDINode().getProperties();
+ //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();
+ //Lookup the binding
+ BindingTemplate binding = null;
+ try {
+ binding = bpelClerk.findServiceBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
+ //TODO Kurt: Just delete this binding -not all bindings- upgrade the jUDDI client to support this.
+ BusinessService businessService = bpelClerk.findService(binding.getServiceKey(), bpelClerk.getUDDINode().getApiNode());
+ bpelClerk.unRegister(businessService, bpelClerk.getUDDINode().getApiNode());
+ } catch (Exception e) {
+ log.warn("Could not find BindingTemplate with key " + bindingKey + " for unRegistration.");
+ }
+ } 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 "+ BPEL_CLERK);
+ }
+ }
+ } catch (ConfigurationException ce) {
+ if (selfRegister) {
+ log.error(ce.getMessage(),ce);
+ } else {
+ log.info(ce.getMessage());
+ }
+ }
+ }
+
+ private BusinessService createBusinessService(UDDIClerk clerk,
+ EndpointMetaData metaData, WSDLReference wsdlRef)
+ throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
+ Properties properties = clerk.getUDDINode().getProperties();
+ //Constructing the serviceKey
+ String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + metaData.getServiceName().getLocalPart(), properties);
+ if (properties.containsKey(SERVICE_KEY_FORMAT)) {
+ serviceKey = TokenResolver.replaceTokens((String)properties.get(SERVICE_KEY_FORMAT) + metaData.getServiceName(), properties);
+ }
+ BusinessService service = null;
+ try {
+ //Checking if this serviceKey already exist
+ service = clerk.findService(serviceKey, clerk.getUDDINode().getApiNode());
+ log.debug("Service " + metaData.getServiceName() + " already present in the UDDI Registry");
+ } catch (Exception e) {
+ //If it does not exist construct service information
+ log.debug("Constructing Service UDDI Information for " + metaData.getServiceName());
+ service = new BusinessService();
+ service.setBusinessKey(TokenResolver.replaceTokens("uddi:${keyDomain}:${businessKey}", properties));
+ service.setServiceKey(serviceKey);
+ if (properties.containsKey(SERVICE_DESCRIPTION)) {
+ Description description = new Description();
+ String lang = "en";
+ if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
+ description.setLang(lang);
+ description.setValue(properties.getProperty(SERVICE_DESCRIPTION));
+ Name serviceName = new Name();
+ serviceName.setLang(lang);
+ serviceName.setValue(metaData.getServiceName().getLocalPart());
+ service.getName().add(serviceName);
+ service.getDescription().add(description);
+ }
+ //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);
+ }
+ }
+ //Construct bindingTemplate
+ BindingTemplate binding = createBindingTemplate(clerk, metaData, wsdlRef);
+ //Add the bindingTemplate on the service
+ if (service.getBindingTemplates()==null) {
+ BindingTemplates bindingTemplates = new BindingTemplates();
+ service.setBindingTemplates(bindingTemplates);
+ }
+ service.getBindingTemplates().getBindingTemplate().add(binding);
+ return service;
+ }
+
+ private BindingTemplate createBindingTemplate(UDDIClerk clerk,
+ EndpointMetaData metaData, WSDLReference wsdlRef) {
+
+ Properties properties = clerk.getUDDINode().getProperties();
+ BindingTemplate bindingTemplate = new BindingTemplate();
+ //Constructing the bindingKey
+ String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + metaData.getServiceName().getLocalPart() + "-"
+ + metaData.getPortName(), properties);
+ if (properties.containsKey(BINDING_KEY_FORMAT)) {
+ bindingKey = TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + metaData.getServiceName().getLocalPart() + "-"
+ + metaData.getPortName(), 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());
+ accessPoint.setValue(wsdlRef.getWsdlFileURL().toString());
+ 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;
+ }
+
+
+
+}
14 years, 4 months
riftsaw SVN: r523 - in trunk/runtime: uddi and 9 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 22:10:56 -0500 (Mon, 01 Mar 2010)
New Revision: 523
Added:
trunk/runtime/uddi/
trunk/runtime/uddi/pom.xml
trunk/runtime/uddi/src/
trunk/runtime/uddi/src/main/
trunk/runtime/uddi/src/main/java/
trunk/runtime/uddi/src/main/java/org/
trunk/runtime/uddi/src/main/java/org/jboss/
trunk/runtime/uddi/src/main/java/org/jboss/soa/
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
trunk/runtime/uddi/target/
trunk/runtime/uddi/target/classes/
Log:
riftsaw-140
Added: trunk/runtime/uddi/pom.xml
===================================================================
--- trunk/runtime/uddi/pom.xml (rev 0)
+++ trunk/runtime/uddi/pom.xml 2010-03-02 03:10:56 UTC (rev 523)
@@ -0,0 +1,126 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-uddi</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0-CR2</version>
+ <name>RiftSaw::Runtime::UDDI</name>
+
+ <parent>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>runtime</artifactId>
+ <version>2.0-CR2</version>
+ </parent>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- UDDI v3 -->
+ <dependency>
+ <artifactId>juddi-client</artifactId>
+ <groupId>org.apache.juddi</groupId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-engine</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+
+ </dependencies>
+
+
+ <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>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.1.1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <excludes>
+ <exclude>jboss:jboss-common</exclude>
+ <exclude>jboss:jboss-system</exclude>
+ <exclude>jboss:jboss-jmx</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <!-- Specify the compiler options and settings -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>false</showWarnings>
+ </configuration>
+ </plugin>
+
+ <!-- Produce source jars during the 'verify' phase -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+</project>
Added: 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 (rev 0)
+++ trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-03-02 03:10:56 UTC (rev 523)
@@ -0,0 +1,295 @@
+/*
+ * 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.rmi.RemoteException;
+import java.util.Map;
+import java.util.Properties;
+
+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.transport.TransportException;
+import org.jboss.soa.bpel.runtime.engine.ode.UDDIRegistration;
+import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
+import org.jboss.soa.bpel.runtime.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.Name;
+import org.uddi.api_v3.TModelInstanceDetails;
+import org.uddi.api_v3.TModelInstanceInfo;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ *
+ * * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ *
+ */
+public class UDDIRegistrationImpl extends AnnotationProcessor implements UDDIRegistration {
+
+ protected static final Log log = LogFactory.getLog(UDDIRegistrationImpl.class);
+ private final static String BPEL_UDDI_CLERK_MANAGER = "uddi.clerk.manager";
+ private final static String BPEL_UDDI_CLERK = "uddi.clerk";
+ private final static String DEFAULT_BPEL_UDDI_CLERK_MANAGER = "esb.manager";
+ private final static String DEFAULT_BPEL_UDDI_CLERK = "default.uddi.clerk";
+ private Properties properties = new Properties();
+
+ public static final String BPEL_CLERK = "BPELClerk";
+ public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
+ public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
+ //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";
+
+
+
+ public UDDIRegistrationImpl(Properties properties) {
+ super();
+ this.properties = properties;
+ }
+
+ private String getClerkManagerName() {
+ return (properties.getProperty(BPEL_UDDI_CLERK_MANAGER, DEFAULT_BPEL_UDDI_CLERK_MANAGER));
+ }
+
+ private String getClerkName() {
+ return (properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK));
+ }
+
+ /**
+ * 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.
+ *
+ * @param EPR
+ * @param metaData
+ * @param wsdlRef
+ */
+ public void registerEPR(EndpointMetaData metaData, WSDLReference wsdlRef) {
+ 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, metaData, wsdlRef);
+ bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
+ } catch (Exception e) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + e.getMessage(),e);
+ } catch (Throwable t) {
+ log.error("Unable to register service " + metaData.getServiceName()
+ + " ." + t.getMessage(),t);
+ }
+ } else {
+ throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
+ }
+ }
+ } catch (ConfigurationException ce) {
+ if (selfRegister) {
+ log.error(ce.getMessage(),ce);
+ } else {
+ log.info(ce.getMessage());
+ }
+ }
+ }
+ /**
+ * UnRegisters the binding from the UDDI Registry.
+ * @param EPR
+ * @param metaData
+ * @param wsdlRef
+ */
+ public void unRegisterEPR(QName service, String port) {
+ boolean selfRegister = false;
+ try {
+ UDDIClerkManager clerkManager = UDDIClientContainer.getUDDIClerkManager("esb-registry");
+ selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
+ if (selfRegister) {
+ Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
+ UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
+ String bindingName = service.getLocalPart() + "-" + port;
+ if (bpelClerk!=null) {
+ try {
+ Properties properties = bpelClerk.getUDDINode().getProperties();
+ //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();
+ //Lookup the binding
+ BindingTemplate binding = null;
+ try {
+ binding = bpelClerk.findServiceBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
+ //TODO Kurt: Just delete this binding -not all bindings- upgrade the jUDDI client to support this.
+ BusinessService businessService = bpelClerk.findService(binding.getServiceKey(), bpelClerk.getUDDINode().getApiNode());
+ bpelClerk.unRegister(businessService, bpelClerk.getUDDINode().getApiNode());
+ } catch (Exception e) {
+ log.warn("Could not find BindingTemplate with key " + bindingKey + " for unRegistration.");
+ }
+ } 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 "+ BPEL_CLERK);
+ }
+ }
+ } catch (ConfigurationException ce) {
+ if (selfRegister) {
+ log.error(ce.getMessage(),ce);
+ } else {
+ log.info(ce.getMessage());
+ }
+ }
+ }
+
+ private BusinessService createBusinessService(UDDIClerk clerk,
+ EndpointMetaData metaData, WSDLReference wsdlRef)
+ throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
+ Properties properties = clerk.getUDDINode().getProperties();
+ //Constructing the serviceKey
+ String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + metaData.getServiceName().getLocalPart(), properties);
+ if (properties.containsKey(SERVICE_KEY_FORMAT)) {
+ serviceKey = TokenResolver.replaceTokens((String)properties.get(SERVICE_KEY_FORMAT) + metaData.getServiceName(), properties);
+ }
+ BusinessService service = null;
+ try {
+ //Checking if this serviceKey already exist
+ service = clerk.findService(serviceKey, clerk.getUDDINode().getApiNode());
+ log.debug("Service " + metaData.getServiceName() + " already present in the UDDI Registry");
+ } catch (Exception e) {
+ //If it does not exist construct service information
+ log.debug("Constructing Service UDDI Information for " + metaData.getServiceName());
+ service = new BusinessService();
+ service.setBusinessKey(TokenResolver.replaceTokens("uddi:${keyDomain}:${businessKey}", properties));
+ service.setServiceKey(serviceKey);
+ if (properties.containsKey(SERVICE_DESCRIPTION)) {
+ Description description = new Description();
+ String lang = "en";
+ if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
+ description.setLang(lang);
+ description.setValue(properties.getProperty(SERVICE_DESCRIPTION));
+ Name serviceName = new Name();
+ serviceName.setLang(lang);
+ serviceName.setValue(metaData.getServiceName().getLocalPart());
+ service.getName().add(serviceName);
+ service.getDescription().add(description);
+ }
+ //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);
+ }
+ }
+ //Construct bindingTemplate
+ BindingTemplate binding = createBindingTemplate(clerk, metaData, wsdlRef);
+ //Add the bindingTemplate on the service
+ if (service.getBindingTemplates()==null) {
+ BindingTemplates bindingTemplates = new BindingTemplates();
+ service.setBindingTemplates(bindingTemplates);
+ }
+ service.getBindingTemplates().getBindingTemplate().add(binding);
+ return service;
+ }
+
+ private BindingTemplate createBindingTemplate(UDDIClerk clerk,
+ EndpointMetaData metaData, WSDLReference wsdlRef) {
+
+ Properties properties = clerk.getUDDINode().getProperties();
+ BindingTemplate bindingTemplate = new BindingTemplate();
+ //Constructing the bindingKey
+ String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + metaData.getServiceName().getLocalPart() + "-"
+ + metaData.getPortName(), properties);
+ if (properties.containsKey(BINDING_KEY_FORMAT)) {
+ bindingKey = TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + metaData.getServiceName().getLocalPart() + "-"
+ + metaData.getPortName(), 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());
+ accessPoint.setValue(wsdlRef.getWsdlFileURL().toString());
+ 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;
+ }
+
+
+
+}
14 years, 4 months
riftsaw SVN: r522 - in trunk: distribution/src/main/release/db/juddi and 8 other directories.
by riftsaw-commits@lists.jboss.org
Author: kurtstam
Date: 2010-03-01 21:54:09 -0500 (Mon, 01 Mar 2010)
New Revision: 522
Added:
trunk/distribution/src/main/release/db/juddi/esb.juddi300.client.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ClassUtil.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java
Modified:
trunk/distribution/src/main/release/db/bpel.properties
trunk/distribution/src/main/release/db/juddi/esb.juddi.client.xml
trunk/distribution/src/main/release/install/build.xml
trunk/runtime/engine-assembly/pom.xml
trunk/runtime/engine-assembly/src/main/resources/bpel.properties
trunk/runtime/engine/pom.xml
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/ws/EndpointManager.java
trunk/runtime/pom.xml
Log:
Riftsaw-140, Change UDDI integration over to use the jUDDI-3.0.1 libs when those are released. The installation figures out if the target is:
1. plain jboss-5.1
2. jboss-5.1 + jbesb-4.7
3. SOA-P 5 - only this install uses jUDDI-3.0.1
Modified: trunk/distribution/src/main/release/db/bpel.properties
===================================================================
--- trunk/distribution/src/main/release/db/bpel.properties 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/distribution/src/main/release/db/bpel.properties 2010-03-02 02:54:09 UTC (rev 522)
@@ -90,7 +90,13 @@
# if set to true will self-register BPEL endpoints upon deployment to a UDDI.
# this uses the juddi-client-3.0.0 and the uddi client config can be set in the uddi.xml
# file
-bpel.uddi.registration=true
+bpel.uddi.registration=false
+# implementation of the client integration class
+bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration
+# name of the clerk manager
+bpel.uddi.clerk.manager=esb-registry
+# name of the clerk
+bpel.uddi.clerk=BPEL_clerk
hibernate.dialect=@dialect@
hibernate.hbm2ddl.auto=update
Modified: trunk/distribution/src/main/release/db/juddi/esb.juddi.client.xml
===================================================================
--- trunk/distribution/src/main/release/db/juddi/esb.juddi.client.xml 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/distribution/src/main/release/db/juddi/esb.juddi.client.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<uddi>
- <reloadDelay>5000</reloadDelay>
- <manager name="test-manager">
+ <reloadDelay>3600000</reloadDelay>
+ <manager name="esb-registry">
<nodes>
<node>
<!-- required 'default' node -->
@@ -34,7 +34,7 @@
<subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
<juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
<!-- RMI Transport Settings
- <proxyTransport>org.apache.juddi.v3.client.transport.RMITransport</proxyTransport>
+ <proxyTransport>org.jboss.internal.soa.esb.registry.client.JuddiRMITransport</proxyTransport>
<custodyTransferUrl>/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
<inquiryUrl>/juddiv3/UDDIInquiryService</inquiryUrl>
<publishUrl>/juddiv3/UDDIPublicationService</publishUrl>
@@ -47,6 +47,19 @@
<javaNamingProviderUrl>jnp://${jboss.esb.bind.address}:1099</javaNamingProviderUrl>
-->
</node>
+ <node>
+ <name>default-ws</name>
+ <description>jUDDI console node</description>
+ <!-- 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="default" publisher="jbossesb" password="jbossesb" />
Copied: trunk/distribution/src/main/release/db/juddi/esb.juddi300.client.xml (from rev 520, trunk/distribution/src/main/release/db/juddi/esb.juddi.client.xml)
===================================================================
--- trunk/distribution/src/main/release/db/juddi/esb.juddi300.client.xml (rev 0)
+++ trunk/distribution/src/main/release/db/juddi/esb.juddi300.client.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<uddi>
+ <reloadDelay>5000</reloadDelay>
+ <manager name="test-manager">
+ <nodes>
+ <node>
+ <!-- required 'default' node -->
+ <name>default</name>
+ <description>Main jUDDI node</description>
+ <properties>
+ <property name="keyDomain" value="esb.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>
+ <!-- JAX-WS Transport
+ <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+ <custodyTransferUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/custody-transfer?wsdl</custodyTransferUrl>
+ <inquiryUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/inquiry?wsdl</inquiryUrl>
+ <publishUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/publish?wsdl</publishUrl>
+ <securityUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/security?wsdl</securityUrl>
+ <subscriptionUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/subscription?wsdl</subscriptionUrl>
+ <subscriptionListenerUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/subscription-listener?wsdl</subscriptionListenerUrl>
+ <juddiApiUrl>http://${jboss.esb.bind.address}:8080/juddiv3/services/juddi-api?wsdl</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.apache.juddi.v3.client.transport.RMITransport</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>
+ </nodes>
+ <clerks registerOnStartup="true">
+ <clerk name="BPELClerk" node="default" publisher="jbossesb" password="jbossesb" />
+ </clerks>
+ </manager>
+</uddi>
Property changes on: trunk/distribution/src/main/release/db/juddi/esb.juddi300.client.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/distribution/src/main/release/install/build.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -237,13 +237,33 @@
<condition property="is.jbossesb-registry">
<available file="${deploy.dir}/jbossesb-registry.sar" />
</condition>
+ <condition property="isNot.jbossesb-registry">
+ <isfalse value="${is.jbossesb-registry}"/>
+ </condition>
</target>
- <target name="deploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <target name="check.esb.juddi.client.xml.old" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <condition property="is.renamedToOld">
+ <available file="${deploy.dir}/jbossesb-registry.sar/esb.juddi.client.xml.old" />
+ </condition>
+ <condition property="isNot.renamedToOld">
+ <isfalse value="${is.renamedToOld}"/>
+ </condition>
+ </target>
+
+ <target name="check.UDDI300" if="is.jbossesb-registry" depends="check.jbossesb-registry">
+ <condition property="is.juddi300">
+ <available file="${deployers.dir}/esb.deployer/lib/juddi-client-3.0.0.aop.jar" />
+ </condition>
+ <condition property="is.juddi">
+ <isfalse value="${is.juddi300}"/>
+ </condition>
+ </target>
+
+ <target name="deploy.esb.uddi.config" if="is.jbossesb-registry" depends="check.jbossesb-registry,removeUDDI,removeUDDI300,renameEsbJUDDIClientXML">
<echo>deploy jUDDI configuration</echo>
- <move file="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml" tofile="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml.old"/>
- <copy file="../db/juddi/esb.juddi.client.xml"
- todir="${deploy.dir}/jbossesb.sar" />
+
+
<move file="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/jbossesb_tModels.xml"
tofile="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/jbossesb_tModels.xml.old"/>
<copy file="../db/juddi/jbossesb_tModels.xml"
@@ -251,8 +271,48 @@
<copy file="../db/juddi/jbossesb_BusinessEntity.xml"
todir="${deploy.dir}/jbossesb-registry.sar/juddi_custom_install_data/" />
<replace file="${deploy.dir}/riftsaw.sar/bpel.properties" token="bpel.uddi.registration=false" value="bpel.uddi.registration=true"/>
+ <replace file="${deploy.dir}/jbossesb-registry.sar/esb.juddi.xml">
+ <replacetoken><![CDATA[juddi.seed.always">false]]></replacetoken>
+ <replacevalue><![CDATA[juddi.seed.always">true]]></replacevalue>
+ </replace>
+ <echo>${manager.name}</echo>
+ <replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
+ token="bpel.uddi.clerk.manager=esb-registry"
+ value="bpel.uddi.clerk.manager=${manager.name}"/>
+ <replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
+ token="bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration"
+ value="bpel.uddi.client.impl=${UDDI.impl}"/>
</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="../db/juddi/esb.${juddi.version}.client.xml"
+ tofile="${deploy.dir}/jbossesb.sar/esb.juddi.client.xml" />
+ </target>
+
+ <!-- remove riftsaw-uddi jar if esb contains juddi-300 client artifacts -->
+ <target name="removeUDDI" if="is.juddi300" depends="check.UDDI300">
+ <echo>remove riftsaw-uddi.jar</echo>
+ <property name="juddi.version" value="juddi300"/>
+ <property name="manager.name" value="test-manager"/>
+ <property name="UDDI.impl" value="org.jboss.soa.bpel.uddi300.UDDI300Registration" />
+ <delete>
+ <fileset dir="${deploy.dir}/riftsaw.sar/lib/" includes="riftsaw-uddi-*.jar"/>
+ </delete>
+ </target>
+
+ <!-- remove riftsaw-uddi300 jar if esb contains juddi-301 or higher client artifacts -->
+ <target name="removeUDDI300" if="is.juddi" depends="check.UDDI300">
+ <echo>remove riftsaw-uddi300.jar</echo>
+ <property name="juddi.version" value="juddi"/>
+ <property name="manager.name" value="esb-registry"/>
+ <property name="UDDI.impl" value="org.jboss.soa.bpel.uddi.UDDIRegistration" />
+ <delete>
+ <fileset dir="${deploy.dir}/riftsaw.sar/lib/" includes="riftsaw-uddi300-*.jar"/>
+ </delete>
+ </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"/>
Modified: trunk/runtime/engine/pom.xml
===================================================================
--- trunk/runtime/engine/pom.xml 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/engine/pom.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -125,16 +125,7 @@
<artifactId>h2</artifactId>
<scope>provided</scope>
</dependency>
- <!-- UDDI v3 -->
- <dependency>
- <artifactId>juddi-client</artifactId>
- <groupId>org.apache.juddi</groupId>
- <version>3.0.0</version>
- <scope>provided</scope>
- </dependency>
-
-
</dependencies>
Added: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ClassUtil.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ClassUtil.java (rev 0)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ClassUtil.java 2010-03-02 02:54:09 UTC (rev 522)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.soa.bpel.runtime;
+
+/**
+ * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ */
+
+public class ClassUtil {
+ @SuppressWarnings("unchecked")
+ public static Class forName(String name, Class caller)
+ throws ClassNotFoundException
+ {
+ ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
+ if (threadClassLoader != null) {
+ try {
+ return Class.forName(name, true, threadClassLoader) ;
+ } catch (ClassNotFoundException cnfe) {
+ if (cnfe.getException() != null) {
+ throw cnfe;
+ }
+ }
+ }
+
+ ClassLoader callerClassLoader = caller.getClassLoader();
+ if (callerClassLoader != null) {
+ try {
+ return Class.forName(name, true, callerClassLoader) ;
+ } catch (final ClassNotFoundException cnfe) {
+ if (cnfe.getException() != null) {
+ throw cnfe ;
+ }
+ }
+ }
+
+ return Class.forName(name, true, ClassLoader.getSystemClassLoader()) ;
+ }
+}
Added: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java (rev 0)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIClientFactory.java 2010-03-02 02:54:09 UTC (rev 522)
@@ -0,0 +1,55 @@
+/*
+ * 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.runtime.engine.ode;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.bpel.runtime.ClassUtil;
+
+/**
+ *
+ * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ *
+ */
+public class UDDIClientFactory {
+
+ private static Logger log = Logger.getLogger(UDDIClientFactory.class);
+ public static final String UDDI_REGISTRATION_IMPL="UDDI-registration-impl";
+ public static final String DEFAULT_UDDI_REG_IMPL="org.jboss.soa.bpel.uddi.UDDIRegistration";
+
+ public static UDDIRegistration newInstance(Properties properties) throws ClassNotFoundException,
+ InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
+
+ String uddiRegistrationImpl = properties.getProperty(UDDI_REGISTRATION_IMPL,DEFAULT_UDDI_REG_IMPL);
+ Class<?> regClass = null;
+ try {
+ regClass = ClassUtil.forName(uddiRegistrationImpl, UDDIClientFactory.class);
+ } catch (ClassNotFoundException cnfe) {
+ log.error("Could not find class " + UDDI_REGISTRATION_IMPL);
+ throw cnfe;
+ }
+ UDDIRegistration uddiRegistration = (UDDIRegistration) regClass.getConstructor(Properties.class).newInstance(properties);
+ return uddiRegistration;
+ }
+}
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 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/UDDIRegistration.java 2010-03-02 02:54:09 UTC (rev 522)
@@ -21,57 +21,17 @@
*/
package org.jboss.soa.bpel.runtime.engine.ode;
-import java.rmi.RemoteException;
-import java.util.Map;
-import java.util.Properties;
-
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.transport.TransportException;
import org.jboss.soa.bpel.runtime.ws.EndpointMetaData;
-import org.jboss.soa.bpel.runtime.ws.ServiceEndpointReference;
import org.jboss.soa.bpel.runtime.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.Name;
-import org.uddi.api_v3.TModelInstanceDetails;
-import org.uddi.api_v3.TModelInstanceInfo;
-import org.uddi.v3_service.DispositionReportFaultMessage;
/**
*
- * * @author Kurt T Stam <kurt.stam(a)jboss.com>
+ * @author Kurt T Stam <kurt.stam(a)jboss.com>
*
*/
-public class UDDIRegistration extends AnnotationProcessor {
-
- protected static final Log log = LogFactory.getLog(UDDIRegistration.class);
- public static final String BPEL_CLERK = "BPELClerk";
- public static final String DEFAULT_SERVICE_KEY_FORMAT = "uddi:${keyDomain}:bpel-services-";
- public static final String DEFAULT_BINDING_KEY_FORMAT = "uddi:${keyDomain}:bindings-";
- //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";
-
-
+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.
@@ -80,193 +40,12 @@
* @param metaData
* @param wsdlRef
*/
- public void registerEPR(EndpointMetaData metaData, WSDLReference wsdlRef) {
- boolean selfRegister = false;
- try {
- selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
- if (selfRegister) {
- Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
- if (bpelClerk!=null) {
- try {
- BusinessService service = createBusinessService(bpelClerk, metaData, wsdlRef);
- bpelClerk.register(service, bpelClerk.getUDDINode().getApiNode());
- } catch (Exception e) {
- log.error("Unable to register service " + metaData.getServiceName()
- + " ." + e.getMessage(),e);
- } catch (Throwable t) {
- log.error("Unable to register service " + metaData.getServiceName()
- + " ." + t.getMessage(),t);
- }
- } else {
- throw new ConfigurationException("Could not find UDDI Clerk named "+ BPEL_CLERK);
- }
- }
- } catch (ConfigurationException ce) {
- if (selfRegister) {
- log.error(ce.getMessage(),ce);
- } else {
- log.info(ce.getMessage());
- }
- }
- }
+ public void registerEPR(EndpointMetaData metaData, WSDLReference wsdlRef);
/**
* UnRegisters the binding from the UDDI Registry.
* @param EPR
* @param metaData
* @param wsdlRef
*/
- public void unRegisterEPR(QName service, String port) {
- boolean selfRegister = false;
- try {
- selfRegister = UDDIClerkManager.getClientConfig().isRegisterOnStartup();
- if (selfRegister) {
- Map<String,UDDIClerk> clerks = UDDIClerkManager.getClientConfig().getUDDIClerks();
- UDDIClerk bpelClerk = clerks.get(BPEL_CLERK);
- String bindingName = service.getLocalPart() + "-" + port;
- if (bpelClerk!=null) {
- try {
- Properties properties = bpelClerk.getUDDINode().getProperties();
- //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();
- //Lookup the binding
- BindingTemplate binding = null;
- try {
- binding = bpelClerk.findServiceBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
- //TODO Kurt: Just delete this binding -not all bindings- upgrade the jUDDI client to support this.
- BusinessService businessService = bpelClerk.findService(binding.getServiceKey(), bpelClerk.getUDDINode().getApiNode());
- bpelClerk.unRegister(businessService, bpelClerk.getUDDINode().getApiNode());
- } catch (Exception e) {
- log.warn("Could not find BindingTemplate with key " + bindingKey + " for unRegistration.");
- }
- } 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 "+ BPEL_CLERK);
- }
- }
- } catch (ConfigurationException ce) {
- if (selfRegister) {
- log.error(ce.getMessage(),ce);
- } else {
- log.info(ce.getMessage());
- }
- }
- }
-
- private BusinessService createBusinessService(UDDIClerk clerk,
- EndpointMetaData metaData, WSDLReference wsdlRef)
- throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
- Properties properties = clerk.getUDDINode().getProperties();
- //Constructing the serviceKey
- String serviceKey = TokenResolver.replaceTokens(DEFAULT_SERVICE_KEY_FORMAT + metaData.getServiceName().getLocalPart(), properties);
- if (properties.containsKey(SERVICE_KEY_FORMAT)) {
- serviceKey = TokenResolver.replaceTokens((String)properties.get(SERVICE_KEY_FORMAT) + metaData.getServiceName(), properties);
- }
- BusinessService service = null;
- try {
- //Checking if this serviceKey already exist
- service = clerk.findService(serviceKey, clerk.getUDDINode().getApiNode());
- log.debug("Service " + metaData.getServiceName() + " already present in the UDDI Registry");
- } catch (Exception e) {
- //If it does not exist construct service information
- log.debug("Constructing Service UDDI Information for " + metaData.getServiceName());
- service = new BusinessService();
- service.setBusinessKey(TokenResolver.replaceTokens("uddi:${keyDomain}:${businessKey}", properties));
- service.setServiceKey(serviceKey);
- if (properties.containsKey(SERVICE_DESCRIPTION)) {
- Description description = new Description();
- String lang = "en";
- if (properties.containsKey(LANG)) lang = properties.getProperty(LANG);
- description.setLang(lang);
- description.setValue(properties.getProperty(SERVICE_DESCRIPTION));
- Name serviceName = new Name();
- serviceName.setLang(lang);
- serviceName.setValue(metaData.getServiceName().getLocalPart());
- service.getName().add(serviceName);
- service.getDescription().add(description);
- }
- //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);
- }
- }
- //Construct bindingTemplate
- BindingTemplate binding = createBindingTemplate(clerk, metaData, wsdlRef);
- //Add the bindingTemplate on the service
- if (service.getBindingTemplates()==null) {
- BindingTemplates bindingTemplates = new BindingTemplates();
- service.setBindingTemplates(bindingTemplates);
- }
- service.getBindingTemplates().getBindingTemplate().add(binding);
- return service;
- }
-
- private BindingTemplate createBindingTemplate(UDDIClerk clerk,
- EndpointMetaData metaData, WSDLReference wsdlRef) {
-
- Properties properties = clerk.getUDDINode().getProperties();
- BindingTemplate bindingTemplate = new BindingTemplate();
- //Constructing the bindingKey
- String bindingKey = TokenResolver.replaceTokens(DEFAULT_BINDING_KEY_FORMAT + metaData.getServiceName().getLocalPart() + "-"
- + metaData.getPortName(), properties);
- if (properties.containsKey(BINDING_KEY_FORMAT)) {
- bindingKey = TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + metaData.getServiceName().getLocalPart() + "-"
- + metaData.getPortName(), 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());
- accessPoint.setValue(wsdlRef.getWsdlFileURL().toString());
- 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;
- }
-
-
-
+ public void unRegisterEPR(QName service, String port);
}
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 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-03-02 02:54:09 UTC (rev 522)
@@ -21,11 +21,8 @@
*/
package org.jboss.soa.bpel.runtime.ws;
-import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.juddi.v3.client.config.UDDIClerk;
-import org.apache.juddi.v3.client.config.UDDIClerkManager;
import org.apache.ode.bpel.iapi.EndpointReference;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.deployers.client.spi.DeployerClient;
@@ -38,13 +35,13 @@
import org.jboss.kernel.Kernel;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
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.bpel.runtime.integration.KernelLocator;
import org.jboss.soa.bpel.runtime.integration.ServerConfig;
import org.jboss.soa.bpel.runtime.integration.ServerConfigFactory;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
-import org.uddi.api_v3.BusinessService;
import javax.xml.namespace.QName;
import java.io.File;
@@ -74,14 +71,19 @@
private ServerConfig serverConfig;
private ExecutionEnvironment executionEnvironment;
- private UDDIRegistration uddiRegistration;
+ private UDDIRegistration uddiRegistration = null;
public EndpointManager(ExecutionEnvironment executionEnvironment)
{
this.executionEnvironment = executionEnvironment;
this.serverConfig = ServerConfigFactory.getServerConfig();
if (isUDDIRegistration()) {
- uddiRegistration = new UDDIRegistration();
+ try {
+ uddiRegistration = UDDIClientFactory.newInstance(executionEnvironment.getOdeConfig().getProperties());
+ } catch (Exception e) {
+ log.error(e.getMessage());
+ log.error("Running without UDDI integration.");
+ }
}
}
@@ -146,7 +148,7 @@
createEndpointKey(metaData.getServiceName(), metaData.getPortName()),
ref
);
- if (isUDDIRegistration()) {
+ if (uddiRegistration!=null) {
uddiRegistration.registerEPR(metaData, wsdlRef);
}
@@ -228,7 +230,7 @@
{
log.warn(ref.getArchiveLocation() + " cannot be removed (doesn't exist).");
}
- if (isUDDIRegistration()) {
+ if (uddiRegistration!=null) {
uddiRegistration.unRegisterEPR(service, port);
}
}
Modified: trunk/runtime/engine-assembly/pom.xml
===================================================================
--- trunk/runtime/engine-assembly/pom.xml 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/engine-assembly/pom.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -21,6 +21,16 @@
<version>${riftsaw.engine.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-uddi</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel.runtime</groupId>
+ <artifactId>riftsaw-uddi300</artifactId>
+ <version>${riftsaw.engine.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-bpel-compiler</artifactId>
</dependency>
Modified: trunk/runtime/engine-assembly/src/main/resources/bpel.properties
===================================================================
--- trunk/runtime/engine-assembly/src/main/resources/bpel.properties 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/engine-assembly/src/main/resources/bpel.properties 2010-03-02 02:54:09 UTC (rev 522)
@@ -91,6 +91,12 @@
# this uses the juddi-client-3.0.0 and the uddi client config can be set in the uddi.xml
# file
bpel.uddi.registration=false
+# implementation of the client integration class
+bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration
+# name of the clerk manager
+bpel.uddi.clerk.manager=esb-registry
+# name of the clerk
+bpel.uddi.clerk=BPEL_clerk
hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.hbm2ddl.auto=update
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2010-03-01 16:45:34 UTC (rev 521)
+++ trunk/runtime/pom.xml 2010-03-02 02:54:09 UTC (rev 522)
@@ -17,9 +17,12 @@
<modules>
<module>deployer</module>
<module>engine</module>
+ <module>uddi</module>
+ <module>uddi300</module>
<module>engine-assembly</module>
<module>jbossesb-bpel</module>
<module>jbossesb-bpel-assembly</module>
+
</modules>
</project>
14 years, 4 months