juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1484038 [2/3] - in /juddi/trunk: ./ juddi-client/ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-client/src/main/java/org/apache/juddi/v3/client/transport/ juddi-client/src/main/java/org/apache/juddi/v3/client/transpor...
Date Sat, 18 May 2013 01:11:29 GMT
Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java Sat May 18 01:11:28 2013
@@ -81,11 +81,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public BindingDetail findBinding(FindBinding body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateFindBinding(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_BINDING, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -119,7 +119,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 			BindingDetail result = InquiryHelper.getBindingDetailFromKeys(body, findQualifiers, em, keysFound);
 			tx.rollback();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.FIND_BINDING, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -134,11 +134,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public BusinessList findBusiness(FindBusiness body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateFindBusiness(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_BUSINESS, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -159,7 +159,7 @@ public class UDDIInquiryImpl extends Aut
 			BusinessList result = InquiryHelper.getBusinessListFromKeys(body, findQualifiers, em, keysFound);
 
 			tx.rollback();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.FIND_BUSINESS, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -174,11 +174,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public RelatedBusinessesList findRelatedBusinesses(FindRelatedBusinesses body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateFindRelatedBusinesses(body, false);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_RELATEDBUSINESSES, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -199,7 +199,7 @@ public class UDDIInquiryImpl extends Aut
 			RelatedBusinessesList result = InquiryHelper.getRelatedBusinessesList(body, em);
 
 			tx.rollback();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.FIND_RELATEDBUSINESSES, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -214,11 +214,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public ServiceList findService(FindService body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateFindService(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_SERVICE, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -254,7 +254,7 @@ public class UDDIInquiryImpl extends Aut
 			ServiceList result = InquiryHelper.getServiceListFromKeys(body, findQualifiers, em, keysFound);
 
 			tx.rollback();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.FIND_SERVICE, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -269,11 +269,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public TModelList findTModel(FindTModel body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateFindTModel(body, false);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_TMODEL, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -294,7 +294,7 @@ public class UDDIInquiryImpl extends Aut
 			TModelList result = InquiryHelper.getTModelListFromKeys(body, findQualifiers, em, keysFound);
 
 			tx.rollback();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.FIND_TMODEL, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -309,11 +309,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public BindingDetail getBindingDetail(GetBindingDetail body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateGetBindingDetail(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.FIND_TMODEL, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -345,7 +345,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.GET_BINDINGDETAIL, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -360,11 +360,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public BusinessDetail getBusinessDetail(GetBusinessDetail body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateGetBusinessDetail(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.GET_BUSINESSDETAIL, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -396,7 +396,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.GET_BUSINESSDETAIL, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -411,11 +411,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public OperationalInfos getOperationalInfo(GetOperationalInfo body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateGetOperationalInfo(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.GET_OPERATIONALINFO, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -447,7 +447,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.GET_OPERATIONALINFO, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -462,11 +462,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public ServiceDetail getServiceDetail(GetServiceDetail body)
 			throws DispositionReportFaultMessage {
-        long startTime = System.nanoTime();
+        long startTime = System.currentTimeMillis();
         try {
             new ValidateInquiry(null).validateGetServiceDetail(body);
         } catch (DispositionReportFaultMessage drfm) {
-            long procTime = System.nanoTime() - startTime;
+            long procTime = System.currentTimeMillis() - startTime;
             serviceCounter.update(InquiryQuery.GET_SERVICEDETAIL, QueryStatus.FAILED, procTime);                      
             throw drfm;
         }
@@ -498,7 +498,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.GET_SERVICEDETAIL, QueryStatus.SUCCESS, procTime);                      
 
 			return result;
@@ -514,11 +514,11 @@ public class UDDIInquiryImpl extends Aut
 	
     public TModelDetail getTModelDetail(GetTModelDetail body)
 			throws DispositionReportFaultMessage {
-                long startTime = System.nanoTime();
+                long startTime = System.currentTimeMillis();
                 try {
                     new ValidateInquiry(null).validateGetTModelDetail(body);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(InquiryQuery.GET_TMODELDETAIL, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
@@ -550,7 +550,7 @@ public class UDDIInquiryImpl extends Aut
 			}
 
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(InquiryQuery.GET_TMODELDETAIL, QueryStatus.SUCCESS, procTime);                      
 
 			return result;

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java Sat May 18 01:11:28 2013
@@ -92,7 +92,7 @@ public class UDDIPublicationImpl extends
 	
 	public void addPublisherAssertions(AddPublisherAssertions body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -152,11 +152,11 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.ADD_PUBLISHERASSERTIONS, 
                                 QueryStatus.SUCCESS, procTime);			
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.ADD_PUBLISHERASSERTIONS, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 } finally {
@@ -169,7 +169,7 @@ public class UDDIPublicationImpl extends
 
 	public void deleteBinding(DeleteBinding body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -192,11 +192,11 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.DELETE_BINDING, 
                                 QueryStatus.SUCCESS, procTime);                      
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.DELETE_BINDING, QueryStatus.FAILED, procTime);                      
                     throw drfm;
 		} finally {
@@ -209,7 +209,7 @@ public class UDDIPublicationImpl extends
 
 	public void deleteBusiness(DeleteBusiness body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -227,10 +227,10 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.DELETE_BUSINESS, QueryStatus.SUCCESS, procTime);               
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.DELETE_BUSINESS, QueryStatus.FAILED, procTime);                      
                     throw drfm;
 		} finally {
@@ -243,7 +243,7 @@ public class UDDIPublicationImpl extends
 
 	public void deletePublisherAssertions(DeletePublisherAssertions body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -262,11 +262,11 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.DELETE_PUBLISHERASSERTIONS, 
                                 QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.DELETE_PUBLISHERASSERTIONS, QueryStatus.FAILED, procTime);                      
                     throw drfm;                        
 		} finally {
@@ -279,7 +279,7 @@ public class UDDIPublicationImpl extends
 
 	public void deleteService(DeleteService body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -300,11 +300,11 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.DELETE_SERVICE, 
                                 QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.DELETE_SERVICE, QueryStatus.FAILED, procTime);                      
                     throw drfm;                                               
 		} finally {
@@ -318,7 +318,7 @@ public class UDDIPublicationImpl extends
 
 	public void deleteTModel(DeleteTModel body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -338,10 +338,10 @@ public class UDDIPublicationImpl extends
 			}
 			
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.DELETE_TMODEL, QueryStatus.SUCCESS, procTime);                      
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.DELETE_TMODEL, QueryStatus.FAILED, procTime);                      
                     throw drfm;                                               
 		} finally {
@@ -356,7 +356,7 @@ public class UDDIPublicationImpl extends
 	public List<AssertionStatusItem> getAssertionStatusReport(String authInfo,
 			CompletionStatus completionStatus)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -368,13 +368,13 @@ public class UDDIPublicationImpl extends
 			List<org.uddi.api_v3.AssertionStatusItem> result = PublicationHelper.getAssertionStatusItemList(publisher, completionStatus, em);
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.GET_ASSERTIONSTATUSREPORT, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.GET_ASSERTIONSTATUSREPORT, QueryStatus.FAILED, procTime);                      
                     throw drfm;                                               
 		} finally {
@@ -387,7 +387,7 @@ public class UDDIPublicationImpl extends
 
 	public List<PublisherAssertion> getPublisherAssertions(String authInfo)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -411,12 +411,12 @@ public class UDDIPublicationImpl extends
 			}
 			
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.GET_PUBLISHERASSERTIONS, 
                                 QueryStatus.SUCCESS, procTime);                      
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.GET_PUBLISHERASSERTIONS, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                               			
@@ -431,7 +431,7 @@ public class UDDIPublicationImpl extends
 
 	public RegisteredInfo getRegisteredInfo(GetRegisteredInfo body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -488,13 +488,13 @@ public class UDDIPublicationImpl extends
 			}
 			
 			tx.commit();	
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.GET_REGISTEREDINFO, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.GET_REGISTEREDINFO, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                 
@@ -509,7 +509,7 @@ public class UDDIPublicationImpl extends
 
 	public BindingDetail saveBinding(SaveBinding body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -542,13 +542,13 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.SAVE_BINDING, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.SAVE_BINDING, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                 
@@ -563,7 +563,7 @@ public class UDDIPublicationImpl extends
 
 	public BusinessDetail saveBusiness(SaveBusiness body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -595,13 +595,13 @@ public class UDDIPublicationImpl extends
 			validator.validateSaveBusinessMax(em);
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.SAVE_BUSINESS, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.SAVE_BUSINESS, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                 	
@@ -616,7 +616,7 @@ public class UDDIPublicationImpl extends
 
 	public ServiceDetail saveService(SaveService body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -650,13 +650,13 @@ public class UDDIPublicationImpl extends
 			
 			
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.SAVE_SERVICE, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.SAVE_SERVICE, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                         			
@@ -671,7 +671,7 @@ public class UDDIPublicationImpl extends
 
 	public TModelDetail saveTModel(SaveTModel body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -700,13 +700,13 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.SAVE_TMODEL, 
                                 QueryStatus.SUCCESS, procTime);                      
 
 			return result;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.SAVE_TMODEL, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                                                 
@@ -722,7 +722,7 @@ public class UDDIPublicationImpl extends
 	public void setPublisherAssertions(String authInfo,
 			Holder<List<PublisherAssertion>> publisherAssertion)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -765,11 +765,11 @@ public class UDDIPublicationImpl extends
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(PublicationQuery.SET_PUBLISHERASSERTIONS, 
                                 QueryStatus.SUCCESS, procTime);                      
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(PublicationQuery.SET_PUBLISHERASSERTIONS, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                                                 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java Sat May 18 01:11:28 2013
@@ -50,8 +50,8 @@ public class UDDIReplicationImpl extends
 
 
 	public String doPing(DoPing body) throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
-                long procTime = System.nanoTime() - startTime;
+	        long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(ReplicationQuery.DO_PING, QueryStatus.SUCCESS, procTime);
 
 		ValidateReplication.unsupportedAPICall();
@@ -64,8 +64,8 @@ public class UDDIReplicationImpl extends
 			BigInteger responseLimitCount,
 			HighWaterMarkVectorType responseLimitVector)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
-                long procTime = System.nanoTime() - startTime;
+	        long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(ReplicationQuery.GET_CHANGERECORDS, 
                         QueryStatus.SUCCESS, procTime);
 
@@ -76,8 +76,8 @@ public class UDDIReplicationImpl extends
 
 	public List<ChangeRecordIDType> getHighWaterMarks()
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
-                long procTime = System.nanoTime() - startTime;
+	        long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);
 
 		ValidateReplication.unsupportedAPICall();
@@ -87,8 +87,8 @@ public class UDDIReplicationImpl extends
 
 	public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body)
 			throws DispositionReportFaultMessage {
-            long startTime = System.nanoTime();
-            long procTime = System.nanoTime() - startTime;
+            long startTime = System.currentTimeMillis();
+            long procTime = System.currentTimeMillis() - startTime;
             serviceCounter.update(ReplicationQuery.NOTIFY_CHANGERECORDSAVAILABLE, 
                     QueryStatus.SUCCESS, procTime);
 
@@ -98,8 +98,8 @@ public class UDDIReplicationImpl extends
 
 	public void transferCustody(TransferCustody body)
 			throws DispositionReportFaultMessage {
-	    long startTime = System.nanoTime();
-            long procTime = System.nanoTime() - startTime;
+	    long startTime = System.currentTimeMillis();
+            long procTime = System.currentTimeMillis() - startTime;
             serviceCounter.update(ReplicationQuery.TRANSFER_CUSTODY, 
                     QueryStatus.SUCCESS, procTime);
 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java Sat May 18 01:11:28 2013
@@ -60,7 +60,7 @@ public class UDDISecurityImpl extends Au
 	
 	public void discardAuthToken(DiscardAuthToken body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 	    
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -77,11 +77,11 @@ public class UDDISecurityImpl extends Au
 			}
 	
 			tx.commit();
-                        long procTime = System.nanoTime() - startTime;
+                        long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(SecurityQuery.DISCARD_AUTHTOKEN, 
                                 QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(SecurityQuery.DISCARD_AUTHTOKEN, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                                                 
@@ -105,7 +105,7 @@ public class UDDISecurityImpl extends Au
 	
 	public AuthToken getAuthToken(String publisherId)
 	throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		if (publisherId == null || publisherId.length() == 0)
 			throw new UnknownUserException(new ErrorMessage("errors.auth.InvalidCredentials", publisherId));
@@ -138,13 +138,13 @@ public class UDDISecurityImpl extends Au
 			MappingModelToApi.mapAuthToken(modelAuthToken, apiAuthToken);
 
 			tx.commit();
-	                long procTime = System.nanoTime() - startTime;
+	                long procTime = System.currentTimeMillis() - startTime;
 	                serviceCounter.update(SecurityQuery.GET_AUTHTOKEN, 
 	                        QueryStatus.SUCCESS, procTime);
 
 			return apiAuthToken;
                 } catch (DispositionReportFaultMessage drfm) {
-                    long procTime = System.nanoTime() - startTime;
+                    long procTime = System.currentTimeMillis() - startTime;
                     serviceCounter.update(SecurityQuery.GET_AUTHTOKEN, 
                             QueryStatus.FAILED, procTime);                      
                     throw drfm;                                                                                                 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIServiceCounter.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIServiceCounter.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIServiceCounter.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIServiceCounter.java Sat May 18 01:11:28 2013
@@ -28,6 +28,11 @@ import org.apache.commons.logging.LogFac
 import org.apache.juddi.api.util.QueryStatus;
 import org.apache.juddi.api.util.UDDIQuery;
 
+/**
+ * This class provides MBean functionality that offers metrics on UDDI service method invocations
+ * and various management functions (documented by Alex O'Ree)
+ * @author Tom Cunningham
+ */
 public class UDDIServiceCounter implements DynamicMBean, Serializable {
 
     private static Log log = LogFactory.getLog(UDDIServiceCounter.class);
@@ -146,6 +151,14 @@ public class UDDIServiceCounter implemen
 
     }
 
+    /**
+     * This updates the performance metrics for a given service.
+     * 
+     * Note, as of jUDDI 3.2, procTime MUST be in milliseconds. Prior to 3.2 used nanoseconds
+     * @param queryObject the item that was executed
+     * @param queryStatus success or fail status
+     * @param procTime Expects time in milliseconds
+     */
     public synchronized void update(UDDIQuery queryObject, QueryStatus queryStatus, 
             long procTime) {        
         //log.info("Updating " + queryObject.getQuery() + " time " + procTime);

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetCachingImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetCachingImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetCachingImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetCachingImpl.java Sat May 18 01:11:28 2013
@@ -49,8 +49,8 @@ public class UDDIValueSetCachingImpl ext
     public void getAllValidValues(String authInfo, String modelKey,
 			Holder<String> chunkToken, Holder<List<ValidValue>> validValue)
 			throws DispositionReportFaultMessage {
-            long startTime = System.nanoTime();
-            long procTime = System.nanoTime() - startTime;
+            long startTime = System.currentTimeMillis();
+            long procTime = System.currentTimeMillis() - startTime;
             serviceCounter.update(ValueSetCachingQuery.GET_ALLVALIDVALUES, 
                     QueryStatus.SUCCESS, procTime);
 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java Sat May 18 01:11:28 2013
@@ -46,8 +46,8 @@ public class UDDIValueSetValidationImpl 
     
 	public DispositionReport validateValues(ValidateValues body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
-                long procTime = System.nanoTime() - startTime;
+	        long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(ValueSetValidationQuery.VALIDATE_VALUES, 
                         QueryStatus.SUCCESS, procTime);
 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java Sat May 18 01:11:28 2013
@@ -1,7 +1,7 @@
 package org.apache.juddi.config;
 
 public interface Property {
-
+    public final static String JDDU_SUBSCRIPTION_MAXENTITIES="juddi.subscription.maxentities";
     public final static String JUDDI_ROOT_PUBLISHER = "juddi.root.publisher";
     public final static String JUDDI_LOAD_INSTALL_DATA = "juddi.load.install.data";
     public final static String JUDDI_PERSISTENCEUNIT_NAME = "juddi.persistenceunit.name";

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java Sat May 18 01:11:28 2013
@@ -14,15 +14,21 @@
  * limitations under the License.
  *
  */
-
- package org.apache.juddi.validation;
+package org.apache.juddi.validation;
 
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.HashSet;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.persistence.EntityManager;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.juddi.config.AppConfig;
+import org.apache.juddi.config.Property;
 
 import org.apache.juddi.keygen.KeyGenerator;
 import org.apache.juddi.keygen.KeyGeneratorFactory;
@@ -45,192 +51,271 @@ import org.uddi.v3_service.DispositionRe
  */
 public class ValidateSubscription extends ValidateUDDIApi {
 
-	public ValidateSubscription(UddiEntityPublisher publisher) {
-		super(publisher);
-	}
-
-	public void validateSubscriptions(EntityManager em, List<org.uddi.sub_v3.Subscription> entityList) throws DispositionReportFaultMessage {
-
-		// No null or empty list
-		if (entityList == null || entityList.size() == 0)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.savesubscription.NoInput"));
-		
-		for (org.uddi.sub_v3.Subscription entity : entityList) {
-			validateSubscription(em, entity);
-		}
-	}
-	
-	public void validateSubscription(EntityManager em, org.uddi.sub_v3.Subscription subscription) throws DispositionReportFaultMessage {
-
-		// A supplied subscription can't be null
-		if (subscription == null)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NullInput"));
-		
-		boolean entityExists = false;
-		String entityKey = subscription.getSubscriptionKey();
-		if (entityKey == null || entityKey.length() == 0) {
-			KeyGenerator keyGen = KeyGeneratorFactory.getKeyGenerator();
-			entityKey = keyGen.generate();
-			subscription.setSubscriptionKey(entityKey);
-		}
-		else {
-			// Per section 4.4: keys must be case-folded
-			entityKey = entityKey.toLowerCase();
-			subscription.setSubscriptionKey(entityKey);
-
-			Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
-			if (obj != null) {
-				entityExists = true;
-
-				// Make sure publisher owns this entity.
-				if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
-					throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
-			}
-			else {
-				// Inside this block, we have a key proposed by the publisher on a new entity
-
-				// Validate key and then check to see that the proposed key is valid for this publisher
-				ValidateUDDIKey.validateUDDIv3Key(entityKey);
-				if (!publisher.isValidPublisherKey(em, entityKey))
-					throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
-
-			}
-			
-		}
-
-		if (!entityExists) {
-			// Check to make sure key isn't used by another entity.
-			if (!isUniqueKey(em, entityKey))
-				throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.KeyExists", entityKey));
-		}
-		
-		
-		validateSubscriptionFilter(subscription.getSubscriptionFilter(), entityExists);
-	}
-
-	public void validateSubscriptionFilter(SubscriptionFilter subscriptionFilter, boolean entityExists) throws DispositionReportFaultMessage {
-		if (!entityExists && subscriptionFilter == null)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NoFilterOnNewSubscription"));
-			
-		if (subscriptionFilter != null) {
-			int filterCount = 0;
-			ValidateInquiry validateInquiry = new ValidateInquiry(publisher);
-			if (subscriptionFilter.getFindBinding() != null) {
-				filterCount++;
-				validateInquiry.validateFindBinding(subscriptionFilter.getFindBinding());
-			}
-			if (subscriptionFilter.getFindBusiness() != null) {
-				filterCount++;
-				validateInquiry.validateFindBusiness(subscriptionFilter.getFindBusiness());
-			}
-			if (subscriptionFilter.getFindService() != null) {
-				filterCount++;
-				validateInquiry.validateFindService(subscriptionFilter.getFindService());
-			}
-			if (subscriptionFilter.getFindTModel() != null) {
-				filterCount++;
-				validateInquiry.validateFindTModel(subscriptionFilter.getFindTModel(), false);
-			}
-			if (subscriptionFilter.getFindRelatedBusinesses() != null) {
-				filterCount++;
-				validateInquiry.validateFindRelatedBusinesses(subscriptionFilter.getFindRelatedBusinesses(), false);
-			}
-			if (subscriptionFilter.getGetBindingDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetBindingDetail(subscriptionFilter.getGetBindingDetail());
-			}
-			if (subscriptionFilter.getGetBusinessDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetBusinessDetail(subscriptionFilter.getGetBusinessDetail());
-			}
-			if (subscriptionFilter.getGetServiceDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetServiceDetail(subscriptionFilter.getGetServiceDetail());
-			}
-			if (subscriptionFilter.getGetTModelDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetTModelDetail(subscriptionFilter.getGetTModelDetail());
-			}
-			if (subscriptionFilter.getGetAssertionStatusReport() != null) {
-				filterCount++;
-			}
-
-			if (filterCount == 0)
-				throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BlankFilter"));
-			
-			if (filterCount > 1)
-				throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.TooManyFilters", String.valueOf(filterCount)));
-
-		}
-		
-	}
-	
-	public void validateDeleteSubscription(EntityManager em, DeleteSubscription body) throws DispositionReportFaultMessage {
-		// No null input
-		if (body == null)
-			throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
-
-		// No null or empty list
-		List<String> entityKeyList = body.getSubscriptionKey();
-		if (entityKeyList == null || entityKeyList.size() == 0)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
-		
-		HashSet<String> dupCheck = new HashSet<String>();
-		int i = 0;
-		for (String entityKey : entityKeyList) {
-
-			// Per section 4.4: keys must be case-folded
-			entityKey = entityKey.toLowerCase();
-			entityKeyList.set(i, entityKey);
-			
-			boolean inserted = dupCheck.add(entityKey);
-			if (!inserted)
-				throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
-			
-			Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
-			if (obj == null)
-				throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", entityKey));
-			
-			// Make sure publisher owns this entity.
-			if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
-				throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
-			
-			i++;
-		}
-	}
-
-	public void validateGetSubscriptionResults(EntityManager em, GetSubscriptionResults body) throws DispositionReportFaultMessage {
-		// No null input
-		if (body == null)
-			throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
-		
-		String subscriptionKey = body.getSubscriptionKey();
-		if (subscriptionKey == null || subscriptionKey.length() == 0)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey));
-		
-		// Per section 4.4: keys must be case-folded
-		subscriptionKey = subscriptionKey.toLowerCase();
-		body.setSubscriptionKey(subscriptionKey);
-		
-		Object obj = em.find(org.apache.juddi.model.Subscription.class, subscriptionKey);
-		if (obj == null)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", subscriptionKey));
-		
-		Date expiresAfter = ((org.apache.juddi.model.Subscription)obj).getExpiresAfter();
-		Date now = new Date();
-		if (expiresAfter.getTime() < now.getTime())
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
-		
-		CoveragePeriod coveragePeriod = body.getCoveragePeriod();
-		if (coveragePeriod == null)
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
-		
-		if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null)
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
-		
-		GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
-		GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
-		if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis())
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));		
-	}
+    public ValidateSubscription(UddiEntityPublisher publisher) {
+        super(publisher);
+    }
+    private DatatypeFactory df = null;
+
+    public void validateSubscriptions(EntityManager em, List<org.uddi.sub_v3.Subscription> entityList) throws DispositionReportFaultMessage {
+
+        // No null or empty list
+        if (entityList == null || entityList.size() == 0) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.savesubscription.NoInput"));
+        }
+
+        for (org.uddi.sub_v3.Subscription entity : entityList) {
+            validateSubscription(em, entity);
+        }
+    }
+
+    private void validateSubscription(EntityManager em, org.uddi.sub_v3.Subscription subscription) throws DispositionReportFaultMessage {
+
+        // A supplied subscription can't be null
+        if (subscription == null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NullInput"));
+        }
+        if (df == null) {
+            try {
+                df = DatatypeFactory.newInstance();
+            } catch (DatatypeConfigurationException ex) {
+                throw new FatalErrorException(new ErrorMessage("errors.DatatypeFactor"));
+            }
+        }
+        boolean entityExists = false;
+        String entityKey = subscription.getSubscriptionKey();
+        //no key specified, make a new one
+        if (entityKey == null || entityKey.length() == 0) {
+            KeyGenerator keyGen = KeyGeneratorFactory.getKeyGenerator();
+            entityKey = keyGen.generate();
+            subscription.setSubscriptionKey(entityKey);
+        } else {
+            //key specified, validate it
+            // Per section 4.4: keys must be case-folded
+            entityKey = entityKey.toLowerCase();
+            subscription.setSubscriptionKey(entityKey);
+
+            Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
+            if (obj != null) {
+                entityExists = true;
+                //revising a new item
+                // Make sure publisher owns this entity.
+                if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription) obj).getAuthorizedName())) {
+                    throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
+                }
+            } else {
+                //new item
+                // Inside this block, we have a key proposed by the publisher on a new entity
+
+                // Validate key and then check to see that the proposed key is valid for this publisher
+                ValidateUDDIKey.validateUDDIv3Key(entityKey);
+                if (!publisher.isValidPublisherKey(em, entityKey)) {
+                    throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
+                }
+
+            }
+
+        }
+
+        if (!entityExists) {
+            // Check to make sure key isn't used by another entity.
+            if (!isUniqueKey(em, entityKey)) {
+                throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.KeyExists", entityKey));
+            }
+        }
+        //AO, if it's already expired, why even allow it?
+        if (subscription.getExpiresAfter() != null) {
+            long expiresat = subscription.getExpiresAfter().toGregorianCalendar().getTimeInMillis();
+            if (System.currentTimeMillis() > expiresat) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.expired"));
+            }
+        }
+        if (subscription.getMaxEntities() != null) {
+            if (subscription.getMaxEntities().intValue() <= 0) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.maxrecordstoosmall"));
+            }
+        }
+        //maxEntities:  This optional integer specifies the maximum number of entities in a notification returned to a subscription listener. 
+        //If not specified, the number of entities sent is not limited, unless by node policy.
+        try {
+            if (subscription.getMaxEntities() == null
+                    || subscription.getMaxEntities().intValue() > AppConfig.getConfiguration().getInt(Property.JDDU_SUBSCRIPTION_MAXENTITIES, 1000)) {
+                subscription.setMaxEntities(AppConfig.getConfiguration().getInt(Property.JDDU_SUBSCRIPTION_MAXENTITIES, 1000));
+            }
+        } catch (ConfigurationException x) {
+            subscription.setMaxEntities(1000);
+        }
+        /*
+         *  notificationInterval:  This optional argument is only required when asynchronous notifications are used. 
+         * It is of type xsd:duration and specifies how often change notifications are to be provided to a subscriber. 
+         * If the notificationInterval specified is not acceptable due to node policy, then the node adjusts the value to
+         * match the next longer time period that is supported.  The adjusted value is provided with the returns from this
+         * API.  Also see Section 5.5.1.1 Specifying Durations.
+         */
+        if (subscription.getNotificationInterval() == null && subscription.getBindingKey() != null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.notificationintervalnotdefined"));
+        }
+        
+        //validate that the binding key exists
+        validateSubscriptionBindingkeyExists(em,subscription.getBindingKey());
+        
+        validateSubscriptionFilter(subscription.getSubscriptionFilter(), entityExists);
+    }
+
+    /**
+     * this handles just the filter items only
+     *
+     * @param subscriptionFilter
+     * @param entityExists or more accurately, is this a new item or not?
+     * @throws DispositionReportFaultMessage
+     */
+    private void validateSubscriptionFilter(SubscriptionFilter subscriptionFilter, boolean entityExists) throws DispositionReportFaultMessage {
+        if (!entityExists && subscriptionFilter == null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NoFilterOnNewSubscription"));
+        }
+
+        if (subscriptionFilter != null) {
+            int filterCount = 0;
+            ValidateInquiry validateInquiry = new ValidateInquiry(publisher);
+            if (subscriptionFilter.getFindBinding() != null) {
+                filterCount++;
+                validateInquiry.validateFindBinding(subscriptionFilter.getFindBinding());
+            }
+            if (subscriptionFilter.getFindBusiness() != null) {
+                filterCount++;
+                validateInquiry.validateFindBusiness(subscriptionFilter.getFindBusiness());
+            }
+            if (subscriptionFilter.getFindService() != null) {
+                filterCount++;
+                validateInquiry.validateFindService(subscriptionFilter.getFindService());
+            }
+            if (subscriptionFilter.getFindTModel() != null) {
+                filterCount++;
+                validateInquiry.validateFindTModel(subscriptionFilter.getFindTModel(), false);
+            }
+            if (subscriptionFilter.getFindRelatedBusinesses() != null) {
+                filterCount++;
+                validateInquiry.validateFindRelatedBusinesses(subscriptionFilter.getFindRelatedBusinesses(), false);
+            }
+            if (subscriptionFilter.getGetBindingDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetBindingDetail(subscriptionFilter.getGetBindingDetail());
+            }
+            if (subscriptionFilter.getGetBusinessDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetBusinessDetail(subscriptionFilter.getGetBusinessDetail());
+            }
+            if (subscriptionFilter.getGetServiceDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetServiceDetail(subscriptionFilter.getGetServiceDetail());
+            }
+            if (subscriptionFilter.getGetTModelDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetTModelDetail(subscriptionFilter.getGetTModelDetail());
+            }
+            if (subscriptionFilter.getGetAssertionStatusReport() != null) {
+                filterCount++;
+            }
+
+            if (filterCount == 0) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BlankFilter"));
+            }
+
+            if (filterCount > 1) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.TooManyFilters", String.valueOf(filterCount)));
+            }
+
+        }
+
+    }
+
+    public void validateDeleteSubscription(EntityManager em, DeleteSubscription body) throws DispositionReportFaultMessage {
+        // No null input
+        if (body == null) {
+            throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        }
+
+        // No null or empty list
+        List<String> entityKeyList = body.getSubscriptionKey();
+        if (entityKeyList == null || entityKeyList.size() == 0) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
+        }
+
+        HashSet<String> dupCheck = new HashSet<String>();
+        int i = 0;
+        for (String entityKey : entityKeyList) {
+
+            // Per section 4.4: keys must be case-folded
+            entityKey = entityKey.toLowerCase();
+            entityKeyList.set(i, entityKey);
+
+            boolean inserted = dupCheck.add(entityKey);
+            if (!inserted) {
+                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
+            }
+
+            Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
+            if (obj == null) {
+                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", entityKey));
+            }
+
+            // Make sure publisher owns this entity.
+            if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription) obj).getAuthorizedName())) {
+                throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
+            }
+
+            i++;
+        }
+    }
+
+    public void validateGetSubscriptionResults(EntityManager em, GetSubscriptionResults body) throws DispositionReportFaultMessage {
+        // No null input
+        if (body == null) {
+            throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        }
+
+        String subscriptionKey = body.getSubscriptionKey();
+        if (subscriptionKey == null || subscriptionKey.length() == 0) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey));
+        }
+
+        // Per section 4.4: keys must be case-folded
+        subscriptionKey = subscriptionKey.toLowerCase();
+        body.setSubscriptionKey(subscriptionKey);
+
+        Object obj = em.find(org.apache.juddi.model.Subscription.class, subscriptionKey);
+        if (obj == null) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", subscriptionKey));
+        }
+
+        Date expiresAfter = ((org.apache.juddi.model.Subscription) obj).getExpiresAfter();
+        Date now = new Date();
+        if (expiresAfter.getTime() < now.getTime()) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
+        }
+
+        CoveragePeriod coveragePeriod = body.getCoveragePeriod();
+        if (coveragePeriod == null) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
+        }
+
+        if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
+        }
+
+        GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
+        GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
+        if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis()) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));
+        }
+    }
+
+    private void validateSubscriptionBindingkeyExists(EntityManager em, String bindingKey) throws ValueNotAllowedException {
+        if (bindingKey==null || bindingKey.length()==0) {
+            return;
+        }
+        Object obj = em.find(org.apache.juddi.model.BindingTemplate.class, bindingKey);
+        if (obj==null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BindingDoesntExist"));
+        }
+    }
 }

Propchange: juddi/trunk/juddi-core/src/main/resources/juddi_install_data/
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-core/src/main/resources/juddi_install_data:r1460934-1483596

Modified: juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml (original)
+++ juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml Sat May 18 01:11:28 2013
@@ -101,7 +101,7 @@
         </categoryBag>
     </tModel>
     <tModel tModelKey="uddi:uddi.org:protocol:keygenerator" xmlns="urn:uddi-org:api_v3">
-        <name>uddi-org: protocol:keyGenerator</name>
+        <name>uddi-org:protocol:keyGenerator</name>
         <description> Key Generator for UDDI Protocol tModels </description>
         <overviewDoc>
             <overviewURL useType="text">
@@ -411,6 +411,78 @@
             <keyedReference keyName="uddi-org:types:transport" keyValue="transport" tModelKey="uddi:uddi.org:categorization:types" />
         </categoryBag>
     </tModel>
+	
+	
+	    <tModel tModelKey="uddi:uddi.org:transport:amqp">
+        <name>uddi-org:amqp</name>
+        <description> A Web service that uses the AMQP transport</description>
+        <overviewDoc>
+            <overviewURL useType="text">
+               http://www.amqp.org/
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:transport" keyValue="transport" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+
+	
+		    <tModel tModelKey="uddi:uddi.org:transport:omgdds">
+        <name>uddi-org:omgdds</name>
+        <description> A Web service that uses the OMG DDS transport</description>
+        <overviewDoc>
+            <overviewURL useType="text">
+              http://portals.omg.org/dds/
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:transport" keyValue="transport" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+	
+	
+	<tModel tModelKey="uddi:uddi.org:transport:udp">
+        <name>uddi-org:udp</name>
+        <description> A Web service that uses the UDP transport</description>
+        <overviewDoc>
+            <overviewURL useType="text">
+              http://docs.oasis-open.org/ws-dd/soapoverudp/1.1/os/wsdd-soapoverudp-1.1-spec-os.html
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:transport" keyValue="transport" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+	
+	<tModel tModelKey="uddi:uddi.org:transport:jms">
+        <name>uddi-org:jms</name>
+        <description> A Web service that uses the JMS API</description>
+        <overviewDoc>
+            <overviewURL useType="text">
+              http://docs.oasis-open.org/ws-dd/soapoverudp/1.1/os/wsdd-soapoverudp-1.1-spec-os.html
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:transport" keyValue="transport" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+	
+	<tModel tModelKey="uddi:uddi.org:protocol:rest">
+        <name>uddi-org:protocol:rest</name>
+        <description xml:lang="en">A tModel that represents the Representational State Transfer architectural style</description>
+        <overviewDoc>
+            <overviewURL>
+               http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:protocol" keyValue="protocol" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+	
+	
+	
+	
     <tModel tModelKey="uddi:uddi.org:findqualifier:approximatematch">
         <name>uddi-org:approximateMatch:SQL99
         </name>
@@ -909,6 +981,22 @@
             <keyedReference keyName="uddi-org:types:protocol" keyValue="protocol" tModelKey="uddi:uddi.org:categorization:types" />
         </categoryBag>
     </tModel>
+	
+	
+	 <tModel tModelKey="uddi:uddi.org:protocol:soap12">
+        <name>uddi-org:protocol:soap12</name>
+        <description xml:lang="en">A tModel that represents the SOAP 1.2 protocol</description>
+        <overviewDoc>
+            <overviewURL>
+                http://www.oasis-open.org/committees/uddi-spec/doc/tn/uddi-spec-tc-tn-wsdl-v2.htm#soap
+            </overviewURL>
+        </overviewDoc>
+        <categoryBag>
+            <keyedReference keyName="uddi-org:types:protocol" keyValue="protocol" tModelKey="uddi:uddi.org:categorization:types" />
+        </categoryBag>
+    </tModel>
+	
+	
     <!-- 6. HTTP Protocol tModel -->
     <tModel tModelKey="uddi:uddi.org:protocol:http">
         <name>uddi-org:protocol:http</name>

Modified: juddi/trunk/juddi-core/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/resources/messages.properties?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/resources/messages.properties (original)
+++ juddi/trunk/juddi-core/src/main/resources/messages.properties Sat May 18 01:11:28 2013
@@ -60,6 +60,7 @@ E_valueNotAllowed=A value did not pass v
 
 
 #-- General error messages
+errors.DatatypeFactor=Can't create a DatatypeFactory instance.
 errors.Unspecified=An unspecified error occurred
 errors.Unsupported=This version does not support this feature or API
 errors.Unsupported.findQualifier=Invalid findQualifier value was passed
@@ -187,9 +188,13 @@ errors.transferentities.TokenExpired=The
 errors.transferentities.KeyMismatch=A supplied key does not match a key associated with the transfer request
 errors.savesubscription.NoInput=At least one Subscription must be provided
 errors.subscription.NullInput=The subscription structure cannot be blank
+errors.subscription.BindingDoesntExist=The requested subscription has a binding key defined, however that binding template does not exist
 errors.subscription.NoFilterOnNewSubscription=No subscription filter was provided on this new subscription request
 errors.subscription.BlankFilter=A filter structure was provided but no filter criteria was specified
 errors.subscription.TooManyFilters=Only one filter is allowed per subscription request
+errors.subscription.expired=The expiration timestamp has already passed.
+errors.subscription.maxrecordstoosmall=When specifying the maxium record, it must be greater than zero
+errors.subscription.notificationintervalnotdefined=A notification interval must be specified and must be greater than 0ms
 errors.getsubscriptionresult.SubscriptionExpired=The passed subscription has expired
 errors.getsubscriptionresult.NullCoveragePeriod=The coverage period cannot be blank
 errors.getsubscriptionresult.InvalidDateInCoveragePeriod=The coverage period must contain valid dates for start and end points

Propchange: juddi/trunk/juddi-core/src/main/resources/messages.properties
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-core/src/main/resources/messages.properties:r1460934-1483596

Modified: juddi/trunk/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java (original)
+++ juddi/trunk/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java Sat May 18 01:11:28 2013
@@ -31,6 +31,7 @@ import org.apache.juddi.api.impl.UDDISec
 import org.apache.juddi.api.impl.UDDISubscriptionImpl;
 import org.apache.juddi.model.Subscription;
 import org.apache.juddi.model.UddiEntityPublisher;
+import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.tck.TckBindingTemplate;
 import org.apache.juddi.v3.tck.TckBusiness;
 import org.apache.juddi.v3.tck.TckBusinessService;
@@ -42,6 +43,10 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.uddi.api_v3.FindQualifiers;
+import org.uddi.api_v3.FindService;
+import org.uddi.api_v3.Name;
+import org.uddi.api_v3.ServiceList;
 import org.uddi.sub_v3.GetSubscriptionResults;
 import org.uddi.sub_v3.SubscriptionResultsList;
 import org.uddi.v3_service.DispositionReportFaultMessage;
@@ -49,71 +54,124 @@ import org.uddi.v3_service.DispositionRe
 /**
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
  */
-public class SubscriptionNotifierTest 
-{
-	private static Log logger = LogFactory.getLog(SubscriptionNotifierTest.class);
-	private static API_010_PublisherTest api010 = new API_010_PublisherTest();
-	private static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBusiness tckBusiness = new TckBusiness(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBusinessService tckBusinessService = new TckBusinessService(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBindingTemplate tckBindingTemplate = new TckBindingTemplate(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckSubscription tckSubscription = new TckSubscription(new UDDISubscriptionImpl(), new UDDISecurityImpl());
-
-	private static String authInfoJoe = null;
-	
-	@BeforeClass
-	public static void setup() {
-		logger.debug("Getting auth token..");
-		try {
-			api010.saveJoePublisher();
-			authInfoJoe = TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			//tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			tckSubscription.saveJoePublisherSubscription(authInfoJoe);
-			//tckSubscription.getJoePublisherSubscriptionResults(authInfoJoe);
-		} catch (RemoteException e) {
-			logger.error(e.getMessage(), e);
-			Assert.fail("Could not obtain authInfo token.");
-		}
-	}
-	@Test
-	public void testGetSubscriptionResults() 
-		throws ConfigurationException, MalformedURLException, DispositionReportFaultMessage, DatatypeConfigurationException
-	{
-		SubscriptionNotifier notifier = new SubscriptionNotifier();
-		notifier.cancel();
-		Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
-		Assert.assertEquals(1, subscriptions.size());
-		Subscription subscription = subscriptions.iterator().next();
-		GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date(new Date().getTime() + 60000l));
-		getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
-		UddiEntityPublisher publisher = new UddiEntityPublisher();
-		publisher.setAuthorizedName(subscription.getAuthorizedName());
-		SubscriptionResultsList resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
-		logger.info("Expecting the resultList to be null: " + resultList.getServiceList());
-		Assert.assertNull(resultList.getServiceList());
-		tckBusinessService.updateJoePublisherService(authInfoJoe, "updated description");
-		resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
-		//We're expecting a changed service
-		logger.info("Expecting the resultList to have 1 service: " + resultList.getServiceList());
-		Assert.assertNotNull(resultList.getServiceList());
-		//We should detect these changes.
-		boolean hasChanges = notifier.resultListContainsChanges(resultList);
-		Assert.assertTrue(hasChanges);
-		System.out.print(resultList);
-		notifier.notify(getSubscriptionResults,resultList,new Date());
-	}
-	
-	
-	@AfterClass
-	public static void teardown() {
-		tckSubscription.deleteJoePublisherSubscription(authInfoJoe);
-		//tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-		tckBusinessService.deleteJoePublisherService(authInfoJoe);
-		tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-		tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-	}
-	
+public class SubscriptionNotifierTest {
+
+    private static Log logger = LogFactory.getLog(SubscriptionNotifierTest.class);
+    private static API_010_PublisherTest api010 = new API_010_PublisherTest();
+    private static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBusiness tckBusiness = new TckBusiness(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBusinessService tckBusinessService = new TckBusinessService(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBindingTemplate tckBindingTemplate = new TckBindingTemplate(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckSubscription tckSubscription = new TckSubscription(new UDDISubscriptionImpl(), new UDDISecurityImpl());
+    private static String authInfoJoe = null;
+
+    @BeforeClass
+    public static void setup() {
+        logger.debug("Getting auth token..");
+        try {
+            DumpAllBusinesses();
+            //calls uddi-tck-base//rc/main/resources/uddi_data/joepublisher
+            //setups up a JUDDI user account
+
+            api010.saveJoePublisher();
+
+            //login as joe
+            authInfoJoe = TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+            //makes tmodel uddi:uddi.joepublisher.com:keygenerator
+            tckTModel.saveJoePublisherTmodel(authInfoJoe);
+
+            //saves a signed business, no services
+            //key = uddi:uddi.joepublisher.com:businessone
+            tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+            //service key = uddi:uddi.joepublisher.com:serviceone
+            //bt = uddi:uddi.joepublisher.com:bindingone
+            String bindingKey = tckBusinessService.saveJoePublisherService(authInfoJoe);
+
+
+            //tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+
+
+            //makes subscription key=uddi:uddi.joepublisher.com:subscriptionone
+            //find exact match on "Service One"
+            //callback binding key=empty string
+            tckSubscription.saveJoePublisherSubscription(authInfoJoe, bindingKey);
+
+
+            tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+
+
+            DumpAllBusinesses();
+
+
+
+            //tckSubscription.getJoePublisherSubscriptionResults(authInfoJoe);
+        } catch (RemoteException e) {
+            logger.error(e.getMessage(), e);
+            Assert.fail("Could not obtain authInfo token.");
+        }
+    }
+
+    private static void DumpAllBusinesses() {
+        UDDIInquiryImpl inquiry = new UDDIInquiryImpl();
+        FindService fs = new FindService();
+        fs.setFindQualifiers(new FindQualifiers());
+        fs.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+        fs.getName().add(new Name("%", null));
+        try {
+            ServiceList findService = inquiry.findService(fs);
+            if (findService.getServiceInfos() == null) {
+                logger.warn("NO SERVICES RETURNED!");
+            } else {
+                for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {
+                    logger.warn(findService.getServiceInfos().getServiceInfo().get(i).getName().get(0).getValue() + " "
+                            + findService.getServiceInfos().getServiceInfo().get(i).getServiceKey() + " "
+                            + findService.getServiceInfos().getServiceInfo().get(i).getBusinessKey());
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    @Test
+    public void testGetSubscriptionResults()
+            throws ConfigurationException, MalformedURLException, DispositionReportFaultMessage, DatatypeConfigurationException {
+        SubscriptionNotifier notifier = new SubscriptionNotifier();
+        notifier.cancel();
+        Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
+
+        Assert.assertEquals(1, subscriptions.size());
+        Subscription subscription = subscriptions.iterator().next();
+        GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date(new Date().getTime() + 60000l));
+        getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
+        UddiEntityPublisher publisher = new UddiEntityPublisher();
+        publisher.setAuthorizedName(subscription.getAuthorizedName());
+        SubscriptionResultsList resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
+        logger.info("Expecting the resultList to be null: " + resultList.getServiceList());
+        Assert.assertNull(resultList.getServiceList());
+        tckBusinessService.updateJoePublisherService(authInfoJoe, "updated description");
+        resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
+        //We're expecting a changed service
+        logger.info("Expecting the resultList to have 1 service: " + resultList.getServiceList());
+        Assert.assertNotNull(resultList.getServiceList());
+        //We should detect these changes.
+        boolean hasChanges = notifier.resultListContainsChanges(resultList);
+        Assert.assertTrue(hasChanges);
+        System.out.print(resultList);
+        notifier.notify(getSubscriptionResults, resultList, new Date());
+    }
+
+    @AfterClass
+    public static void teardown() {
+
+        //if (logger.isDebugEnabled()) 
+        {
+            DumpAllBusinesses();
+        }
+        tckSubscription.deleteJoePublisherSubscription(authInfoJoe);
+        //tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+    }
 }

Modified: juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties (original)
+++ juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties Sat May 18 01:11:28 2013
@@ -130,4 +130,7 @@ juddi.validation.enforceReferentialInteg
 
 #juddi.mail.smtp.password
 ##Password used to authenticate to the SMTP server
-##used only if juddi.mail.smtp.auth is true
\ No newline at end of file
+##used only if juddi.mail.smtp.auth is true
+
+#Since 3.1.5 the maxium ammount of returned subscription entities allowed
+juddi.subscription.maxentities = 1000
\ No newline at end of file

Propchange: juddi/trunk/juddi-gui/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May 18 01:11:28 2013
@@ -0,0 +1,2 @@
+build
+dist

Propchange: juddi/trunk/juddi-gui-dsig/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May 18 01:11:28 2013
@@ -0,0 +1,2 @@
+build
+dist



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


Mime
View raw message