Author: kstam
Date: Wed Feb 29 14:13:27 2012
New Revision: 1295121
URL: http://svn.apache.org/viewvc?rev=1295121&view=rev
Log:
SCOUT-128, set the UDDI version to "3.0" if 'v3' is found in the connection URL.
In some tests the TCK connects directly to scout, not using the JNDI lookup. In
this case the UDDI version property is not set, and Scout defaults it to "2.0",
which leads to issues. The preferred way to solve this is to have the TCK set
this property, but this does seem that easy to do. To work around this issue we
check the juddi URL, and if this contains 'v3' we automatically set the UDDI
version to "3.0" if it is not set. This maybe a jUDDI specific fix. I'm open to
other suggestions.
Modified:
juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
Modified:
juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
URL:
http://svn.apache.org/viewvc/juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java?rev=1295121&r1=1295120&r2=1295121&view=diff
==============================================================================
---
juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
(original)
+++
juddi/scout/trunk/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
Wed Feb 29 14:13:27 2012
@@ -60,6 +60,16 @@ public class ConnectionImpl implements C
String val =
properties.getProperty(ConnectionFactoryImpl.MAXROWS_PROPERTY);
maxRows = (val == null) ? -1 : Integer.valueOf(val);
uddiVersion =
properties.getProperty(ConnectionFactoryImpl.UDDI_VERSION_PROPERTY,
DEFAULT_UDDI_VERSION);
+ //The TCK does not set the UDDI_VERSION, so if the lifecycle URL
contains 'v3' we
+ //automagically set the version to be "3.0"
+ if (!properties.contains(ConnectionFactoryImpl.UDDI_VERSION_PROPERTY)
+ &&
(properties.contains(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY))
+ &&
properties.getProperty(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY).contains("v3")
) {
+
properties.setProperty(ConnectionFactoryImpl.UDDI_VERSION_PROPERTY, "3.0");
+ uddiVersion = "3.0";
+ String securityManager =
properties.getProperty(ConnectionFactoryImpl.LIFECYCLEMANAGER_PROPERTY).replace("publish",
"security");
+
properties.setProperty(ConnectionFactoryImpl.SECURITYMANAGER_PROPERTY,
securityManager);
+ }
String uddiConfigFile =
properties.getProperty(JUDDI_CLIENT_CONFIG_FILE);//
DEFAULT_JUDDI_CLIENT_CONFIG_FILE);
if (isUDDIv3(uddiVersion)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]