[jboss-jira] [JBoss JIRA] Reopened: (JBPORTAL-1730) IdentityServiceControllerImpl : unregister existing MBean service before to re register them

Antoine Herzog (JIRA) jira-events at lists.jboss.org
Fri Feb 29 14:14:59 EST 2008


     [ http://jira.jboss.com/jira/browse/JBPORTAL-1730?page=all ]

Antoine Herzog reopened JBPORTAL-1730:
--------------------------------------

             

For Identity 1.0.2, the identity services have been modified.

IdentityServiceControllerImpl have been rewritten

registration of these services is done with the IdentityServiceLoader.

The new class needs also this small, usefull, test : unregister the services that are yet on, before to ask the new registration...

in the IdentityServiceLoader, at the end of the method registerMBean() :
add the code :

					ObjectName objName = new ObjectName(serviceName);
					if (getServer().isRegistered(objName)) {
						getServer().unregisterMBean(objName);
					}
					getServer().registerMBean(mbean, objName);

thanks,


> IdentityServiceControllerImpl : unregister existing MBean service before to re register them
> --------------------------------------------------------------------------------------------
>
>                 Key: JBPORTAL-1730
>                 URL: http://jira.jboss.com/jira/browse/JBPORTAL-1730
>             Project: JBoss Portal
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: Portal Identity
>    Affects Versions: 2.6.1 Final
>            Reporter: Antoine Herzog
>         Assigned To: Thomas Heute
>            Priority: Optional
>             Fix For: 2.6.3 Final
>
>
> In IdentityServiceControllerImpl (service name="portal:service=Module,type=IdentityServiceController")
> the Identity Beans are registered as JMX MBeans.
> When redeploying the service, an exception is thrown, as the services are yet deployed.
> javax.management.InstanceAlreadyExistsException: portal:service=Module,type=User already registered.
> Let's put this code before to register the bean, at line 378 of IdentityServiceControllerImpl.java
> // Unregister the former service is if it is yet there.
> // This to avoid the exception when redeploying this service
> if (getServer().isRegistered(
> 		new ObjectName(module.getServiceName()))) {
> 	getServer().unregisterMBean(
> 			new ObjectName(module.getServiceName()));
> }
> Thanks,

-- 
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 jboss-jira mailing list