Thank you for answering my question, BJ.

I got it.

But, what does "this bundle tries to change its own state" mean in the
statement of the spec ?

BJ> [Section 6.1.4.32 of Core Spec 1.4] 
BJ> 
BJ> IllegalStateException - If this bundle has been uninstalled or this
BJ>                                  bundle tries to change its own state.



On Tue, 12 Aug 2008 07:40:58 -0400
BJ Hargrave <[EMAIL PROTECTED]> wrote:

BJ> A2.
BJ> 
BJ> Also see 
BJ> http://www.osgi.org/blog/2007/07/best-practice-with-depressed-bundles.html
BJ> -- 
BJ> 
BJ> BJ Hargrave
BJ> Senior Technical Staff Member, IBM
BJ> OSGi Fellow and CTO of the OSGi Alliance
BJ> [EMAIL PROTECTED]
BJ> 
BJ> office: +1 386 848 1781
BJ> mobile: +1 386 848 3788
BJ> 
BJ> 
BJ> 
BJ> 
BJ> 
BJ> From:
BJ> Ikuo Yamasaki <[EMAIL PROTECTED]>
BJ> To:
BJ> [EMAIL PROTECTED]
BJ> Date:
BJ> 2008/08/12 07:28 AM
BJ> Subject:
BJ> [osgi-dev] Question on Bundle#update()
BJ> 
BJ> 
BJ> 
BJ> Hi OSGi Experts,
BJ> 
BJ> I have a question on Bundle.update().
BJ> 
BJ> =============
BJ> Assume that bundle (id=10) had created a thread in its
BJ> BundleActivator.start(context) and the bundle's state has been ACTIVE.
BJ> 
BJ> Q. When BundleContext.getBundle(10).update(InputStream of new bundle) is
BJ> called in the thread, what should happen ? (The thread will terminate
BJ> after Bundle.update() returns or throws exception).
BJ> 
BJ> A1. Bundle#update() throws IllegalStateException because of the
BJ> following description of the spec.
BJ> 
BJ> ----
BJ> [Section 6.1.4.32 of Core Spec 1.4] 
BJ> 
BJ> IllegalStateException - If this bundle has been uninstalled or this
BJ>                                  bundle tries to change its own state.
BJ> 
BJ> ----
BJ> 
BJ> A2. Bundle#update() succeeds, if the old bundle is stopped and the new
BJ> bundle is installed and started successfully.
BJ> 
BJ> =============
BJ> 
BJ> Answering the question would be appreciated.
BJ> 
BJ> Best regards,
BJ> 
BJ> ---------------------
BJ> NTT Cyber Solutions Laboratories
BJ> 
BJ>      Ikuo YAMASAKI
BJ>         E-mail: [EMAIL PROTECTED]
BJ> TEL +81-46-859-8537  FAX +81-46-855-1282 
BJ> 
BJ> 
BJ> _______________________________________________
BJ> OSGi Developer Mail List
BJ> [email protected]
BJ> https://mail.osgi.org/mailman/listinfo/osgi-dev
BJ> 


-----------------------
NTT サイバーソリューション研究所 (SL研)
     山崎 育生 (Ikuo YAMASAKI)
email: [EMAIL PROTECTED]

〒239-0847 横須賀市光の丘1-1 NTT横須賀通信研究所 320C
Tel :(046)859-8537  Fax :(046)855-1282


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

Reply via email to