Author: heiko.braun(a)jboss.com
Date: 2008-02-22 15:22:11 -0500 (Fri, 22 Feb 2008)
New Revision: 5783
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
Log:
Fix JBWS-1965: Subscribe method on subscription manager - NullPointerException
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2008-02-22
19:46:26 UTC (rev 5782)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2008-02-22
20:22:11 UTC (rev 5783)
@@ -303,6 +303,9 @@
if (null == eventSource)
throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS,
"EventSource '" + eventSourceNS + "' not registered");
+ if (eventSource.getState() != EventSource.State.STARTED)
+ throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS,
"EventSource '" + eventSourceNS + "' not started");
+
// expiry constraints
if (expires != null)
{