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) {