[jbossws-issues] [JBoss JIRA] Reopened: (JBWS-1965) subscribe method on subscription manager - NullPointerException
Antonio Souza (JIRA)
jira-events at lists.jboss.org
Wed Feb 20 08:27:42 EST 2008
[ http://jira.jboss.com/jira/browse/JBWS-1965?page=all ]
Antonio Souza reopened JBWS-1965:
---------------------------------
I understand it's mandatory.
All I'm saying is that there should be a constraint and a reasonable exception when that happens. I mean, when one forgets or misses its declaration.
It can't just raise a NullPointerException.
As I described initially... When we assert that the SubscriptionManager is missing, we could just raise a SubscriptionManagerMissingException...
Do you follow ?
> subscribe method on subscription manager - NullPointerException
> ---------------------------------------------------------------
>
> Key: JBWS-1965
> URL: http://jira.jboss.com/jira/browse/JBWS-1965
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: ws-eventing
> Affects Versions: jbossws-2.0.1.SP2
> Environment: JBoss 4.2.2 / JDK 1.5_14 / Windows XP MCE / JBossWS 2.0.1-SP2
> Reporter: Antonio Souza
> Assigned To: Heiko Braun
> Fix For: jbossws-native-2.0.4
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The subscribe method raises NullPointerException when trying to subscribe to an event source with the state of 'CREATED'.
> This happens because 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list