Hi
{https://wso2.org/jira/browse/ESBJAVA-1021} The issue was at the renew
process of the subscription entity which does not include with the topic
name thus NEP thrown
[2011-11-18 17:06:40,230] ERROR - AxisServlet
java.lang.NullPointerException
at
org.wso2.carbon.event.core.internal.delivery.inmemory.InMemorySubscriptionStorage.getTopicName(InMemorySubscriptionStorage.java:126)
at
org.wso2.carbon.event.core.internal.delivery.inmemory.InMemorySubscriptionStorage.renewSubscription(InMemorySubscriptionStorage.java:86
as a workaround
I did modify,
RegistrySubscriptionManager.java and there i did set the topic name to the
existing subscription update entity which only had subscription id and
the expiration date, thus was able to get resolve this
public void renewSubscription(Subscription subscription) throws
EventBrokerException {
try {
UserRegistry userRegistry =
this.registryService.getGovernanceSystemRegistry(EventBrokerHolder.getInstance().getTenantId());
Resource topicIndexResource =
userRegistry.get(this.indexStoragePath);
String topicName =
topicIndexResource.getProperty(subscription.getId());
String subscriptionPath = getResourcePath(subscription.getId(),
topicName);
if (subscriptionPath != null) {
Resource subscriptionResource =
userRegistry.get(subscriptionPath);
// Set the expires property only if it has been set again.
if (subscription.getExpires() != null) {
subscriptionResource.setProperty(EventBrokerConstants.EB_RES_EXPIRS,
ConverterUtil.convertToString(subscription.getExpires()));
}
// There might be updated subscription properties. Set them
too.
Subscription currentSubscription =
JavaUtil.getSubscription(subscriptionResource);
* //Since the subscription renewal does not include name
parameters setting up them
//https://wso2.org/jira/browse/ESBJAVA-1021
subscription.setTopicName(currentSubscription.getTopicName()); *
Map<String, String> properties =
currentSubscription.getProperties();
for (String key : properties.keySet()) {
any objections over this??????
cheers
Dushan Abeyruwan
Senior Software Engineer
Integration Technologies Team
WSO2 Inc. http://wso2.com/
Mobile:(+94)714408632
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev