Yes, it doesn't do that. You can determine if it is a duplicate by catching 
the exception from installBundle and checking the exception type (see the 
spec). The difficulty is that there is no way at this point to know which 
installed bundle is the duplicate. I think the only option is to try to read 
the Bundle-SymbolicName manifest header out of the bundle that failed, then you 
can use that to find the already installed bundle.

 It's a pain and not very well thought out.

 ->  richard

 If the install method gave back a handle for a Bundle object that was not an 
actually installed bundle, then the lifecycle graph would need an additional 
state. I don't think this is desirable.

 If you need to inspect a bundle without installing it, you can always use the 
java.util.jar.JarFile/JarInputStream API to read the manifest and entries.
 Regards,
 Neil

Yes, catching the exception and reading the manifest for getting information 
about the bundle should be enough to solve this problem.

Thanks,

Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to