A2.

Also see 
http://www.osgi.org/blog/2007/07/best-practice-with-depressed-bundles.html
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788





From:
Ikuo Yamasaki <[EMAIL PROTECTED]>
To:
[EMAIL PROTECTED]
Date:
2008/08/12 07:28 AM
Subject:
[osgi-dev] Question on Bundle#update()



Hi OSGi Experts,

I have a question on Bundle.update().

=============
Assume that bundle (id=10) had created a thread in its
BundleActivator.start(context) and the bundle's state has been ACTIVE.

Q. When BundleContext.getBundle(10).update(InputStream of new bundle) is
called in the thread, what should happen ? (The thread will terminate
after Bundle.update() returns or throws exception).

A1. Bundle#update() throws IllegalStateException because of the
following description of the spec.

----
[Section 6.1.4.32 of Core Spec 1.4] 

IllegalStateException - If this bundle has been uninstalled or this
                                 bundle tries to change its own state.

----

A2. Bundle#update() succeeds, if the old bundle is stopped and the new
bundle is installed and started successfully.

=============

Answering the question would be 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
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

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

Reply via email to