Author: alexoree
Date: Wed Sep 25 00:55:51 2013
New Revision: 1526073
URL: http://svn.apache.org/r1526073
Log:
JUDDI-656 fixed
JUDDI-654 fixed
JUDDI-644 possibly fixed
Modified:
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
juddi/trunk/juddi-core/src/test/resources/juddiv3.xml
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
Modified: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml Wed
Sep 25 00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified:
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
Wed Sep 25 00:55:51 2013
@@ -99,6 +99,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified:
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
Wed Sep 25 00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified:
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
Wed Sep 25 00:55:51 2013
@@ -99,6 +99,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml (original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml Wed Sep 25
00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
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=1526073&r1=1526072&r2=1526073&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
Wed Sep 25 00:55:51 2013
@@ -1,5 +1,6 @@
package org.apache.juddi.config;
+import org.apache.juddi.subscription.SubscriptionNotifier;
import org.apache.juddi.v3.auth.CryptedXMLDocAuthenticator;
import org.apache.juddi.v3.auth.LdapExpandedAuthenticator;
import org.apache.juddi.v3.auth.LdapSimpleAuthenticator;
@@ -111,10 +112,23 @@ public interface Property {
public final static String JUDDI_NOTIFICATION_START_BUFFER =
"juddi.notification.start.buffer";
public final static String JUDDI_NOTIFICATION_INTERVAL =
"juddi.notification.interval";
- public final static String JUDDI_NOTIFICATION_ACCEPTABLE_LAGTIME =
"juddi.notification.acceptable.lagtime";
- public final static String JUDDI_NOTIFICATION_MAX_TRIES =
"juddi.notification.max.tries";
- public final static String JUDDI_NOTIFICATION_LIST_RESET_INTERVAL =
"juddi.notification.list.reset.interval";
-
+ /**
+ * default value = 1000
+ * @see SubscriptionNotifier
+ */
+ public final static String JUDDI_NOTIFICATION_ACCEPTABLE_LAGTIME =
"juddi.notification.acceptableLagtime";
+ /**
+ * maximum delivery count
+ * @see SubscriptionNotifier
+ */
+ public final static String JUDDI_NOTIFICATION_MAX_TRIES =
"juddi.notification.maxTries";
+ public final static String JUDDI_NOTIFICATION_LIST_RESET_INTERVAL =
"juddi.notification.maxTriesResetInterval";
+ /**
+ * send an auth token with the result set? default is false
+ * @see SubscriptionNotifier
+ * @since 3.2
+ */
+ public final static String
JUDDI_NOTIFICATION_SENDAUTHTOKEN="juddi.notification.sendAuthTokenWithResultList";
public final static String JUDDI_JNDI_REGISTRATION =
"juddi.jndi.registration";
public final static String JUDDI_RMI_PORT = "juddi.rmi.port";
public final static String JUDDI_RMI_REGISTRATION =
"juddi.rmi.registration";
Modified:
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
---
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java
(original)
+++
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java
Wed Sep 25 00:55:51 2013
@@ -70,6 +70,10 @@ public class SubscriptionNotifier extend
private long acceptableLagTime =
AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_ACCEPTABLE_LAGTIME,
1000l); //1000 milliseconds
private int maxTries =
AppConfig.getConfiguration().getInt(Property.JUDDI_NOTIFICATION_MAX_TRIES, 3);
private long badListResetInterval =
AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_LIST_RESET_INTERVAL,
1000l * 3600); //one hour
+ /**
+ * @since 3.2
+ */
+ private boolean sendToken =
AppConfig.getConfiguration().getBoolean(Property.JUDDI_NOTIFICATION_SENDAUTHTOKEN,
false);
private UDDISubscriptionImpl subscriptionImpl = new
UDDISubscriptionImpl();
private Boolean alwaysNotify = false;
private Date desiredDate = null;
@@ -83,6 +87,10 @@ public class SubscriptionNotifier extend
private static Map<String,Integer> badNotifications= new
ConcurrentHashMap<String,Integer>();
private static Date lastBadNotificationReset = new Date();
+ /**
+ * default constructor
+ * @throws ConfigurationException
+ */
public SubscriptionNotifier() throws ConfigurationException {
super();
timer = new Timer(true);
@@ -152,6 +160,7 @@ public class SubscriptionNotifier extend
GetSubscriptionResults
getSubscriptionResults =
buildGetSubscriptionResults(subscription, notificationDate);
if
(getSubscriptionResults!=null) {
+ //TODO chunking
getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
UddiEntityPublisher
publisher = new UddiEntityPublisher();
publisher.setAuthorizedName(subscription.getAuthorizedName());
@@ -200,7 +209,7 @@ public class SubscriptionNotifier extend
long lagTime = System.currentTimeMillis() -
scheduleExecutionTime;
if (lagTime <= acceptableLagTime || acceptableLagTime < 0) {
return true;
- } else {
+ } else {
log.debug("NotificationTimer is lagging " + lagTime + "
milli seconds behind. A lag time "
+ "which exceeds an acceptable lagtime
of " + acceptableLagTime + "ms indicates "
+ "that the registry server is under
load or was in sleep mode. We are therefore skipping this notification "
@@ -324,19 +333,22 @@ public class SubscriptionNotifier extend
//
resultList.getServiceList().setServiceInfos(null);
// }
body.setSubscriptionResultsList(resultList);
- String authorizedName =
modelSubscription.getAuthorizedName();
- UDDISecurityImpl security = new UDDISecurityImpl();
-
- if (authorizedName != null) { // add a security token
if needed
- try {
- //obtain a token for this publisher
- org.uddi.api_v3.AuthToken token =
security.getAuthToken(authorizedName);
- body.setAuthInfo(token.getAuthInfo());
- } catch (DispositionReportFaultMessage e) {
- body.setAuthInfo("Failed to generate
token, please contact UDDI admin");
- log.error(e.getMessage(),e);
- }
- }
+ if (sendToken)
+ {
+ String authorizedName =
modelSubscription.getAuthorizedName();
+ UDDISecurityImpl security = new UDDISecurityImpl();
+
+ if (authorizedName != null) { // add a security
token if needed
+ try {
+ //obtain a token for this publisher
+ org.uddi.api_v3.AuthToken token =
security.getAuthToken(authorizedName);
+
body.setAuthInfo(token.getAuthInfo());
+ } catch (DispositionReportFaultMessage e) {
+ body.setAuthInfo("Failed to
generate token, please contact UDDI admin");
+ log.error(e.getMessage(),e);
+ }
+ }
+ }
if (bindingTemplate!=null) {
if
(AccessPointType.END_POINT.toString().equalsIgnoreCase(bindingTemplate.getAccessPointType())
||
@@ -362,19 +374,18 @@ public class SubscriptionNotifier extend
if
(badNotifications.containsKey(resultList.getSubscription().getSubscriptionKey()))
badNotifications.remove(resultList.getSubscription().getSubscriptionKey());
}
- } catch (WebServiceException e) {
- if (e.getCause() instanceof
IOException) {
+ }
+ catch (Exception e) {
+ if (e.getCause() instanceof
IOException) {
addBadNotificationToList(subscriptionKey, bindingTemplate.getAccessPointUrl());
//we could not notify
so compensate the transaction above
modelSubscription.setLastNotified(lastNotifiedDate);
tx.begin();
em.persist(modelSubscription);
tx.commit();
- } else {
- log.warn("Unexpected
WebServiceException " + e.getMessage() + e.getCause());
+ //} else {
+ //log.warn("Unexpected
WebServiceException " + e.getMessage() + e.getCause());
}
-
- } catch (Exception e) {
log.warn("Unexpected
notification exception:" + e.getMessage() + e.getCause());
}
} else {
Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml Wed Sep 25
00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml Wed Sep 25
00:55:51 2013
@@ -95,6 +95,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml Wed Sep 25
00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml Wed Sep
25 00:55:51 2013
@@ -99,6 +99,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3.xml Wed Sep 25 00:55:51
2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified:
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
---
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
(original)
+++
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
Wed Sep 25 00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified: juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
URL:
http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
--- juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
(original)
+++ juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml Wed Sep
25 00:55:51 2013
@@ -100,6 +100,11 @@
<start>
<buffer>0</buffer>
</start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+
<sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
</notification>
<!-- All Authentication related settings -->
<auth>
Modified:
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
URL:
http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java?rev=1526073&r1=1526072&r2=1526073&view=diff
==============================================================================
---
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
(original)
+++
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
Wed Sep 25 00:55:51 2013
@@ -509,4 +509,10 @@ public class UDDI_090_SubscriptionListen
mailServer.stop();
}
}
+
+
+ //TODO If a subscriber specifies a maximum number of entries to be
returned with a subscription and the amount of data to be returned exceeds this
limit, or if the node determines based on its policy that there are too many
entries to be returned in a single group, then the node SHOULD provide a
chunkToken with results.
+
+
+ //TODO If no more results are pending, the value of the chunkToken MUST
be "0".
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]