On 12/06/07, Xi Jiarong <[EMAIL PROTECTED]> wrote:

Many thanks for you!
But, I don't want to shutdown JVM because JVM would may be used again, and
only want to close one Java application UI, so...
How to resolve this problem?


don't know about Knopflerfish, but the Felix OSGi framework has a wiki page
about embedding:

   http://cwiki.apache.org/FELIX/launching-and-embedding-apache-felix.html

otherwise, have you tried the KF forum at
https://sourceforge.net/forum/forum.php?forum_id=328005

Thanks a lot:)

[image: Inactive hide details for "Jeremy Volkman" <[EMAIL PROTECTED]>]"Jeremy
Volkman" <[EMAIL PROTECTED]>



    *"Jeremy Volkman" <[EMAIL PROTECTED]>*
            Sent by: [EMAIL PROTECTED]

            06/11/2007 11:25 PM Please respond to
            OSGi Developer Mail List <[email protected]>


To

"OSGi Developer Mail List" <[email protected]>
cc


Subject

Re: [osgi-dev] How to shutdown knopflerfish automatically when receiving
an external indication

Hi,

Take a look at
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook%28java.lang.Thread%29>

You can have one of your bundles register a shutdown hook with the JVM
which will be called when the JVM shuts down.  From your shell script,
you can send the JVM a signal such as SIGTERM (e.g., kill -15 <pid> on
Linux) which will instruct the JVM to run through its shutdown
process. Your shutdown hook will execute, which can in turn shutdown
the Knopflerfish framework.

-Jeremy

On 6/11/07, Xi Jiarong <[EMAIL PROTECTED]> wrote:
> Thanks a lot to Niclas, that' s very good suggestion!
> However, how to use this "stop 0" in one *.sh file in Linux OS so as to
run
> this command autimatically when receiveing an external indication?
> Many thanks to you:)
> Any suggestion would be welcom:)
>
>  [EMAIL PROTECTED] wrote: -----
>
> To: OSGi Developer Mail List <[email protected]>
> From: Niclas Hedhman <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> Date: 06/11/2007 05:37PM
> Subject: Re: [osgi-dev] How to shutdown knopflerfish automatically when
> receiving an external indication
>
> On Monday 11 June 2007 14:33, Xi Jiarong wrote:
> > Hello!
> > How to shutdown knopflerfish automatically when receiving an external
> > indication?
> > Any suggestion would be welcom, and many thanks for you!
>
> IIRC, stopping bundle 0 will shutdown all OSGi frameworks.
>
> Cheers
> --
>
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> http://www2.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev


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




--
Cheers, Stuart

<<inline: ecblank.gif>>

<<inline: graycol.gif>>

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

Reply via email to