Hello,

I wish to launch an application using an ApplicationDescriptor and then
be notified once the application has terminated.  At first blush, it
seems the easiest way to do this is to call getInstanceId() on the
ApplicationHandle that was returned by ApplicationHandle.launch().
Since the instance id is also the service.pid of the handle, I can use
it to listen for the handle's unregistration.

For completeness, I also want to account for the (albeit unlikely)
possibility that the application has shut down before I call
getInstanceId().  In this case, the ApplicationHandle service may
already have been unregistered which would make my ApplicationHandle
instance stale.  The spec seems to hint that I may still call
getInstanceId() to retrieve the handle's service.pid after it has been
unregistered, but I don't see it formally stated.  Is this a valid
assumption, or am I going about this the wrong way?

Thanks,
Josh Arnold

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.  Cerner Limited, Registered in 
England no 2519305, Registered Office 37 North Wharf Road, London W2 1AF.

_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to