You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2008/07/23 14:03:32 UTC
[jira] Resolved: (QPID-1181) NullApplicationRegistry initialisation
problem
[ https://issues.apache.org/jira/browse/QPID-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Ritchie resolved QPID-1181.
----------------------------------
Resolution: Fixed
Fix Version/s: M3
Removed erroneous ApplicationRegistry.getInstance() call.
> NullApplicationRegistry initialisation problem
> ----------------------------------------------
>
> Key: QPID-1181
> URL: https://issues.apache.org/jira/browse/QPID-1181
> Project: Qpid
> Issue Type: Bug
> Components: Java Tests
> Reporter: Martin Ritchie
> Fix For: M3
>
>
> Summary:
> The NullApplicationRegistry is the default ApplicationRegistry that will be created if another is not configured when a call is made to ApplicationRegistry.getInstance() and that instance needs creating.
> However, there is a problem with this:
> When created in this way the ApplicationRegistry creates the NullAR and then calls initialise() on it before adding to the global registry so that it can be retrieved via AR.getInstance()
> The problem is that during the initialisation process a new VirtualHost is created.
> _managedObjectRegistry = new NoopManagedObjectRegistry();
> _virtualHostRegistry = new VirtualHostRegistry();
> VirtualHost dummyHost = new VirtualHost("test", getConfiguration());
> Not a problem in itself BUT the VirtualHost constructor creates an MBean that needs to be registered.
> That registration process however does:
> ApplicationRegistry.getInstance().getManagedObjectRegistry();
> This returns null as there is no ManagedObjectRegistry yet.
> the subsequent call to registerObject in DefaultManagedObject results in a NPE.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.