-
Bug
-
Resolution: Done
-
Optional
-
jbossws-2.0.1.SP2
-
None
-
Low
The subscribe method raises NullPointerException when trying to subscribe to an event source with the state of 'CREATED'.
This happens when there's no SubscriptionManager endpoint declared. The event source never goes 'STARTED'.
In the subscribe method when trying to get where managerAddress, it returns null raising NullPointerException.
It should have an assertion on the EventSource object, verifying whether or not it is 'STARTED' as below:
org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager
303: if (null == eventSource)
304: throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not registered");
Assertion snippet after 304:
if (eventSource.getState() != STARTED)
throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not started");
or something like that.
The exception happens here:
341: attrURI.setValue(eventSource.getManagerAddress().toString());
eventSource.getManagerAddress returns null raising NullPointerException.