[jboss-dev-forums] [Design of OSGi Integration] - Re: ServiceReferences outside of OSGi Deployers

adrian@jboss.org do-not-reply at jboss.com
Tue Mar 4 03:22:38 EST 2008


You already have the preferred solution in BundleActivatorDeployer.
i.e. inject it into your deployer.

But, I don't really see a problem with getting it via attachments though
as long as you are not wanting to create a BundleContext on a deployment
that is undeployed/errored (it won't the attachment).

Holding references to all those instance objects doesn't look correct to me
when you can get them "on the fly". You're just increasing the memory
footprint of the class and adding more references for the GC to track.

It's not like its so much work to invoke a getter that it needs caching. ;-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133799#4133799

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133799



More information about the jboss-dev-forums mailing list