You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2017/10/23 00:35:06 UTC

[1/2] juddi git commit: JUDDI-985 potential fix for hibernate issues JUDDI-978 potential fix for ci test failures with hibernate JUDDI-986 hibernate dependencies updated

Repository: juddi
Updated Branches:
  refs/heads/master 1461a0cc2 -> 79f0ab8c9


JUDDI-985 potential fix for hibernate issues
JUDDI-978 potential fix for ci test failures with hibernate
JUDDI-986 hibernate dependencies updated


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

Branch: refs/heads/master
Commit: 9c3336041f310ebd965d11d172ca50d0bd0b75ff
Parents: 1461a0c
Author: Alex O'Ree <al...@apache.org>
Authored: Sun Oct 22 16:43:12 2017 -0400
Committer: Alex O'Ree <al...@apache.org>
Committed: Sun Oct 22 16:43:12 2017 -0400

----------------------------------------------------------------------
 .../juddi/api/impl/UDDIReplicationImpl.java     |   8 +-
 juddi-ddl-generator/pom.xml                     |   2 -
 juddi-gui/src/main/resources/META-INF/uddi.xml  | 220 +++++++++++--------
 juddiv3-war-repl/pom.xml                        |  10 +-
 juddiv3-war/pom.xml                             |   6 +-
 pom.xml                                         |  11 +-
 6 files changed, 132 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/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 711ca18..492ec8e 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
@@ -273,7 +273,7 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                                                                         logger.info("Change records retrieved from " + poll.getNotifyingNode() + ", " + records.size());
                                                                         for (int i = 0; i < records.size(); i++) {
                                                                                 logger.info("Change records retrieved " + records.get(i).getChangeID().getNodeID() + " USN " + records.get(i).getChangeID().getOriginatingUSN());
-                                                                                PersistChangeRecord(records.get(i));
+                                                                                persistChangeRecord(records.get(i));
                                                                         }
                                                                         recordsreturned = records.size();
                                                                 }
@@ -304,7 +304,7 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                  *
                  * @param rec
                  */
-                private void PersistChangeRecord(ChangeRecord rec) {
+                private void persistChangeRecord(ChangeRecord rec) {
                         if (rec == null) {
                                 return;
                         }
@@ -369,12 +369,12 @@ public class UDDIReplicationImpl extends AuthenticatedService implements UDDIRep
                                         }
                                         if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBusinessKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBusinessKey())) {
                                                 //delete a business 
-                                                UddiEntity ue = em.find(BusinessEntity.class, rec.getChangeRecordDelete().getBindingKey());
+                                                UddiEntity ue = em.find(BusinessEntity.class, rec.getChangeRecordDelete().getBusinessKey());
                                                 validateNodeIdMisMatches(ue, getNode());
                                                 pub.deleteBusiness(rec.getChangeRecordDelete().getBusinessKey(), em);
                                         }
                                         if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getServiceKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getServiceKey())) {
-                                                UddiEntity ue = em.find(BusinessService.class, rec.getChangeRecordDelete().getBindingKey());
+                                                UddiEntity ue = em.find(BusinessService.class, rec.getChangeRecordDelete().getServiceKey());
                                                 validateNodeIdMisMatches(ue, getNode());
                                                 //delete a service 
                                                 pub.deleteService(rec.getChangeRecordDelete().getServiceKey(), em);

http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/juddi-ddl-generator/pom.xml
----------------------------------------------------------------------
diff --git a/juddi-ddl-generator/pom.xml b/juddi-ddl-generator/pom.xml
index e7ac090..7d80605 100644
--- a/juddi-ddl-generator/pom.xml
+++ b/juddi-ddl-generator/pom.xml
@@ -22,9 +22,7 @@
 		<artifactId>juddi-parent</artifactId>
 		<version>3.3.5-SNAPSHOT</version>
 	</parent>
-	<groupId>org.apache.juddi.client.plugins</groupId>
 	<artifactId>juddi-ddl-generator</artifactId>
-	<version>3.2.1</version>
 	<name>juddi-ddl-generator</name>
 	<url>http://maven.apache.org</url>
 	<properties>

http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/juddi-gui/src/main/resources/META-INF/uddi.xml
----------------------------------------------------------------------
diff --git a/juddi-gui/src/main/resources/META-INF/uddi.xml b/juddi-gui/src/main/resources/META-INF/uddi.xml
index 7d66c29..c6debef 100644
--- a/juddi-gui/src/main/resources/META-INF/uddi.xml
+++ b/juddi-gui/src/main/resources/META-INF/uddi.xml
@@ -22,93 +22,118 @@ It currently does not use the ValueSet, jUDDI, Replication, or REST APIs
 
 -->
 <uddi>
-    <reloadDelay>5000</reloadDelay>
-    <client name="juddigui">
-        <nodes>
-		
-            <node>
-                <!-- required 'default' node -->
-                <name>default</name> 
-                <description>UDDIv3 Node (localhost)</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <custodyTransferUrl>http://localhost:8080/juddiv3/services/custody-transfer</custodyTransferUrl>
-                <inquiryUrl>http://localhost:8080/juddiv3/services/inquiry</inquiryUrl>
-                <publishUrl>http://localhost:8080/juddiv3/services/publish</publishUrl>
-                <securityUrl>http://localhost:8080/juddiv3/services/security</securityUrl>
-                <subscriptionUrl>http://localhost:8080/juddiv3/services/subscription</subscriptionUrl>
-            </node>
+	<reloadDelay>5000</reloadDelay>
+	<client name="juddigui">
+		<nodes>
+
+			<node>
+				<!-- required 'default' node -->
+				<name>default</name> 
+				<description>UDDIv3 Node (localhost)</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://localhost:8080/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>http://localhost:8080/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>http://localhost:8080/juddiv3/services/publish</publishUrl>
+				<securityUrl>http://localhost:8080/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>http://localhost:8080/juddiv3/services/subscription</subscriptionUrl>
+			</node>
+			<node>
+				<!-- for jUDDI v0.9 to 2.0.1 -->
+				<name>juddiv2</name> 
+				<description>UDDIv2 Node (localhost)</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport</proxyTransport>
+				<inquiryUrl>http://localhost:8080/juddiv3/services/inquiryv2</inquiryUrl>
+				<publishUrl>http://localhost:8080/juddiv3/services/publishv2</publishUrl>
+
+			</node>
+			<node>
+				<name>default-ssl</name> 
+				<description>UDDIv3 Node using SSL (localhost)</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://localhost:8443/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>https://localhost:8443/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>https://localhost:8443/juddiv3/services/publish</publishUrl>
+				<securityUrl>https://localhost:8443/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>https://localhost:8443/juddiv3/services/subscription</subscriptionUrl>
+			</node>
 			<node>
-                <!-- for jUDDI v0.9 to 2.0.1 -->
-                <name>juddiv2</name> 
-                <description>UDDIv2 Node (localhost)</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSv2TranslationTransport</proxyTransport>
-                <inquiryUrl>http://localhost:8080/juddiv3/services/inquiryv2</inquiryUrl>
-                <publishUrl>http://localhost:8080/juddiv3/services/publishv2</publishUrl>
-                
-            </node>
-             <node>
-                <name>default-ssl</name> 
-                <description>UDDIv3 Node using SSL (localhost)</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <custodyTransferUrl>http://localhost:8443/juddiv3/services/custody-transfer</custodyTransferUrl>
-                <inquiryUrl>https://localhost:8443/juddiv3/services/inquiry</inquiryUrl>
-                <publishUrl>https://localhost:8443/juddiv3/services/publish</publishUrl>
-                <securityUrl>https://localhost:8443/juddiv3/services/security</securityUrl>
-                <subscriptionUrl>https://localhost:8443/juddiv3/services/subscription</subscriptionUrl>
-            </node>
-            <node>
-                <name>jboss7</name> 
-                <description>UDDI node running on Jboss EAP6 or AS7</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <!-- 
+				<name>jboss7</name> 
+				<description>UDDI node running on Jboss EAP6 or AS7</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<!-- 
                 Jboss users, note that the url is typically different, here's an example for Jboss EAP 6.x-->
-                <custodyTransferUrl>http://localhost:8080/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
-                <inquiryUrl>http://localhost:8080/juddiv3/UDDIInquiryService</inquiryUrl>
-                <publishUrl>http://localhost:8080/juddiv3/UDDIPublicationService</publishUrl>
-                <securityUrl>http://localhost:8080/juddiv3/UDDISecurityService</securityUrl>
-                <subscriptionUrl>http://localhost:8080/juddiv3/UDDISubscriptionService</subscriptionUrl>
-                <subscriptionListenerUrl>http://localhost:8080/juddiv3/UDDISubscriptionListenerService</subscriptionListenerUrl>
-            </node>
-             <node>
-                <name>jboss7-ssl</name> 
-                <description>Main UDDI node running on Jboss EAP6 or AS7</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <!-- 
+				<custodyTransferUrl>http://localhost:8080/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
+				<inquiryUrl>http://localhost:8080/juddiv3/UDDIInquiryService</inquiryUrl>
+				<publishUrl>http://localhost:8080/juddiv3/UDDIPublicationService</publishUrl>
+				<securityUrl>http://localhost:8080/juddiv3/UDDISecurityService</securityUrl>
+				<subscriptionUrl>http://localhost:8080/juddiv3/UDDISubscriptionService</subscriptionUrl>
+				<subscriptionListenerUrl>http://localhost:8080/juddiv3/UDDISubscriptionListenerService</subscriptionListenerUrl>
+			</node>
+			<node>
+				<name>jboss7-ssl</name> 
+				<description>Main UDDI node running on Jboss EAP6 or AS7</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<!-- 
                 Jboss users, note that the url is typically different, here's an example for Jboss EAP 6.x-->
-                <custodyTransferUrl>https://localhost:8443/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
-                <inquiryUrl>https://localhost:8443/juddiv3/UDDIInquiryService</inquiryUrl>
-                <publishUrl>https://localhost:8443/juddiv3/UDDIPublicationService</publishUrl>
-                <securityUrl>https://localhost:8443/juddiv3/UDDISecurityService</securityUrl>
-                <subscriptionUrl>https://localhost:8443/juddiv3/UDDISubscriptionService</subscriptionUrl>
-            </node>
-            <node>
-                <name>jUDDI Cloud Prod</name> 
-                <description>This node is a semi-production jUDDI instance.</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <custodyTransferUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/custody-transfer</custodyTransferUrl>
-                <inquiryUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/inquiry</inquiryUrl>
-                <publishUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/publish</publishUrl>
-                <securityUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/security</securityUrl>
-                <subscriptionUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/subscription</subscriptionUrl>
-            </node>
-            <node>
-                <name>jUDDI Cloud Sandbox</name> 
-                <description>This node is maintained by the jUDDI team for you to test and experiment with.</description>
-                <!-- JAX-WS Transport -->
-                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
-                <custodyTransferUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/custody-transfer</custodyTransferUrl>
-                <inquiryUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/inquiry</inquiryUrl>
-                <publishUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/publish</publishUrl>
-                <securityUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/security</securityUrl>
-                <subscriptionUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/subscription</subscriptionUrl>
-            </node>
-        </nodes>
+				<custodyTransferUrl>https://localhost:8443/juddiv3/UDDICustodyTransferService</custodyTransferUrl>
+				<inquiryUrl>https://localhost:8443/juddiv3/UDDIInquiryService</inquiryUrl>
+				<publishUrl>https://localhost:8443/juddiv3/UDDIPublicationService</publishUrl>
+				<securityUrl>https://localhost:8443/juddiv3/UDDISecurityService</securityUrl>
+				<subscriptionUrl>https://localhost:8443/juddiv3/UDDISubscriptionService</subscriptionUrl>
+			</node>
+			<node>
+				<name>jUDDI Cloud Prod</name> 
+				<description>This node is a semi-production jUDDI instance.</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/publish</publishUrl>
+				<securityUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>http://uddi-jbossoverlord.rhcloud.com/juddiv3/services/subscription</subscriptionUrl>
+			</node>
+			<node>
+				<name>jUDDI Cloud Sandbox</name> 
+				<description>This node is maintained by the jUDDI team for you to test and experiment with.</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/publish</publishUrl>
+				<securityUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>http://uddiconsole-jbossoverlord.rhcloud.com/juddiv3/services/subscription</subscriptionUrl>
+			</node>
+                        
+                        <node>
+				<!-- required 'default' node -->
+				<name>Tck Node 1</name> 
+				<description>Only useful during jUDDI integration tests (localhost)</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://localhost:8880/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>http://localhost:8880/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>http://localhost:8880/juddiv3/services/publish</publishUrl>
+				<securityUrl>http://localhost:8880/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>http://localhost:8880/juddiv3/services/subscription</subscriptionUrl>
+			</node>
+                        <node>
+				<!-- required 'default' node -->
+				<name>Tck Node 2</name> 
+				<description>Only useful during jUDDI integration tests (localhost)</description>
+				<!-- JAX-WS Transport -->
+				<proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+				<custodyTransferUrl>http://localhost:8980/juddiv3/services/custody-transfer</custodyTransferUrl>
+				<inquiryUrl>http://localhost:8980/juddiv3/services/inquiry</inquiryUrl>
+				<publishUrl>http://localhost:8980/juddiv3/services/publish</publishUrl>
+				<securityUrl>http://localhost:8980/juddiv3/services/security</securityUrl>
+				<subscriptionUrl>http://localhost:8980/juddiv3/services/subscription</subscriptionUrl>
+			</node>
+		</nodes>
 		<signature>
 			<!-- signing stuff, is NOT used by juddi-gui -->
 			<signingKeyStorePath>(not used)</signingKeyStorePath>
@@ -120,24 +145,25 @@ It currently does not use the ValueSet, jUDDI, Replication, or REST APIs
 				isPasswordEncrypted="false" 
 				cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor">(not used)</signingKeyPassword>
 			<signingKeyAlias>(not used)</signingKeyAlias>
-                        
+
 			<canonicalizationMethod>http://www.w3.org/2001/10/xml-exc-c14n#</canonicalizationMethod>
 			<signatureMethod>http://www.w3.org/2000/09/xmldsig#rsa-sha1</signatureMethod>
 			<XML_DIGSIG_NS>http://www.w3.org/2000/09/xmldsig#</XML_DIGSIG_NS>
-			
-                        <!-- validation stuff 
+
+			<!-- validation stuff 
                         This part IS used by juddi-gui whenever someone views an entity that is signed
                         -->
 			<!-- if this doesn't exist or is incorrect, the client will attempt to load  from system properties, then 
                         from the standard jdk trust store
                         generally, if defined, the working path is typically the bin folder of the container
                         -->
-			<trustStorePath></trustStorePath>
+			<trustStorePath/>
 			<trustStoreType>JKS</trustStoreType>
 			<trustStorePassword
 				isPasswordEncrypted="false" 
-				cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor"></trustStorePassword>
-			
+				cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor">
+			</trustStorePassword>
+
 			<checkTimestamps>true</checkTimestamps>
 			<checkTrust>true</checkTrust>
 			<checkRevocationCRL>true</checkRevocationCRL>
@@ -146,7 +172,7 @@ It currently does not use the ValueSet, jUDDI, Replication, or REST APIs
 			<keyInfoInclusionBase64PublicKey>true</keyInfoInclusionBase64PublicKey>
 			<digestMethod>http://www.w3.org/2000/09/xmldsig#sha1</digestMethod>
 		</signature>
-                <!-- not used by juddi-gui-->
+		<!-- not used by juddi-gui-->
 		<subscriptionCallbacks>
 			<keyDomain>(not used)</keyDomain>
 			<listenUrl>(not used)</listenUrl>
@@ -155,20 +181,20 @@ It currently does not use the ValueSet, jUDDI, Replication, or REST APIs
 			<signatureBehavior>DoNothing</signatureBehavior>
 			<!--valid values are AbortIfSigned,Sign,DoNothing,SignOnlyIfParentIsntSigned, default is DoNothing-->
 		</subscriptionCallbacks>
-                <!-- juddi-gui, used in the Create, Import from Wadl/Wsdl -->
+		<!-- juddi-gui, used in the Create, Import from Wadl/Wsdl -->
 		<XtoWsdl>
 			<IgnoreSSLErrors>false</IgnoreSSLErrors>
 		</XtoWsdl>
-                
-    </client>
-    
-    <!-- hi there!
+
+	</client>
+
+	<!-- hi there!
     this section is required by juddi-gui and is an extension of what the normal juddi-client does
     it's not in the standard config schema.
     
     -->
     <config>
-        
+
         <props>
             <!--#required. if this uddi client is connected to uddi services that use the auth token, then set to UDDI_AUTH
             #if not, set authtype to HTTP-->

http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/juddiv3-war-repl/pom.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war-repl/pom.xml b/juddiv3-war-repl/pom.xml
index c64edb5..6f48a07 100644
--- a/juddiv3-war-repl/pom.xml
+++ b/juddiv3-war-repl/pom.xml
@@ -97,16 +97,10 @@
 					<version>1.0</version>
 					<scope>provided</scope>
 				</dependency>
-				<dependency>
-					<groupId>org.hibernate</groupId>
-					<artifactId>hibernate</artifactId>
-					<version>3.2.5.ga</version>
-					<scope>provided</scope>
-				</dependency>
+				
 				<dependency>
 					<groupId>org.hibernate</groupId>
 					<artifactId>hibernate-entitymanager</artifactId>
-					<version>3.3.1.ga</version>
 					<scope>provided</scope>
 				</dependency>
 
@@ -155,13 +149,11 @@
 				<dependency>
 					<groupId>org.hibernate</groupId>
 					<artifactId>hibernate</artifactId>
-					<version>3.2.5.ga</version>
 					<scope>provided</scope>
 				</dependency>
 				<dependency>
 					<groupId>org.hibernate</groupId>
 					<artifactId>hibernate-entitymanager</artifactId>
-					<version>3.3.1.ga</version>
 					<scope>provided</scope>
 				</dependency>
 				<dependency>

http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/juddiv3-war/pom.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/pom.xml b/juddiv3-war/pom.xml
index 1424861..a9cbd05 100644
--- a/juddiv3-war/pom.xml
+++ b/juddiv3-war/pom.xml
@@ -151,11 +151,7 @@ language governing permissions and * limitations under the License. * */ -->
 					
                     <scope>provided</scope>
                 </dependency>
-                <dependency>
-                    <groupId>org.hibernate</groupId>
-                    <artifactId>hibernate</artifactId>
-                    <scope>provided</scope>
-                </dependency>
+               
                 <dependency>
                     <groupId>org.hibernate</groupId>
                     <artifactId>hibernate-entitymanager</artifactId>

http://git-wip-us.apache.org/repos/asf/juddi/blob/9c333604/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9121f9a..bb22f44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -754,22 +754,17 @@ under the License.
 				<version>2.1_3</version>
 
 			</dependency>
-			<dependency>
-				<groupId>org.hibernate</groupId>
-				<artifactId>hibernate</artifactId>
-				<version>3.2.5.ga</version>
-
-			</dependency>
+		
 			<dependency>
 				<groupId>org.hibernate</groupId>
 				<artifactId>hibernate-core</artifactId>
-				<version>4.2.21.Final</version>
+				<version>5.1.10.Final</version>
 
 			</dependency>
 			<dependency>
 				<groupId>org.hibernate</groupId>
 				<artifactId>hibernate-entitymanager</artifactId>
-				<version>4.2.21.Final</version>
+				<version>5.1.10.Final</version>
 
 			</dependency>
 


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


[2/2] juddi git commit: JUDDI-985 updating the ddl generator after the hibernate update

Posted by al...@apache.org.
JUDDI-985 updating the ddl generator after the hibernate update


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

Branch: refs/heads/master
Commit: 79f0ab8c9841367e546251ac606f7335bed92529
Parents: 9c33360
Author: Alex O'Ree <al...@apache.org>
Authored: Sun Oct 22 20:34:42 2017 -0400
Committer: Alex O'Ree <al...@apache.org>
Committed: Sun Oct 22 20:34:42 2017 -0400

----------------------------------------------------------------------
 juddi-ddl-generator/pom.xml                     | 187 +++++++++----------
 .../org/apache/juddi/ddl/generator/App.java     |  73 +++++---
 2 files changed, 141 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/79f0ab8c/juddi-ddl-generator/pom.xml
----------------------------------------------------------------------
diff --git a/juddi-ddl-generator/pom.xml b/juddi-ddl-generator/pom.xml
index 7d80605..53c3acf 100644
--- a/juddi-ddl-generator/pom.xml
+++ b/juddi-ddl-generator/pom.xml
@@ -1,102 +1,101 @@
 <?xml version="1.0"?>
 <!--
- * 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.
- *
- */ -->
+* 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.
+*
+*/ -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.juddi</groupId>
-		<artifactId>juddi-parent</artifactId>
-		<version>3.3.5-SNAPSHOT</version>
-	</parent>
-	<artifactId>juddi-ddl-generator</artifactId>
-	<name>juddi-ddl-generator</name>
-	<url>http://maven.apache.org</url>
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.juddi</groupId>
-			<artifactId>juddi-core</artifactId>
-			<version>3.3.5-SNAPSHOT</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.derby</groupId>
-			<artifactId>derby</artifactId>
-		</dependency>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.juddi</groupId>
+        <artifactId>juddi-parent</artifactId>
+        <version>3.3.5-SNAPSHOT</version>
+    </parent>
+    <artifactId>juddi-ddl-generator</artifactId>
+    <name>juddi-ddl-generator</name>
+    <url>http://maven.apache.org</url>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.juddi</groupId>
+            <artifactId>juddi-core</artifactId>
+            <version>3.3.5-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+        </dependency>
 
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        
+       
 
-		<dependency>
-			<groupId>org.postgresql</groupId>
-			<artifactId>postgresql</artifactId>
-		</dependency>
 
-	</dependencies>	
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>exec-maven-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>my-execution</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>java</goal>
-						</goals>
-					</execution>
-				</executions>
-				<configuration>
-					<mainClass>org.apache.juddi.ddl.generator.App</mainClass>
-					 <arguments>
-						<argument>juddi-core/target/classes/org/apache/juddi/model/</argument>
-					  </arguments>
-				</configuration>
-			</plugin>
-			<plugin>
-			   <groupId>org.apache.maven.plugins</groupId>
-			   <artifactId>maven-antrun-plugin</artifactId>
-			   <executions>
-				  <execution>
-				  <id>copy-swf-files</id>
-				  <phase>test</phase>
-				  <goals>
-							<goal>run</goal>
-						</goals>
-				  <configuration>
-					 <target name="copy ddl to doc folder">      
-						<copy todir="../docs/db/ddl/">
-							<fileset dir="${project.build.directory}/../" includes="*.ddl">
+    </dependencies>	
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>my-execution</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <mainClass>org.apache.juddi.ddl.generator.App</mainClass>
+                    <arguments>
+                        <argument>juddi-core/target/classes/org/apache/juddi/model/</argument>
+                    </arguments>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-swf-files</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target name="copy ddl to doc folder">      
+                                <copy todir="../docs/db/ddl/">
+                                    <fileset dir="${project.build.directory}/../" includes="*.ddl">
 								
-							</fileset></copy>
-					 </target>
-				  </configuration>                       
-			   </execution> 
-			 </executions>
-			</plugin>
-		</plugins>
-	</build>
+                                    </fileset>
+                                </copy>
+                            </target>
+                        </configuration>                       
+                    </execution> 
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>

http://git-wip-us.apache.org/repos/asf/juddi/blob/79f0ab8c/juddi-ddl-generator/src/main/java/org/apache/juddi/ddl/generator/App.java
----------------------------------------------------------------------
diff --git a/juddi-ddl-generator/src/main/java/org/apache/juddi/ddl/generator/App.java b/juddi-ddl-generator/src/main/java/org/apache/juddi/ddl/generator/App.java
index 3db85b9..33e922e 100644
--- a/juddi-ddl-generator/src/main/java/org/apache/juddi/ddl/generator/App.java
+++ b/juddi-ddl-generator/src/main/java/org/apache/juddi/ddl/generator/App.java
@@ -1,4 +1,5 @@
 package org.apache.juddi.ddl.generator;
+
 /*
  * Copyright 2001-2008 The Apache Software Foundation.
  * 
@@ -16,46 +17,55 @@ package org.apache.juddi.ddl.generator;
  */
 import java.io.File;
 import java.io.IOException;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.EnumSet;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
-import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.boot.Metadata;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistry;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
 import org.hibernate.tool.hbm2ddl.SchemaExport;
+import org.hibernate.tool.hbm2ddl.SchemaExport.Action;
+import org.hibernate.tool.schema.TargetType;
 
 /**
- * Source: http://jandrewthompson.blogspot.com/2009/10/how-to-generate-ddl-scripts-from.html
+ * Source:
+ * http://jandrewthompson.blogspot.com/2009/10/how-to-generate-ddl-scripts-from.html
+ * https://stackoverflow.com/a/33761464/1203182
+ * https://stackoverflow.com/a/41894432/1203182
+ * 
  * @author john.thompson
+ * @author Alex O'Ree
  *
  */
 public class App {
 
-        private AnnotationConfiguration cfg;
+        private List<Class> jpaClasses = new ArrayList<>();
 
         public App(String packageName) throws Exception {
-                cfg = new AnnotationConfiguration();
-                cfg.setProperty("hibernate.hbm2ddl.auto", "create");
+
                 List<Class> classesForPackage = getClassesForPackage(org.apache.juddi.model.Address.class.getPackage());
                 for (Class<Object> clazz : classesForPackage) {
-                        cfg.addAnnotatedClass(clazz);
+
+                        jpaClasses.add(clazz);
                 }
         }
-        
-         public App(String dir,String packageName) throws Exception {
-                cfg = new AnnotationConfiguration();
-                cfg.setProperty("hibernate.hbm2ddl.auto", "create");
+
+        public App(String dir, String packageName) throws Exception {
+
                 List<Class> c = new ArrayList<Class>();
-                processDirectory(new File("../" + dir), packageName,c);
-                
-                processDirectory(new File(dir), packageName,c);
+                processDirectory(new File("../" + dir), packageName, c);
+
+                processDirectory(new File(dir), packageName, c);
                 for (Class<Object> clazz : c) {
-                        cfg.addAnnotatedClass(clazz);
+
+                        jpaClasses.add(clazz);
                 }
-                
-                
+
         }
 
         /**
@@ -64,12 +74,24 @@ public class App {
          * @param dbDialect to use
          */
         private void generate(Dialect dialect) {
-                cfg.setProperty("hibernate.dialect", dialect.getDialectClass());
 
-                SchemaExport export = new SchemaExport(cfg);
+                StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
+                ssrb.applySetting("hibernate.dialect", dialect.getDialectClass());
+                StandardServiceRegistry standardServiceRegistry = ssrb.build();
+
+                MetadataSources metadataSources = new MetadataSources(standardServiceRegistry);
+                for (Class clzz : jpaClasses) {
+                        metadataSources.addAnnotatedClass(clzz);
+                }
+
+                Metadata metadata = metadataSources.buildMetadata();
+
+                SchemaExport export = new SchemaExport();
+
                 export.setDelimiter(";");
                 export.setOutputFile(dialect.name().toLowerCase() + ".ddl");
-                export.execute(true, false, false, true);
+                //export.execute(true, false, false, true);
+                export.execute(EnumSet.of(TargetType.SCRIPT), Action.BOTH, metadata);
         }
 
         /**
@@ -78,7 +100,7 @@ public class App {
         public static void main(String[] args) throws Exception {
                 App gen = null;
                 if (args != null && args.length == 1) {
-                        gen = new App(args[0],"org.apache.juddi.model");
+                        gen = new App(args[0], "org.apache.juddi.model");
                 } else {
                         gen = new App("org.apache.juddi.model");
                 }
@@ -99,11 +121,12 @@ public class App {
                 }
         }
 
-        private static void processDirectory(File directory, String pkgname,List<Class> classes) {
+        private static void processDirectory(File directory, String pkgname, List<Class> classes) {
                 log("Reading Directory '" + directory + "'");
                 // Get the list of the files contained in the package
-                if (!directory.exists())
+                if (!directory.exists()) {
                         return;
+                }
                 String[] files = directory.list();
                 for (int i = 0; i < files.length; i++) {
                         String fileName = files[i];
@@ -206,7 +229,7 @@ public class App {
                                 directory = new File(resource.toURI().getPath());
                         } catch (NullPointerException x) {
                                 throw new ClassNotFoundException(packageName + " (" + directory
-                                     + ") does not appear to be a valid package");
+                                        + ") does not appear to be a valid package");
                         }
                         if (directory.exists()) {
                                 String[] files = directory.list();
@@ -214,7 +237,7 @@ public class App {
                                         if (files[i].endsWith(".class")) {
 // removes the .class extension
                                                 classes.add(Class.forName(packageName + '.'
-                                                     + files[i].substring(0, files[i].length() - 6)));
+                                                        + files[i].substring(0, files[i].length() - 6)));
                                         }
                                 }
                         }


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