I think it is clear that the install must not be successful, it would
void the whole LIFECYCLE action for installBundle it it was.
However, the spec could be more explicit about this. In 6.1.6.15
(installBundle)
you see the following text:
SecurityException – If the caller does not have the appropriate
AdminPer-
mission[installed bundle,LIFECYCLE], and the Java Runtime Environment
supports permissions.
Note that installed_bundle is written in the past tense. I.e. the
framework
must install the bundle and then check AdminPermission. It must then
undo any work
it has done so far.
I'll see if I can clarify this more in the spec.
Kind regards,
Peter Kriens
On 15 mei 2008, at 03:32, Ikuo Yamasaki wrote:
Hi,
I have a question on AdminPermission in R4.
---------------------
[Precondition]
Bundle A has
AdminPermission("(location=https://www.acme.com/a/*)","lifecycle")
but not AdminPermission("(location=https://www.acme.com/b/
*)","lifecycle").
Q. In that situation, if Bundle A tries to call
BundleContext#installBundle(https://www.acme.com/b/bundleB.jar),
what should happen ?
Answer 1: because it doesn't have AdminPermission("(location=https://www.acme.com/b/*)
","lifecycle"),
SecurityException must be thrown (and fail to install the bundle)).
Answer 2: The installation should be succeed because there is no
location before the method is called.
----------------------
Answering my question would be very appreciated.
Best regards,
---------------------
NTT Cyber Solutions Laboratories
Ikuo YAMASAKI
E-mail: [EMAIL PROTECTED]
TEL +81-46-859-8537 FAX +81-46-855-1282
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev