users@glassfish.java.net

Re: Bundle warning messages: MDBContainer/Current thread done cleanup message, Bundle already deployed

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 26 May 2011 17:32:30 +0530

On Thursday 26 May 2011 04:57 PM, Robert Weeks wrote:
> I am actually concerned about the message:
>> Bundle com.ext_inc.systemmanager.SystemManager [265] is already deployed at
>>
>> How are you deploying your bundle? Which GF build are you using?
> This was my bigger concern as well - I am using 3.1 release.
>
> We deploy in the autodeploy/bundles directory (we have many other bundles running as well in this manner).
>
> Our "SystemManager" bundle is using Declarative Services to register servlets and other resources.
> The SystemManager is registered as a Service, and using DS one of the servlets is trying to bind to it - which does work fine - but when restarting the server - the message above is coming about (only on this bundle).
>
> This seems to only happen when using this (with the @Component annotation - using bnd to build the bundle) - example (we derive the alias dynamically, which is why that property is not a part of the @Component annotation on this one):
>
> @Component(provide = HttpServlet.class)
> public class SystemManagerProxy extends SystemManagerServletSupport {
> private SystemManagerService systemManager;
> private HttpService http;
> ...
>
> protected void setHttp(HttpService http) {
> this.http = http;
> registerHttpResources();
> }
>
> protected void unsetHttp(HttpService http) {
> unregisterHttpResources();
> this.http = null;
> }
>
> protected void setSystemManager(SystemManagerService systemManager) {
> this.systemManager = systemManager;
> }
>
> protected void unsetSystemManager(SystemManagerService systemManager) {
> this.systemManager = null;
> }
> }
>
>
>
> bnd file before compilation:
>
> Service-Component: com.ext_inc.systemmanager.servlets.SystemManagerProxy;\
> http=org.osgi.service.http.HttpService;\
> systemManager=com.ext_inc.systemmanager.service.SystemManagerService
>
>
> which creates the xml file like:
>
> OSGI-INF/com.ext_inc.systemmanager.servlets.SystemManagerProxy.xml
>
> Which has:
>
> <?xml version='1.0' encoding='utf-8'?>
> <component name='com.ext_inc.systemmanager.servlets.SystemManagerProxy'>
> <implementation class='com.ext_inc.systemmanager.servlets.SystemManagerProxy'/>
> <service>
> <provide interface='javax.servlet.http.HttpServlet'/>
> </service>
> <reference name='systemManager' interface='com.ext_inc.systemmanager.service.SystemManagerService' bind='setSystemManager' unbind='unsetSystemManager'/>
> <reference name='http' interface='org.osgi.service.http.HttpService' bind='setHttp' unbind='unsetHttp'/>
> </component>
>
>
> I am not sure if I am not doing something correctly here or just missing something.
>
> I am registering the service in my activator start|stop:
>
> start:
> props.put(Constants.SERVICE_PID, "com.ext_inc.systemmanager.SystemManagerService");
> context.registerService(SystemManager.ServiceReference, sysMgr, props);
>
> stop:
> context.ungetService(context.getServiceReference(SystemManager.ServiceReference));
>
>
> Thanks for any insight.
Clean your server.log, restart GF and send me the new server.log. Pl.
make sure it contains that "already deployed" message. Let me see what's
going on.

Thanks,
Sahoo