juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject [12/12] juddi git commit: JUDDI-919 replication now works with ssl + client-cert authentication. In order to support this, we need to have two different war file (unfortunately). Included with this change set is number of typos in our deployment files (w
Date Mon, 16 Feb 2015 02:18:27 GMT
JUDDI-919 replication now works with ssl + client-cert authentication. In order to support this, we need to have two different war file (unfortunately). Included with this change set is number of typos in our deployment files (web.xml, beans.xml, etc) for the various supported containers
JUDDI-910 adding support for alternate endpoints for edge based coms. a number of optimizations were added to prevent/reduce network traffic for unnecessary updates. tested and working with 3 tomcat nodes


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/5994cd06
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/5994cd06
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/5994cd06

Branch: refs/heads/master
Commit: 5994cd063d305050b2c082358fd7519dd01be708
Parents: 5eda4a7
Author: Alex <alexoree@apache.org>
Authored: Sun Feb 15 21:18:03 2015 -0500
Committer: Alex <alexoree@apache.org>
Committed: Sun Feb 15 21:18:03 2015 -0500

----------------------------------------------------------------------
 .../juddi/v3/client/cryptor/CryptorFactory.java |    3 -
 .../client/cryptor/TransportSecurityHelper.java |  122 ++
 .../src/test/resources/META-INF/persistence.xml |  249 ++-
 .../juddi/api/impl/AuthenticatedService.java    |    2 +-
 .../org/apache/juddi/api/impl/JUDDIApiImpl.java |    2 +-
 .../juddi/api/impl/UDDIReplicationImpl.java     |   36 +-
 .../juddi/replication/ReplicationNotifier.java  |   64 +-
 .../juddi/validation/ValidateReplication.java   |    3 +
 .../src/main/resources/messages.properties      |    1 +
 .../juddi/api/impl/API_160_ReplicationTest.java |   13 +-
 .../src/test/resources/META-INF/persistence.xml |    2 -
 .../org/apache/juddi/samples/EntryPoint.java    |   70 +-
 .../juddi/samples/EntryPointSingleNode.java     |  209 ++-
 .../juddi/samples/EntryPoitMultiNode.java       |  125 +-
 .../apache/juddi/samples/JuddiAdminService.java |  297 ++-
 .../apache/juddi/samples/UddiCreatebulk.java    |   15 +-
 .../resources/META-INF/simple-publish-uddi.xml  |    8 +-
 juddi-tomcat/build.xml                          |   10 +
 juddi-tomcat/pom.xml                            |    9 +-
 juddi-tomcat/server.xml                         |    3 +-
 juddi-tomcat/serverNode2.xml                    |    3 +-
 juddi-tomcat/serverNode3.xml                    |    3 +-
 juddi-tomcat/tomcat-users.xml                   |    6 +-
 juddiv3-war-repl/.gitignore                     |    6 +
 .../JAX-WS/Axis2/WEB-INF/conf/axis2.xml         |  520 ++++++
 juddiv3-war-repl/JAX-WS/Axis2/WEB-INF/web.xml   |  129 ++
 .../JAX-WS/CXF-JBossAS7Up/WEB-INF/beans.xml     |   47 +
 .../WEB-INF/classes/schemas/jaxrs.xsd           |  169 ++
 .../WEB-INF/classes/schemas/jaxws.xsd           |  437 +++++
 .../WEB-INF/classes/schemas/spring-beans.xsd    | 1203 ++++++++++++
 .../JAX-WS/CXF-JBossAS7Up/WEB-INF/web.xml       |   85 +
 juddiv3-war-repl/JAX-WS/CXF/WEB-INF/beans.xml   |   44 +
 .../CXF/WEB-INF/classes/schemas/jaxrs.xsd       |  169 ++
 .../CXF/WEB-INF/classes/schemas/jaxws.xsd       |  437 +++++
 .../WEB-INF/classes/schemas/spring-beans.xsd    | 1203 ++++++++++++
 .../CXF/WEB-INF/classes/schemas/spring-util.xsd |  212 +++
 juddiv3-war-repl/JAX-WS/CXF/WEB-INF/web.xml     |  114 ++
 .../JAX-WS/JBossWS-CXF/WEB-INF/web.xml          |   84 +
 .../JAX-WS/JBossWS-Native/WEB-INF/web.xml       |   92 +
 .../WEB-INF/classes/META-INF/orm.xml.example    |  242 +++
 .../WEB-INF/classes/META-INF/persistence.xml    |  110 ++
 .../JPA/Hibernate-JBoss/WEB-INF/index.jsp       |  131 ++
 .../JPA/Hibernate-JBoss/WEB-INF/jboss-web.xml   |   32 +
 .../WEB-INF/classes/META-INF/orm.xml.example    |  243 +++
 .../WEB-INF/classes/META-INF/persistence.xml    |  111 ++
 .../WEB-INF/jboss-deployment-structure.xml      |    9 +
 .../Hibernate-JBossAS7Up/WEB-INF/jboss-web.xml  |   26 +
 .../WEB-INF/classes/META-INF/orm.xml.example    |  243 +++
 .../WEB-INF/classes/META-INF/persistence.xml    |  111 ++
 .../Hibernate/WEB-INF/classes/log4j.properties  |   37 +
 .../WEB-INF/classes/META-INF/orm.xml.example    |  243 +++
 .../WEB-INF/classes/META-INF/persistence.xml    |  111 ++
 .../OpenJPA/WEB-INF/classes/log4j.properties    |   42 +
 juddiv3-war-repl/README.txt                     |   93 +
 juddiv3-war-repl/context.xml                    |   46 +
 juddiv3-war-repl/pom.xml                        |  527 ++++++
 .../java/org/apache/juddi/adminconsole/AES.java |  164 ++
 .../CrossSiteRequestForgeryException.java       |   67 +
 .../juddi/adminconsole/PostBackConstants.java   |   62 +
 .../juddi/adminconsole/StartupServlet.java      |  131 ++
 .../adminconsole/hub/JUDDIRequestsAsXML.java    |  209 +++
 .../juddi/adminconsole/hub/UddiAdminHub.java    | 1709 ++++++++++++++++++
 .../adminconsole/hub/builders/Printers.java     |  363 ++++
 .../adminconsole/resources/ResourceLoader.java  |   82 +
 .../apache/juddi/servlets/NotifyServlet.java    |   58 +
 .../apache/juddi/servlets/RegistryServlet.java  |   65 +
 .../main/resources/commons-logging.properties   |   19 +
 .../src/main/resources/schemas/orm_1_0.xsd      | 1561 ++++++++++++++++
 .../main/resources/schemas/persistence_1_0.xsd  |  305 ++++
 .../src/main/resources/spring-beans.xsd.xml     | 1203 ++++++++++++
 .../UDDI_Publisher.xml                          |   22 +
 .../UDDI_tModels.xml                            |  800 ++++++++
 .../marketing_BusinessEntity.xml                |   74 +
 .../marketing_Publisher.xml                     |   22 +
 .../marketing_tModels.xml                       |   55 +
 .../root_BusinessEntity.xml                     |  205 +++
 .../root_Publisher.xml                          |   21 +
 .../root_tModelKeyGen.xml                       |   40 +
 .../sales_Publisher.xml                         |   22 +
 .../sales_tModels.xml                           |   31 +
 .../UDDI_Publisher.xml                          |   22 +
 .../UDDI_tModels.xml                            |  800 ++++++++
 .../marketing_Publisher.xml                     |   22 +
 .../marketing_tModels.xml                       |   31 +
 .../root_BusinessEntity.xml                     |  205 +++
 .../root_Publisher.xml                          |   21 +
 .../root_tModelKeyGen.xml                       |   40 +
 .../sales_BusinessEntity.xml                    |   74 +
 .../sales_Publisher.xml                         |   22 +
 .../sales_tModels.xml                           |   55 +
 .../src/main/webapp/WEB-INF/classes/juddiv3.xml |  230 +++
 .../src/main/webapp/WEB-INF/config.properties   |   22 +
 .../src/main/webapp/WEB-INF/web.xml             |   27 +
 juddiv3-war-repl/src/main/webapp/index.jsp      |  186 ++
 juddiv3-war-repl/src/main/webapp/juddi.css      |  173 ++
 juddiv3-war/JAX-WS/Axis2/WEB-INF/web.xml        |  126 +-
 .../JAX-WS/CXF-JBossAS7Up/WEB-INF/beans.xml     |    5 +-
 .../JAX-WS/CXF-JBossAS7Up/WEB-INF/web.xml       |   33 +
 juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml        |    4 +-
 juddiv3-war/JAX-WS/CXF/WEB-INF/web.xml          |  162 +-
 juddiv3-war/JAX-WS/JBossWS-CXF/WEB-INF/web.xml  |  210 +--
 .../JAX-WS/JBossWS-Native/WEB-INF/web.xml       |  348 ++--
 pom.xml                                         |    1 +
 .../org/apache/juddi/v2/tck/TckPublisher.java   |    2 +-
 .../org/apache/juddi/v3/tck/TckPublisher.java   |    2 +-
 uddi-tck/pom.xml                                |   12 +-
 uddi-tck/server.xml                             |    8 +-
 uddi-tck/serverNode2.xml                        |    7 +
 uddi-tck/src/main/resources/META-INF/uddi.xml   |    6 +-
 .../tck/JUDDI_300_MultiNodeIntegrationTest.java |   89 +-
 110 files changed, 18053 insertions(+), 745 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
----------------------------------------------------------------------
diff --git a/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
index 6768b6e..8d6de30 100644
--- a/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
+++ b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
@@ -19,11 +19,8 @@ package org.apache.juddi.v3.client.cryptor;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
-import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.v3.client.ClassUtil;

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/TransportSecurityHelper.java
----------------------------------------------------------------------
diff --git a/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/TransportSecurityHelper.java b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/TransportSecurityHelper.java
new file mode 100644
index 0000000..d88cb7d
--- /dev/null
+++ b/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/TransportSecurityHelper.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.v3.client.cryptor;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.xml.ws.BindingProvider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *
+ * @author alex
+ */
+public class TransportSecurityHelper {
+
+        private static final Log log = LogFactory.getLog(TransportSecurityHelper.class);
+
+        public static boolean applyTransportSecurity(BindingProvider webServicePort) {
+                try {
+                        File currentdir = new File(".");
+                        String s = System.getProperty("javax.net.ssl.keyStore");
+                        String st = System.getProperty("javax.net.ssl.trustStore");
+                        log.info("Attempting to initialize keystore and truststore from " + s + " " + st);
+                        if (s == null) {
+                                log.warn("keystore isn't defined! " + s);
+                                return false;
+                        } else if (st == null) {
+                                log.warn("truststore isn't defined! " + s);
+                                return false;
+                        } else {
+                                File keystore = new File(s);
+                                if (keystore == null || !keystore.exists()) {
+                                        log.warn("keystore doesn't exist! input was " + s + " working dir is " + currentdir
+                                                .getAbsolutePath());
+                                        return false;
+                                }
+                                //File truststore =new File(System.getProperty("javax.net.ssl.trustStore"));
+                                String pwd = System.getProperty("javax.net.ssl.keyStorePassword");
+                                if (pwd == null) {
+                                        log.warn("keystore password isn't defined!");
+                                        return false;
+                                }
+
+                                File truststore = new File(st);
+                                if (truststore == null || !truststore.exists()) {
+                                        log.warn("truststore doesn't exist! input was " + s + " working dir is " + currentdir
+                                                .getAbsolutePath());
+                                        return false;
+                                }
+                                //File truststore =new File(System.getProperty("javax.net.ssl.trustStore"));
+                                String pwdt = System.getProperty("javax.net.ssl.trustStorePassword");
+                                if (pwdt == null) {
+                                        log.warn("truststore password isn't defined!");
+                                        return false;
+                                }
+
+                                if (keystore.exists()) {
+                                        try {
+                                                log.info("Using keystore from " + keystore.getAbsolutePath() + " current dir is " + currentdir.getAbsolutePath());
+
+                                                log.info("Using truststore from " + truststore.getAbsolutePath() + " current dir is " + currentdir.getAbsolutePath());
+                                                //log.info("Using truststure from " + truststore.getAbsolutePath() + " current dir is " + currentdir.getAbsolutePath());
+                                                SSLContext sc = SSLContext.getInstance("SSLv3");
+
+                                                KeyManagerFactory kmf
+                                                        = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
+
+                                                KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
+                                                ks.load(new FileInputStream(keystore), pwd.toCharArray());
+
+                                                kmf.init(ks, pwd.toCharArray());
+
+                                                String alg = TrustManagerFactory.getDefaultAlgorithm();
+                                                TrustManagerFactory tmFact = TrustManagerFactory.getInstance(alg);
+
+                                                FileInputStream fis = new FileInputStream(st);
+                                                KeyStore kst = KeyStore.getInstance("jks");
+                                                kst.load(fis, pwdt.toCharArray());
+                                                fis.close();
+
+                                                tmFact.init(kst);
+
+                                                TrustManager[] tms = tmFact.getTrustManagers();
+
+                                                sc.init(kmf.getKeyManagers(), null, null);
+                                                HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+                                                ((BindingProvider) webServicePort).getRequestContext().put("com.sun.xml.internal.ws.transport.https.client.SSLSocketFactory", sc.getSocketFactory());
+                                                ((BindingProvider) webServicePort).getRequestContext().put("com.sun.xml.ws.transport.https.client.SSLSocketFactory", sc.getSocketFactory());
+                                                return true;
+                                        } catch (Exception ex) {
+                                                log.warn("unable to establish ssl settings", ex);
+                                        }
+                                }
+                        }
+                        return false;
+                } catch (Exception x) {
+                        log.error("unexpected error", x);
+                }
+                return false;
+        }
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml b/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
index 52aa67e..1142ef5 100644
--- a/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
+++ b/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
@@ -1,130 +1,119 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-* Copyright 2001-2009 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* 
-*      http://www.apache.org/licenses/LICenSE-2.0
-* 
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/ -->
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
-             version="1.0">
-  <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
-    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-    
-    <!-- entity classes -->
-    <class>org.apache.juddi.model.Address</class>
-    <class>org.apache.juddi.model.AddressLine</class>
-    <class>org.apache.juddi.model.AuthToken</class>
-    <class>org.apache.juddi.model.BindingCategoryBag</class>
-    <class>org.apache.juddi.model.BindingDescr</class>
-    <class>org.apache.juddi.model.BindingTemplate</class>
-    <class>org.apache.juddi.model.BusinessCategoryBag</class>
-    <class>org.apache.juddi.model.BusinessDescr</class>
-    <class>org.apache.juddi.model.BusinessEntity</class>
-    <class>org.apache.juddi.model.BusinessIdentifier</class>
-    <class>org.apache.juddi.model.BusinessName</class>
-    <class>org.apache.juddi.model.BusinessService</class>
-    <class>org.apache.juddi.model.CanonicalizationMethod</class>
-    <class>org.apache.juddi.model.CategoryBag</class>
-    <class>org.apache.juddi.model.Clerk</class>
-    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
-    <class>org.apache.juddi.model.Contact</class>
-    <class>org.apache.juddi.model.ContactDescr</class>
-    <class>org.apache.juddi.model.DiscoveryUrl</class>
-    <class>org.apache.juddi.model.Email</class>
-    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
-    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
-    <class>org.apache.juddi.model.KeyedReference</class>
-    <class>org.apache.juddi.model.KeyedReferenceGroup</class>
-    <class>org.apache.juddi.model.KeyDataValue</class>
-    <class>org.apache.juddi.model.KeyInfo</class>
-    <class>org.apache.juddi.model.Node</class>
-    <class>org.apache.juddi.model.ObjectType</class>
-    <class>org.apache.juddi.model.ObjectTypeContent</class>
-    <class>org.apache.juddi.model.OverviewDoc</class>
-    <class>org.apache.juddi.model.OverviewDocDescr</class>
-    <class>org.apache.juddi.model.PersonName</class>
-    <class>org.apache.juddi.model.Phone</class>
-    <class>org.apache.juddi.model.Publisher</class>
-    <class>org.apache.juddi.model.PublisherAssertion</class>
-    <class>org.apache.juddi.model.PublisherAssertionId</class>
-    <class>org.apache.juddi.model.Reference</class>
-    <class>org.apache.juddi.model.ServiceCategoryBag</class>
-    <class>org.apache.juddi.model.ServiceDescr</class>
-    <class>org.apache.juddi.model.ServiceName</class>
-    <class>org.apache.juddi.model.ServiceProjection</class>
-    <class>org.apache.juddi.model.ServiceProjectionId</class>
-    <class>org.apache.juddi.model.Signature</class>
-    <class>org.apache.juddi.model.SignatureMethod</class>
-    <class>org.apache.juddi.model.SignatureTransform</class>
-    <class>org.apache.juddi.model.SignatureTransformDataValue</class>
-    <class>org.apache.juddi.model.SignatureValue</class>
-    <class>org.apache.juddi.model.SignedInfo</class>
-    <class>org.apache.juddi.model.Subscription</class>
-    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
-    <class>org.apache.juddi.model.SubscriptionMatch</class>
-    <class>org.apache.juddi.model.TempKey</class>
-	<class>org.apache.juddi.model.TempKeyPK</class>
-    <class>org.apache.juddi.model.Tmodel</class>
-    <class>org.apache.juddi.model.TmodelCategoryBag</class>
-    <class>org.apache.juddi.model.TmodelDescr</class>
-    <class>org.apache.juddi.model.TmodelIdentifier</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
-    <class>org.apache.juddi.model.TransferToken</class>
-    <class>org.apache.juddi.model.TransferTokenKey</class>
-    <class>org.apache.juddi.model.UddiEntity</class>
-    <class>org.apache.juddi.model.UddiEntityPublisher</class>
-	<class>org.apache.juddi.model.ValueSetValues</class>
-
-	<class>org.apache.juddi.model.ChangeRecord</class>
-	<class>org.apache.juddi.model.CommunicationGraph</class>
-	<class>org.apache.juddi.model.Operator</class>
-	<class>org.apache.juddi.model.ReplicationConfiguration</class>
-	<class>org.apache.juddi.model.Edge</class>
-	<class>org.apache.juddi.model.ControlMessage</class>
-  <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
-    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
-  
-    <properties>
-      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='dropDB,add')"/>
-      <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
-      <property name="openjpa.jdbc.UpdateManager" value="operation-order"/>
-      <property name="openjpa.RuntimeUnenhancedClasses" value="warn"/>
-      <property name="openjpa.Compatibility" value="CheckDatabaseForCascadePersistToDetachedEntity=true"/>
-      
-      <!-- derby connection properties -->
-      <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
-      <property name="openjpa.ConnectionURL" value="jdbc:derby:memory:juddi-derby-test-db;create=true"/>
-      <property name="openjpa.ConnectionUserName" value=""/>
-      <property name="openjpa.ConnectionPassword" value=""/>
-      <!--<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>-->
-      
-      <!--  mysql connection properties
-      <property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost:3306/juddi"/>
-      <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
-      <property name="openjpa.ConnectionUserName" value="juddiv3"/>
-      <property name="openjpa.ConnectionPassword" value=""/>
-      -->
-      
-      <!--  pgsql connection properties 
-      <property name="openjpa.ConnectionURL" value="jdbc:postgresql://localhost:5432/juddi"/>
-      <property name="openjpa.ConnectionDriverName" value="org.postgresql.Driver"/>
-      <property name="openjpa.ConnectionUserName" value="juddi"/>
-      <property name="openjpa.ConnectionPassword" value="password"/>
-      -->
-      
-    </properties>
-  </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+* Copyright 2001-2009 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* 
+*      http://www.apache.org/licenses/LICenSE-2.0
+* 
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/ -->
+<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+  <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
+    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+    <!-- entity classes -->
+    <class>org.apache.juddi.model.Address</class>
+    <class>org.apache.juddi.model.AddressLine</class>
+    <class>org.apache.juddi.model.AuthToken</class>
+    <class>org.apache.juddi.model.BindingCategoryBag</class>
+    <class>org.apache.juddi.model.BindingDescr</class>
+    <class>org.apache.juddi.model.BindingTemplate</class>
+    <class>org.apache.juddi.model.BusinessCategoryBag</class>
+    <class>org.apache.juddi.model.BusinessDescr</class>
+    <class>org.apache.juddi.model.BusinessEntity</class>
+    <class>org.apache.juddi.model.BusinessIdentifier</class>
+    <class>org.apache.juddi.model.BusinessName</class>
+    <class>org.apache.juddi.model.BusinessService</class>
+    <class>org.apache.juddi.model.CanonicalizationMethod</class>
+    <class>org.apache.juddi.model.CategoryBag</class>
+    <class>org.apache.juddi.model.Clerk</class>
+    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+    <class>org.apache.juddi.model.Contact</class>
+    <class>org.apache.juddi.model.ContactDescr</class>
+    <class>org.apache.juddi.model.DiscoveryUrl</class>
+    <class>org.apache.juddi.model.Email</class>
+    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+    <class>org.apache.juddi.model.KeyedReference</class>
+    <class>org.apache.juddi.model.KeyedReferenceGroup</class>
+    <class>org.apache.juddi.model.KeyDataValue</class>
+    <class>org.apache.juddi.model.KeyInfo</class>
+    <class>org.apache.juddi.model.Node</class>
+    <class>org.apache.juddi.model.ObjectType</class>
+    <class>org.apache.juddi.model.ObjectTypeContent</class>
+    <class>org.apache.juddi.model.OverviewDoc</class>
+    <class>org.apache.juddi.model.OverviewDocDescr</class>
+    <class>org.apache.juddi.model.PersonName</class>
+    <class>org.apache.juddi.model.Phone</class>
+    <class>org.apache.juddi.model.Publisher</class>
+    <class>org.apache.juddi.model.PublisherAssertion</class>
+    <class>org.apache.juddi.model.PublisherAssertionId</class>
+    <class>org.apache.juddi.model.Reference</class>
+    <class>org.apache.juddi.model.ServiceCategoryBag</class>
+    <class>org.apache.juddi.model.ServiceDescr</class>
+    <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceProjection</class>
+    <class>org.apache.juddi.model.ServiceProjectionId</class>
+    <class>org.apache.juddi.model.Signature</class>
+    <class>org.apache.juddi.model.SignatureMethod</class>
+    <class>org.apache.juddi.model.SignatureTransform</class>
+    <class>org.apache.juddi.model.SignatureTransformDataValue</class>
+    <class>org.apache.juddi.model.SignatureValue</class>
+    <class>org.apache.juddi.model.SignedInfo</class>
+    <class>org.apache.juddi.model.Subscription</class>
+    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+    <class>org.apache.juddi.model.SubscriptionMatch</class>
+    <class>org.apache.juddi.model.TempKey</class>
+    <class>org.apache.juddi.model.TempKeyPK</class>
+    <class>org.apache.juddi.model.Tmodel</class>
+    <class>org.apache.juddi.model.TmodelCategoryBag</class>
+    <class>org.apache.juddi.model.TmodelDescr</class>
+    <class>org.apache.juddi.model.TmodelIdentifier</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+    <class>org.apache.juddi.model.TransferToken</class>
+    <class>org.apache.juddi.model.TransferTokenKey</class>
+    <class>org.apache.juddi.model.UddiEntity</class>
+    <class>org.apache.juddi.model.UddiEntityPublisher</class>
+    <class>org.apache.juddi.model.ValueSetValues</class>
+    <class>org.apache.juddi.model.ChangeRecord</class>
+    <class>org.apache.juddi.model.Operator</class>
+    <class>org.apache.juddi.model.ReplicationConfiguration</class>
+    <class>org.apache.juddi.model.Edge</class>
+    <class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
+    <properties>
+      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='dropDB,add')"/>
+      <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
+      <property name="openjpa.jdbc.UpdateManager" value="operation-order"/>
+      <property name="openjpa.RuntimeUnenhancedClasses" value="warn"/>
+      <property name="openjpa.Compatibility" value="CheckDatabaseForCascadePersistToDetachedEntity=true"/>
+      <!-- derby connection properties -->
+      <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+      <property name="openjpa.ConnectionURL" value="jdbc:derby:memory:juddi-derby-test-db;create=true"/>
+      <property name="openjpa.ConnectionUserName" value=""/>
+      <property name="openjpa.ConnectionPassword" value=""/>
+      <!--<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>-->
+      <!--  mysql connection properties
+      <property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost:3306/juddi"/>
+      <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
+      <property name="openjpa.ConnectionUserName" value="juddiv3"/>
+      <property name="openjpa.ConnectionPassword" value=""/>
+      -->
+      <!--  pgsql connection properties 
+      <property name="openjpa.ConnectionURL" value="jdbc:postgresql://localhost:5432/juddi"/>
+      <property name="openjpa.ConnectionDriverName" value="org.postgresql.Driver"/>
+      <property name="openjpa.ConnectionUserName" value="juddi"/>
+      <property name="openjpa.ConnectionPassword" value="password"/>
+      -->
+    </properties>
+  </persistence-unit>
+</persistence>

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
index 6d16d98..0868501 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
@@ -62,7 +62,7 @@ public abstract class AuthenticatedService {
                         node = AppConfig.getConfiguration().getString(Property.JUDDI_NODE_ID, "UNDEFINED_NODE_NAME");
                         node = node.trim();
                         baseUrlSSL = AppConfig.getConfiguration().getString(Property.JUDDI_BASE_URL_SECURE, Property.DEFAULT_BASE_URL_SECURE);
-                        baseUrlSSL = AppConfig.getConfiguration().getString(Property.JUDDI_BASE_URL, Property.DEFAULT_BASE_URL);
+                        baseUrlSSL = baseUrlSSL.trim();
                 } catch (ConfigurationException ex) {
                         logger.fatal(null, ex);
                 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
index 7fbb109..b9d48da 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
@@ -1471,7 +1471,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         r.setCommunicationGraph(new CommunicationGraph());
                         Operator op = new Operator();
                         op.setOperatorNodeID(node);
-                        op.setSoapReplicationURL(baseUrlSSL + "/services/replication");
+                        op.setSoapReplicationURL(baseUrlSSL + "replication/services/replication");
 
                         op.getContact().add(new Contact());
                         op.getContact().get(0).getPersonName().add(new PersonName("Unknown", null));

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
index 6a15569..3a1645b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
@@ -41,9 +41,6 @@ import javax.persistence.Query;
 import javax.xml.bind.JAXB;
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.ws.BindingProvider;
-import org.apache.commons.configuration.ConfigurationException;
-import static org.apache.juddi.api.impl.AuthenticatedService.logger;
-import static org.apache.juddi.api.impl.AuthenticatedService.node;
 import org.apache.juddi.api.util.QueryStatus;
 import org.apache.juddi.api.util.ReplicationQuery;
 import org.apache.juddi.config.AppConfig;
@@ -62,11 +59,11 @@ import org.apache.juddi.model.UddiEntity;
 import org.apache.juddi.replication.ReplicationNotifier;
 import static org.apache.juddi.replication.ReplicationNotifier.FetchEdges;
 import org.apache.juddi.v3.client.UDDIService;
+import org.apache.juddi.v3.client.cryptor.TransportSecurityHelper;
 import org.apache.juddi.v3.error.ErrorMessage;
 import org.apache.juddi.v3.error.FatalErrorException;
 import org.apache.juddi.v3.error.TransferNotAllowedException;
 import org.apache.juddi.validation.ValidateReplication;
-import org.uddi.api_v3.OperationalInfo;
 import org.uddi.custody_v3.TransferEntities;
 import org.uddi.repl_v3.ChangeRecord;
 import org.uddi.repl_v3.ChangeRecordAcknowledgement;
@@ -82,17 +79,15 @@ import org.uddi.repl_v3.TransferCustody;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 import org.uddi.v3_service.UDDIReplicationPortType;
 
-//@WebService(serviceName="UDDIReplicationService", 
-//			endpointInterface="org.uddi.v3_service.UDDIReplicationPortType",
-//			targetNamespace = "urn:uddi-org:v3_service")
 /**
  * UDDI Replication defines four APIs. The first two presented here are used to
  * perform replication and issue notifications. The latter ancillary APIs
  * provide support for other aspects of UDDI Replication.
- * <ul><li>get_changeRecords</li>
+ * <ul>
+ * <li>get_changeRecords</li>
  * <li>notify_changeRecordsAvailable</li>
  * <li>do_ping</li>
- * <li>get_highWaterMarks</li>
+ * <li>get_highWaterMarks</li></ul>
  *
  * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
@@ -125,8 +120,6 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                 for (String s : addedNodes) {
                         if (!s.equals(node)) {
                                 logger.info("This node: " + node + ". New replication node queue for synchronization: " + s);
-                                //HighWaterMarkVectorType highWaterMarkVectorType = new HighWaterMarkVectorType();
-                                //highWaterMarkVectorType.getHighWaterMark().add(new ChangeRecordIDType(s, 0L));
                                 HighWaterMarkVectorType highWaterMarkVectorType = new HighWaterMarkVectorType();
                                 highWaterMarkVectorType.getHighWaterMark().add(new ChangeRecordIDType(s, 0L));
                                 queue.add(new NotifyChangeRecordsAvailable(s, highWaterMarkVectorType));
@@ -186,13 +179,13 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
 
         private static UDDIPublicationImpl pub = null;
 
-        public UDDIReplicationImpl()  {
+        public UDDIReplicationImpl() {
                 super();
-                try{
-                this.interval = AppConfig.getConfiguration().getLong(Property.JUDDI_REPLICATION_INTERVAL, 5000L);
-                this.startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_REPLICATION_START_BUFFER, 5000L);
-                }catch(Exception ex){
-                        logger.warn("Config error!",ex);
+                try {
+                        this.interval = AppConfig.getConfiguration().getLong(Property.JUDDI_REPLICATION_INTERVAL, 5000L);
+                        this.startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_REPLICATION_START_BUFFER, 5000L);
+                } catch (Exception ex) {
+                        logger.warn("Config error!", ex);
                 }
                 if (pub == null) {
                         pub = new UDDIPublicationImpl();
@@ -300,7 +293,11 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                                                 }
                                         }
                                 } else {
-                                        logger.warn("strange, popped an object from the queue but it was null or it from myself, ignoring...");
+                                        if (poll == null) {
+                                                logger.warn("strange, popped a null object");
+                                        } else if (poll.getNotifyingNode().equalsIgnoreCase(node)) {
+                                                logger.warn("strange, popped an object from the queue but it was from myself. This probably indicates a configuration error! ignoring...first record: " + poll.getChangesAvailable().getHighWaterMark().get(0).getNodeID()+":" + poll.getChangesAvailable().getHighWaterMark().get(0).getOriginatingUSN());
+                                        }
                                 }
                         }
                 }
@@ -958,6 +955,7 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                 }
                 UDDIService svc = new UDDIService();
                 UDDIReplicationPortType replicationClient = svc.getUDDIReplicationPort();
+                TransportSecurityHelper.applyTransportSecurity((BindingProvider) replicationClient);
 
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -1248,7 +1246,7 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                 //getChangeRecords from the remote node asynch
                 new ValidateReplication(null).validateNotifyChangeRecordsAvailable(body, ctx);
 
-                logger.info(body.getNotifyingNode() + " just told me that there are change records available, enqueuing...size is " + queue.size());
+                logger.info(body.getNotifyingNode() + " just told me that there are change records available, enqueuing...size is " + queue.size() + " this node is " + node);
                 //if (!queue.contains(body.getNotifyingNode())) {
                 queue.add(body);
                 //}

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
index e96459e..6f0a680 100644
--- a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
+++ b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
@@ -45,6 +45,7 @@ import org.apache.juddi.mapping.MappingModelToApi;
 import org.apache.juddi.model.ChangeRecord;
 import org.apache.juddi.model.ReplicationConfiguration;
 import org.apache.juddi.v3.client.UDDIService;
+import org.apache.juddi.v3.client.cryptor.TransportSecurityHelper;
 import org.uddi.repl_v3.ChangeRecordIDType;
 import org.uddi.repl_v3.CommunicationGraph.Edge;
 import org.uddi.repl_v3.HighWaterMarkVectorType;
@@ -110,8 +111,7 @@ public class ReplicationNotifier extends TimerTask {
         static Queue<org.uddi.repl_v3.ChangeRecord> queue2;
 
         /**
-         * Note: this is for locally originated changes only, see 
-         * {@link org.apache.juddi.api.impl.UDDIReplicationImpl.PullTimerTask#PersistChangeRecord PersistChangeRecord
+         * Note: this is for locally originated changes only, see null null null         {@link org.apache.juddi.api.impl.UDDIReplicationImpl.PullTimerTask#PersistChangeRecord PersistChangeRecord
          * } for how remote changes are processed
          *
          * @param j must be one of the UDDI save APIs
@@ -156,19 +156,12 @@ public class ReplicationNotifier extends TimerTask {
 
                 org.uddi.repl_v3.ReplicationConfiguration repcfg = FetchEdges();
 
-                //TODO figure out what this statement means 7.5.3
-                /**
-                 * In the absence of a communicationGraph element from the
-                 * Replication Configuration Structure (although it's mandatory
-                 * in the xsd), all nodes listed in the node element MAY send
-                 * any and all messages to any other node of the registry.
-                 */
                 if (repcfg == null) {
                         log.debug("No replication configuration is defined!");
                         return;
 
                 }
-                if (id==null || origin_node==null){
+                if (id == null || origin_node == null) {
                         log.fatal("Either the id is null or the origin_node is null. I can't send out this alert!!");
                         //throw new Exception(node);
                         return;
@@ -176,17 +169,25 @@ public class ReplicationNotifier extends TimerTask {
 
                 Set<Object> destinationUrls = new HashSet<Object>();
 
+                /**
+                 * In the absence of a communicationGraph element from the
+                 * Replication Configuration Structure (although it's mandatory
+                 * in the xsd), all nodes listed in the node element MAY send
+                 * any and all messages to any other node of the registry.
+                 */
                 if (repcfg.getCommunicationGraph() == null
                         || repcfg.getCommunicationGraph().getEdge().isEmpty() && !isRetrans) {
                         //no edges or graph defined, default to the operator list
+                        //retransmission only applies to non-directed-edge replication, thus the extra check
                         for (Operator o : repcfg.getOperator()) {
-                                //no need to tell myself about a change at myself
-                                if (!o.getOperatorNodeID().equalsIgnoreCase(node)) {
+                                //no need to tell myself about a change at myself or the origin
+                                if (!o.getOperatorNodeID().equalsIgnoreCase(node) && !o.getOperatorNodeID().equalsIgnoreCase(origin_node)) {
                                         destinationUrls.add(o.getSoapReplicationURL());
                                 }
                         }
                 } else {
-                        //repcfg.getCommunicationGraph()
+                        //this is for directed graph replication
+                        //find all nodes that i need to notify
                         Iterator<Edge> iterator = repcfg.getCommunicationGraph().getEdge().iterator();
                         while (iterator.hasNext()) {
                                 Edge next = iterator.next();
@@ -196,21 +197,27 @@ public class ReplicationNotifier extends TimerTask {
                                         //this is my server and i need to transmit the notification to
                                         String messageReceiver = next.getMessageReceiver();
                                         PrimaryAlternate container = new PrimaryAlternate();
-
-                                        for (int x = 0; x < repcfg.getOperator().size(); x++) {
-                                                if (repcfg.getOperator().get(x).getOperatorNodeID().equalsIgnoreCase(messageReceiver)) {
-                                                        container.primaryUrl = repcfg.getOperator().get(x).getSoapReplicationURL();
-                                                }
-                                        }
-                                        for (int y = 0; y < next.getMessageReceiverAlternate().size(); y++) {
+                                        //pointless to send a notification to myself or the origin
+                                        if (!messageReceiver.equalsIgnoreCase(node) && !messageReceiver.equalsIgnoreCase(origin_node)) {
+                                                //look up the endpoint urls
                                                 for (int x = 0; x < repcfg.getOperator().size(); x++) {
-                                                        if (repcfg.getOperator().get(x).getOperatorNodeID().equalsIgnoreCase(next.getMessageReceiverAlternate().get(y))) {
-                                                                container.alternateUrls.add(repcfg.getOperator().get(x).getSoapReplicationURL());
+                                                        if (repcfg.getOperator().get(x).getOperatorNodeID().equalsIgnoreCase(messageReceiver)) {
+                                                                container.primaryUrl = repcfg.getOperator().get(x).getSoapReplicationURL();
+                                                        }
+                                                }
+                                                for (int y = 0; y < next.getMessageReceiverAlternate().size(); y++) {
+                                                        for (int x = 0; x < repcfg.getOperator().size(); x++) {
+                                                                if (repcfg.getOperator().get(x).getOperatorNodeID().equalsIgnoreCase(next.getMessageReceiverAlternate().get(y))) {
+                                                                        container.alternateUrls.add(repcfg.getOperator().get(x).getSoapReplicationURL());
+                                                                }
                                                         }
                                                 }
                                         }
                                         if (container.primaryUrl != null) {
                                                 destinationUrls.add(container);
+                                        } else {
+                                                log.warn("Unable to find primary url for directed edge graph replication from this node " + node + " to "
+                                                        + "destination node " + next.getMessageReceiver() + " it will be ignored!");
                                         }
 
                                 }
@@ -219,10 +226,13 @@ public class ReplicationNotifier extends TimerTask {
 
                 }
 
-                UDDIReplicationPortType x = uddiService.getUDDIReplicationPort();
                 if (destinationUrls.isEmpty()) {
                         log.debug("Something is bizarre with the replication config. I should have had at least one node to notify, but I have none!");
+                        return;
                 }
+                UDDIReplicationPortType x = uddiService.getUDDIReplicationPort();
+                TransportSecurityHelper.applyTransportSecurity((BindingProvider) x);
+
                 for (Object s : destinationUrls) {
 
                         NotifyChangeRecordsAvailable req = new NotifyChangeRecordsAvailable();
@@ -271,7 +281,7 @@ public class ReplicationNotifier extends TimerTask {
                         log.info("Successfully sent change record available message to " + s + " this node: " + node);
                         return true;
                 } catch (Exception ex) {
-                        log.warn("Unable to send change notification to " + s + " this node: " + node);
+                        log.warn("Unable to send change notification to " + s + " this node: " + node + " reason: " + ex.getMessage());
                         log.debug("Unable to send change notification to " + s, ex);
                 }
                 return false;
@@ -309,14 +319,14 @@ public class ReplicationNotifier extends TimerTask {
                         //for each change at this node
 
                         org.uddi.repl_v3.ChangeRecord j = queue2.poll();
-                        
+
                         ChangeRecord model = new ChangeRecord();
                         try {
-                                model=MappingApiToModel.mapChangeRecord(j);
+                                model = MappingApiToModel.mapChangeRecord(j);
                         } catch (UnsupportedEncodingException ex) {
                                 Logger.getLogger(ReplicationNotifier.class.getName()).log(Level.SEVERE, null, ex);
                         }
-                        log.info("retransmitting CR notificationm entity owner: " + j.getChangeID().getNodeID() + " CR: " + j.getChangeID().getOriginatingUSN() + " key:" + model.getEntityKey() + " " + model.getRecordType().name() + " accepted locally:"+ model.getIsAppliedLocally());
+                        log.info("retransmitting CR notificationm entity owner: " + j.getChangeID().getNodeID() + " CR: " + j.getChangeID().getOriginatingUSN() + " key:" + model.getEntityKey() + " " + model.getRecordType().name() + " accepted locally:" + model.getIsAppliedLocally());
                         SendNotifications(j.getChangeID().getOriginatingUSN(), j.getChangeID().getNodeID(), true);
 
                 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
index 44ec063..d9131c9 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
@@ -190,6 +190,9 @@ public class ValidateReplication extends ValidateUDDIApi {
                                         throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
                                         //}
                                 }
+                                if (s.getMessageReceiver().equalsIgnoreCase(s.getMessageSender())){
+                                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeLoop"));
+                                }
                                 for (String id : s.getMessageReceiverAlternate()) {
                                         if (!Contains(replicationConfiguration.getOperator(), id)) {
                                                 throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/main/resources/messages.properties
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/messages.properties b/juddi-core/src/main/resources/messages.properties
index 1db74f8..10f2828 100644
--- a/juddi-core/src/main/resources/messages.properties
+++ b/juddi-core/src/main/resources/messages.properties
@@ -301,6 +301,7 @@ errors.replication.limitVectorNoNode=No node name was specified
 errors.replication.configNodeNotFound=No specified node name is not currently listed as a Operator. Add it to the list and try again. Id:
 errors.replication.configNull=No replication config was present in the message
 errors.replication.contactNull=No replication contact was present in the message
+errors.replication.configNodeLoop=In at least one edge, there is a loop where the sender is also the receiver. This is not allowed and just does not make sense
 errors.deleteNode.InReplicationConfig=The node to be deleted is currently referenced in the replication configuration. You must revise the configuration before deleting the node, 
 errors.usermismatch.InvalidNode=The user is not authorized to alter the given entity. It is not owned by this jUDDI node. Try your request again on the authoritative node.
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
index 1d8b3c2..71095ee 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
@@ -358,18 +358,27 @@ public class API_160_ReplicationTest {
                 op.setOperatorStatus(OperatorStatusType.NORMAL);
                 
                 r.getOperator().add(op);
+                 op = new Operator();
+                op.setOperatorNodeID("test_node2");
+                op.setSoapReplicationURL("http://localhost");
+                op.setOperatorStatus(OperatorStatusType.NORMAL);
+                
+                r.getOperator().add(op);
+                
+                
                 r.setCommunicationGraph(new CommunicationGraph());
                 r.setRegistryContact(new ReplicationConfiguration.RegistryContact());
                 r.getRegistryContact().setContact(new Contact());
                 r.getRegistryContact().getContact().getPersonName().add(new PersonName("test", null));
                 //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
                 r.getCommunicationGraph().getNode().add("test_node");
+                r.getCommunicationGraph().getNode().add("test_node2");
                 r.getCommunicationGraph().getControlledMessage().add("doPing");
                 r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
                 r.getCommunicationGraph().getEdge().get(0).setMessageReceiver("test_node");
-                r.getCommunicationGraph().getEdge().get(0).setMessageSender("test_node");
+                r.getCommunicationGraph().getEdge().get(0).setMessageSender("test_node2");
                 r.getCommunicationGraph().getEdge().get(0).getMessage().add("doPing");
-                r.getCommunicationGraph().getEdge().get(0).getMessageReceiverAlternate().add("test_node");
+                r.getCommunicationGraph().getEdge().get(0).getMessageReceiverAlternate().add("test_node2");
                 
                 DispositionReport setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-core/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/resources/META-INF/persistence.xml b/juddi-core/src/test/resources/META-INF/persistence.xml
index 4c05c5b..725e81e 100644
--- a/juddi-core/src/test/resources/META-INF/persistence.xml
+++ b/juddi-core/src/test/resources/META-INF/persistence.xml
@@ -84,14 +84,12 @@
     <class>org.apache.juddi.model.UddiEntityPublisher</class>
     <class>org.apache.juddi.model.ValueSetValues</class>
     <class>org.apache.juddi.model.ChangeRecord</class>
-    <class>org.apache.juddi.model.CommunicationGraph</class>
     <class>org.apache.juddi.model.Operator</class>
     <class>org.apache.juddi.model.ReplicationConfiguration</class>
     <class>org.apache.juddi.model.Edge</class>
     <class>org.apache.juddi.model.ControlMessage</class>
     <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
     <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
-    
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
index 459071f..5170e35 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
@@ -15,6 +15,7 @@
  */
 package org.apache.juddi.samples;
 
+import java.io.File;
 import java.util.List;
 import org.apache.juddi.api_v3.Node;
 import org.apache.juddi.v3.client.config.UDDIClient;
@@ -32,6 +33,72 @@ public class EntryPoint {
 
         public static void main(String[] args) throws Exception {
 
+                if (System.getProperty("javax.net.ssl.trustStore") == null) {
+                        File f = new File("../../juddi-tomcat/truststore.jks");
+                        if (f.exists()) {
+                                System.setProperty("javax.net.ssl.trustStore", f.getAbsolutePath());
+
+                        } else {
+                                f = new File("../juddi-tomcat/truststore.jks");
+                                if (f.exists()) {
+                                        System.setProperty("javax.net.ssl.trustStore", f.getAbsolutePath());
+
+                                } else {
+                                        f = new File("./juddi-tomcat/truststore.jks");
+                                        if (f.exists()) {
+                                                System.setProperty("javax.net.ssl.trustStore", f.getAbsolutePath());
+
+                                        }
+                                }
+                        }
+
+                        System.setProperty("javax.net.ssl.trustStorePassword", "password");
+                        //System.setProperty("javax.net.ssl.keyStore", "keystore.jks");
+
+                        //System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+                }
+                //set up trust store
+
+                String trustStore = System.getProperty("javax.net.ssl.trustStore");
+                if (trustStore == null) {
+                        System.out.println("javax.net.ssl.trustStore is not defined");
+                } else {
+                        System.out.println("javax.net.ssl.trustStore = " + trustStore);
+                }
+                
+                
+                if (System.getProperty("javax.net.ssl.keyStore") == null) {
+                        File f = new File("../../juddi-tomcat/keystore.jks");
+                        if (f.exists()) {
+                                System.setProperty("javax.net.ssl.keyStore", f.getAbsolutePath());
+
+                        } else {
+                                f = new File("../juddi-tomcat/keyStore.jks");
+                                if (f.exists()) {
+                                        System.setProperty("javax.net.ssl.keyStore", f.getAbsolutePath());
+
+                                } else {
+                                        f = new File("./juddi-tomcat/keystore.jks");
+                                        if (f.exists()) {
+                                                System.setProperty("javax.net.ssl.keyStore", f.getAbsolutePath());
+
+                                        }
+                                }
+                        }
+
+                        System.setProperty("javax.net.ssl.keyStorePassword", "password");
+                        //System.setProperty("javax.net.ssl.keyStore", "keystore.jks");
+
+                        //System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+                }
+                //set up trust store
+
+                String keyStore = System.getProperty("javax.net.ssl.trustStore");
+                if (keyStore == null) {
+                        System.out.println("javax.net.ssl.keyStore is not defined");
+                } else {
+                        System.out.println("javax.net.ssl.keyStore = " + trustStore);
+                }
                 //first menu
                 //connect to a node and do work on it
                 //multinode 
@@ -74,7 +141,8 @@ public class EntryPoint {
                         System.out.println(" 1) Compare Two Binding/tModelInstanceInfo - QOS Code Example");
                         System.out.println("2) Digitally sign a UDDI entity from a file.");
                         System.out.println(" q) Quit/exit");
-
+                        System.out.print("#");
+                        input=System.console().readLine();
                         processOffline(input);
                 } while (!"q".equalsIgnoreCase(input));
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/5994cd06/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPointSingleNode.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPointSingleNode.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPointSingleNode.java
index 1149302..42d190e 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPointSingleNode.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPointSingleNode.java
@@ -17,11 +17,19 @@ package org.apache.juddi.samples;
 
 import java.util.List;
 import org.apache.juddi.api_v3.Node;
+import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.client.config.UDDIClient;
 import org.apache.juddi.v3.client.config.UDDINode;
 import org.apache.juddi.v3.client.transport.Transport;
+import org.uddi.api_v3.BusinessList;
 import org.uddi.api_v3.DiscardAuthToken;
+import org.uddi.api_v3.FindBusiness;
+import org.uddi.api_v3.FindQualifiers;
+import org.uddi.api_v3.FindService;
 import org.uddi.api_v3.GetAuthToken;
+import org.uddi.api_v3.Name;
+import org.uddi.api_v3.ServiceList;
+import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
 
 /**
@@ -33,7 +41,7 @@ public class EntryPointSingleNode {
         static void goSingleNode() throws Exception {
                 String currentNode = "default";
                 UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
-                
+
                 List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
                 System.out.println();
 
@@ -41,7 +49,7 @@ public class EntryPointSingleNode {
                 for (int i = 0; i < uddiNodeList.size(); i++) {
                         System.out.println((i + 1) + ") Node name: " + uddiNodeList.get(i).getName());
                 }
-                System.out.println("Destination Node: ");
+                System.out.print("Destination Node: ");
                 int index = Integer.parseInt(System.console().readLine()) - 1;
 
                 currentNode = uddiNodeList.get(index).getName();
@@ -52,13 +60,12 @@ public class EntryPointSingleNode {
                         System.out.println(" 1) Login");
                         System.out.println(" 2) Print auth token");
                         System.out.println(" 3) Logout (discard auth token)");
-                                
-                        
+
                         System.out.println(" 4) Find Binding by QOS Parameters (Binding/tModelInstanceInfo)");
                         System.out.println(" 5) Find Business by QOS Parameters (Binding/tModelInstanceInfo)");
                         System.out.println(" 6) Find Service by QOS Parameters (Binding/tModelInstanceInfo)");
                         System.out.println(" 7) UDDI Create Bulk (makes N business/services");
-                        
+
                         System.out.println(" 8) UDDI Custody Transfer (within a single node)");
                         System.out.println(" 9) UDDI Digital Signatures - Sign a Business");
                         System.out.println("10) UDDI Digital Signatures - Sign a Service");
@@ -73,8 +80,7 @@ public class EntryPointSingleNode {
                         System.out.println("19) Subscriptions - Synchronous");
                         System.out.println("20) WSDL2UDDI - Register a service from a WSDL document");
                         System.out.println("21) WADL2UDDI - Register a service from a WADL document");
-                        
-                        
+
                         System.out.println("22) Print Subscriptions");
                         System.out.println("23) Delete a subscription");
                         System.out.println("24) Delete all subscriptions");
@@ -83,56 +89,63 @@ public class EntryPointSingleNode {
                         System.out.println("27) Replication - get high watermarks");
                         System.out.println("28) Replication - get change records");
                         System.out.println("29) Replication - get failed change records (jUDDI only)");
-                        
+
                         //local config management
                         System.out.println("31) Quick add the jUDDI cloud node to *this's configuration file");
                         System.out.println("32) Add a node to *this's configuration file");
                         System.out.println("35) View all registered nodes for this client");
-                        
+
                         //remote config management - juddi only
                         System.out.println("33) Register a *this node to a jUDDI server");
                         System.out.println("34) View all registered remote nodes on a jUDDI server");
                         System.out.println("35) UnRegister a node on a jUDDI server");
-                        
+
                         //juddi only
                         System.out.println("37) View the replication config from the current jUDDI server");
                         System.out.println("38) Set the replication config on a remote jUDDI server");
                         System.out.println("39) Prints the current replication status of a given node");
-                      // System.out.println(" 3) jUDDI Admin service - Register a Node (quick add of the jUDDI cloud server)");
+                        System.out.println("40) Periodic publisher, 1biz+1svc every 5 seconds");
+                        // System.out.println(" 3) jUDDI Admin service - Register a Node (quick add of the jUDDI cloud server)");
 
                         System.out.println("q) quit");
-                        System.out.print(currentNode + "# ");
+                        System.out.print(username + "@" + currentNode + "# ");
                         input = System.console().readLine();
                         try {
-                                processInput(input,currentNode, transport,clerkManager);
+                                processInput(input, currentNode, transport, clerkManager);
                         } catch (Exception ex) {
                                 ex.printStackTrace();
                         }
                 } while (!input.equalsIgnoreCase("q"));
         }
         private static String authtoken = null;
+        static String password;
+        static String username;
 
         private static String login(String currentNode, Transport transport) throws Exception {
                 System.out.println("Options:");
                 System.out.println("1) Enter a username/password for auth token");
                 System.out.println("2) Enter a username/password for HTTP based logins");
                 System.out.println("3) Enter a username/password for use stored credentials");
+                System.out.print("Login Method: ");
                 String input = System.console().readLine();
                 if ("1".equalsIgnoreCase(input)) {
                         UDDISecurityPortType security = null;
                         security = transport.getUDDISecurityService();
                         System.out.print(currentNode + "# username: ");
-                        String uname = System.console().readLine();
+                        username = System.console().readLine();
                         char passwordArray[] = System.console().readPassword(currentNode + "# password: ");
                         GetAuthToken getAuthTokenRoot = new GetAuthToken();
-                        getAuthTokenRoot.setUserID(uname);
-                        getAuthTokenRoot.setCred(new String(passwordArray));
+                        getAuthTokenRoot.setUserID(username);
+                        password = new String(passwordArray);
+                        getAuthTokenRoot.setCred((password));
                         String lauthtoken = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
                         System.out.println("Success!");
                         return lauthtoken;
                 } else if ("2".equalsIgnoreCase(input)) {
-                        
+                        System.out.println("not implemented yet!");
+
                 } else if ("3".equalsIgnoreCase(input)) {
+                        System.out.println("not implemented yet!");
                 } else {
                         System.out.println("Aborted!");
                 }
@@ -140,28 +153,28 @@ public class EntryPointSingleNode {
 
         }
 
-        private static void processInput(String input,String currentNode, Transport transport, UDDIClient client) throws Exception {
+        private static void processInput(final String input, final String currentNode, final Transport transport, UDDIClient client) throws Exception {
                 if (input == null) {
                         return;
                 }
                 if (input.equals("1")) {
                         login(currentNode, transport);
                 }
-               
 
                 if (input.equals("2")) {
                         System.out.println("Token info: " + authtoken);
                 }
-                 if (input.equals("3")) {
-                        if (authtoken!=null){
-                        UDDISecurityPortType security = null;
-                        security = transport.getUDDISecurityService();
-                        DiscardAuthToken getAuthTokenRoot = new DiscardAuthToken();
-                        getAuthTokenRoot.setAuthInfo(authtoken);
-                        security.discardAuthToken(getAuthTokenRoot);
-                        System.out.println("Success!");}
+                if (input.equals("3")) {
+                        if (authtoken != null) {
+                                UDDISecurityPortType security = null;
+                                security = transport.getUDDISecurityService();
+                                DiscardAuthToken getAuthTokenRoot = new DiscardAuthToken();
+                                getAuthTokenRoot.setAuthInfo(authtoken);
+                                security.discardAuthToken(getAuthTokenRoot);
+                                System.out.println("Success!");
+                        }
                 }
-               
+
                 if (input.equals("4")) {
                         SearchByQos.doFindBinding(authtoken);
                 }
@@ -172,12 +185,12 @@ public class EntryPointSingleNode {
                         SearchByQos.doFindService(authtoken);
                 }
                 if (input.equals("7")) {
-                       
+
                         System.out.print("businesses: ");
                         int biz = Integer.parseInt(System.console().readLine());
                         System.out.print("servicesPerBusiness: ");
                         int svc = Integer.parseInt(System.console().readLine());
-                        new UddiCreatebulk(transport, false, currentNode).publishBusiness(authtoken, biz, svc);
+                        new UddiCreatebulk(transport, false, currentNode).publishBusiness(authtoken, biz, svc, username);
                 }
                 if (input.equals("8")) {
                         UDDISecurityPortType security = null;
@@ -242,7 +255,7 @@ public class EntryPointSingleNode {
                 }
                 if (input.equals("17")) {
                         UDDISecurityPortType security = null;
-                       
+
                         security = transport.getUDDISecurityService();
 
                         System.out.print("1st Business username: ");
@@ -298,7 +311,7 @@ public class EntryPointSingleNode {
                         String key = (System.console().readLine());
                         new WadlImport().Fire(url, key, authtoken, transport);
                 }
-                
+
                 if (input.equals("22")) {
                         new UddiSubscriptionManagement(transport).PrintSubscriptions(authtoken);
                 }
@@ -327,7 +340,7 @@ public class EntryPointSingleNode {
                 }
                 if (input.equals("28")) {
                         //System.out.println("29) Replication - get change records");
-                       
+
                         System.out.print("Change ID to fetch: ");
                         String id = (System.console().readLine());
 
@@ -337,14 +350,14 @@ public class EntryPointSingleNode {
                         new UddiReplication(client, currentNode).GetChangeRecords(Long.parseLong(id), src);
 
                 }
-                if ("29".equals(input)){
+                if ("29".equals(input)) {
                         new JuddiAdminService(client, transport).dumpFailedReplicationRecords(authtoken);
                 }
-                 if (input.equals("31")) {
-                        
+                if (input.equals("31")) {
+
                         new JuddiAdminService(client, transport).quickRegisterRemoteCloud(authtoken);
                 }
-               if (input.equals("31")) {
+                if (input.equals("31")) {
                         //System.out.println("31) Quick add the jUDDI cloud node to *this's configuration file");
                         new JuddiAdminService(client, transport).quickRegisterLocalCloud();
                 }
@@ -435,20 +448,20 @@ public class EntryPointSingleNode {
                         new JuddiAdminService(client, transport).viewRemoteNodes(authtoken);
                 }
 
-              /*  if (input.equals("35")) {
-                        UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
-                        List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
-                        for (int i = 0; i < uddiNodeList.size(); i++) {
-                                System.out.println("________________________________________________________________________________");
-                                System.out.println("Client name: " + uddiNodeList.get(i).getClientName());
-                                System.out.println("Node name: " + uddiNodeList.get(i).getName());
-                                System.out.println("Node description: " + uddiNodeList.get(i).getDescription());
-                                System.out.println("Transport: " + uddiNodeList.get(i).getProxyTransport());
-                                System.out.println(i + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
+                /*  if (input.equals("35")) {
+                 UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
+                 List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+                 for (int i = 0; i < uddiNodeList.size(); i++) {
+                 System.out.println("________________________________________________________________________________");
+                 System.out.println("Client name: " + uddiNodeList.get(i).getClientName());
+                 System.out.println("Node name: " + uddiNodeList.get(i).getName());
+                 System.out.println("Node description: " + uddiNodeList.get(i).getDescription());
+                 System.out.println("Transport: " + uddiNodeList.get(i).getProxyTransport());
+                 System.out.println(i + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
 
-                        }
+                 }
 
-                }*/
+                 }*/
                 if (input.equals("35")) {
 
                         new JuddiAdminService(client, transport).viewRemoveRemoteNode(authtoken);
@@ -460,12 +473,106 @@ public class EntryPointSingleNode {
                 if (input.equals("38")) {
                         new JuddiAdminService(client, transport).setReplicationConfig(authtoken);
                 }
-               
+
                 if (input.equals("39")) {
                         new JuddiAdminService(client, transport).printStatus(transport, authtoken);
                 }
-                
+                if (input.equals("40")) {
+                        //TODO current counts
+                        UDDIInquiryPortType uddiInquiryService = transport.getUDDIInquiryService();
+                        FindBusiness fb = new FindBusiness();
+                        fb.setAuthInfo(authtoken);
+                        fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
+                        fb.setFindQualifiers(new FindQualifiers());
+                        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        fb.setMaxRows(1);
+                        fb.setListHead(0);
+                        BusinessList findBusiness = uddiInquiryService.findBusiness(fb);
+                        System.out.println("current business counts "
+                                + findBusiness.getListDescription().getActualCount() + " "
+                                + findBusiness.getListDescription().getIncludeCount() + " "
+                                + findBusiness.getListDescription().getListHead());
+                        FindService fs = new FindService();
+                        fs.setAuthInfo(authtoken);
+                        fs.getName().add(new Name(UDDIConstants.WILDCARD, null));
+                        fs.setFindQualifiers(new FindQualifiers());
+                        fs.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        fs.setMaxRows(1);
+                        fs.setListHead(0);
+                        ServiceList findService = uddiInquiryService.findService(fs);
+                        System.out.println("current service counts "
+                                + findService.getListDescription().getActualCount() + " "
+                                + findService.getListDescription().getIncludeCount() + " "
+                                + findService.getListDescription().getListHead());
+
+                        running = true;
+                        createdServices = 0;
+                        createdBusinesses = 0;
+
+                        new Thread(new Runnable() {
+                                @Override
+                                public void run() {
+                                        UddiCreatebulk uddiCreatebulk = new UddiCreatebulk(transport, false, currentNode);
+                                        while (running) {
+                                                try {
+                                                        uddiCreatebulk.publishBusiness(authtoken, 1, 1, username);
+                                                        createdBusinesses++;
+                                                        createdServices++;
+                                                        Thread.sleep(5000);
+                                                } catch (Exception ex) {
+                                                        System.out.println("eception caught, assuming it's an expired token, attempting to reauthenticate " + ex.getMessage());
+                                                        //potentially an expired token, reauthenticate
+                                                        try {
+                                                                UDDISecurityPortType security = null;
+                                                                security = transport.getUDDISecurityService();
+
+                                                                GetAuthToken getAuthTokenRoot = new GetAuthToken();
+                                                                getAuthTokenRoot.setUserID(username);
+                                                                getAuthTokenRoot.setCred((password));
+                                                                authtoken = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
+                                                        } catch (Exception x) {
+                                                                System.out.println("unable to reauthenticate, aborting!");
+                                                                ex.printStackTrace();
+                                                                running = false;
+                                                        }
+
+                                                }
+                                        }
+                                }
+                        }).start();
+                        System.out.println("Started, press <Enter> to stop!");
+                        System.console().readLine();
+                        running = false;
+
+                        System.out.println("before business counts "
+                                + findBusiness.getListDescription().getActualCount());
+
+                        fb.setAuthInfo(authtoken);
+                        BusinessList afterfindBusiness = uddiInquiryService.findBusiness(fb);
+                        System.out.println("after business counts "
+                                + afterfindBusiness.getListDescription().getActualCount());
+                        System.out.println("actual created " + createdBusinesses);
+                        System.out.println("Delta = " + (afterfindBusiness.getListDescription().getActualCount()  - findBusiness.getListDescription().getActualCount()));
+                        
+                        
+                        System.out.println("before service counts "
+                                + findService.getListDescription().getActualCount());
+
+                        fs.setAuthInfo(authtoken);
+                        ServiceList afterfindService = uddiInquiryService.findService(fs);
+                        System.out.println("after service counts "
+                                + afterfindService.getListDescription().getActualCount());
+                        System.out.println("actual created " + createdServices);
+                        System.out.println("delta = " + (afterfindService.getListDescription().getActualCount() - findService.getListDescription().getActualCount()));
+                        if ((afterfindService.getListDescription().getActualCount() - findService.getListDescription().getActualCount()) == createdServices)
+                                System.out.println("success");
+                        else System.out.println("failure!");
+
+                }
 
         }
+        static boolean running = true;
+        static int createdServices = 0;
+        static int createdBusinesses = 0;
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message