[jboss-dev-forums] [JBoss OSGi Development] - Re: Service integration with MC

alesj do-not-reply at jboss.com
Tue Nov 17 09:04:59 EST 2009


"adrian at jboss.org" wrote : 
  | In MC terms that is getTarget() for get. But we don't currently invoke an ungetTarget() at "uninjection" so that needs doing.
This is tricker than it looks like, as we don't have just plain configuration injection.

Ctor and properties injection have natural undeploy / uninjection.
I could also somehow squeeze in create, start and installs.

But what to do with stop, destroy and uninstalls?

  | try {
  |    uninstallMethod.invoke(target, VMD::get)
  | } finally {
  |    VDM::unget
  | }
  | 
whereas service could still hold onto the ref - which might be an issue if that ref is ServiceFactory,
as ServiceFactory::unget could modify the actual created service.
Leave it to the expense of the user? :-)

Should we also do unget on the callbacks, or a callback doesn't really have proper usage 
if it's not "backed-up" by uncallback (which will actually take care of unget)?


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

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



More information about the jboss-dev-forums mailing list