Thanks Ikuo,
So it is regarded important enough to become a bug report (!). That is goods 
news, I'll take a look at the FrameworkAdmin  API you mention. Currently I am 
running a very simple server on a OSGi (Equinox, also trying Knopflerfish) 
framework. It is required to run as a Windows Service, and it works well enough 
currently. The rationale for this is mainly O&M issues, it needs to managed 
somehow by the IT-staff (they know how to work with Win Services) and it will 
be automatically re-started if the machine reboots. 

I took a peek at the bug report. Just a comemnt; Windows Serives are equivalent 
to e.g. Unix deamons. I.e. the Tanuki Service wrapper also supports running a 
Java prgram as a deamon on a Linux or Unix box. 

//Robert


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Ikuo Yamasaki
Sent: Wed 2007-03-14 14:25
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Launching a framework programatically
 
Hi, Robert,

After I read your post, I tried to realize it by the first integration method 1.
It works !! I can launch equinox as a Windows Service.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=176928

What you need to do are:
1. copy framwork jar and other jars to load in {APPL_HOME}/lib/ folder 
2. set "wrapper.java.classpath.n=D:\jboss-3.0.4\lib\wrapper.jar"
properly.

-----------------
It might be off topic from the original post, though.

My prototype uses FrameworkAdmin API which equinox incubator project is
investigating now. FrameworkAdmin, which Jeff McAffer mentioned in OSGi
BoF and OSGi Palel in EclipseCon 2007 briefly, aims to configure and
launch an OSGi framework in framework independent way.

Unfortunetly, current FrameworkAdmin API only support for launching a
framework in a different process. Launching in a same process (by a Java
program or a bundle running on a framework) would be needed in future, I
believe.

On Fri, 9 Mar 2007 10:36:29 +0100
"Robert Varttinen" <[EMAIL PROTECTED]> wrote:

Robert> Hi All again,
Robert> I promised to post back here on my findings, ultimately runing an OSGi 
framework as a Windows Service;
Robert> 
Robert> Well, I mamanged to run a framework using the Tanuki Software open 
source service wrapper 
(http://wrapper.tanukisoftware.org/doc/english/introduction.html). I am using 
the first integration method, but enver really managed to get it to launch. The 
wrapper did not manage to load the main launching class in the framework 
JAR-file, despite working on the classpath settings in the configuration ofthe 
wrapper. Finally, by copying the framework's JAR-file to the JVM's 
ext-directory it managed to load the class and everything seems to work. Not 
the best solution, I will try figure out how to do it properly. But for the 
time being we can move forward. 
Robert> 
Robert> Anybody who has similar experiences? 
Robert> 
Robert> Thanks,
Robert> 
Robert> //Robert
Robert> 
Robert> 
Robert> -----Original Message-----
Robert> From: Robert Varttinen
Robert> Sent: Fri 2007-03-09 08:50
Robert> To: OSGi Developer Mail List; 'OSGi Developer Mail List'
Robert> Subject: RE: [osgi-dev] Launching a framework programatically
Robert>  
Robert> Thanks Ronald,
Robert> I'll check it out and see how far I get. Any discoveries will be psoted 
back here. 
Robert> 
Robert> In the long run we arre attempting to run a framework as Windows 
service... but so far we have failed miserably to get it launched. So I am 
trying out some basic stuff first. To explore various avenues to get it 
launched somehow, not from a command line. 
Robert> 
Robert> //Robert
Robert> 
Robert> 
Robert> -----Original Message-----
Robert> From: [EMAIL PROTECTED] on behalf of Ronald Spierenburg
Robert> Sent: Thu 2007-03-08 17:38
Robert> To: 'OSGi Developer Mail List'
Robert> Subject: RE: [osgi-dev] Launching a framework programatically
Robert>  
Robert> It is possible to do with a lot of frameworks. For Apache Felix, see
Robert> http://cwiki.apache.org/FELIX/launching-and-embedding-felix.html
Robert> 
Robert> For knopflerfish, you can make a String[] of arguments, just as you 
would use them at the command line. Then use those args like :
Robert> org.knopflerfish.framework.Main.main(startArgs);
Robert> 
Robert> Ronald Spierenburg
Robert> 
Robert> -----Original Message-----
Robert> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert 
Varttinen
Robert> Sent: Thursday, March 08, 2007 4:35 PM
Robert> To: [email protected]
Robert> Subject: [osgi-dev] Launching a framework programatically
Robert> 
Robert> Hi all,
Robert> I am trying to launch a framework programatically, but does not seem to 
manage getting it to work. Launching from a command line is
Robert> no problem, but launching it from within an application seems a bit 
trickier. 
Robert> 
Robert> Tried to launch the Knopflerfish framework, it seems to start, but it 
does not seem to read any properties. Guess I am missing some
Robert> settings to be set prior to the launch. Has anybody doen something 
similar? Could someone please provide a pointer or two? 
Robert> 
Robert> Thanks in advance,
Robert> 
Robert> Robert
Robert> 
Robert> _______________________________________________
Robert> OSGi Developer Mail List
Robert> [email protected]
Robert> http://www2.osgi.org/mailman/listinfo/osgi-dev
Robert> 
Robert> _______________________________________________
Robert> OSGi Developer Mail List
Robert> [email protected]
Robert> http://www2.osgi.org/mailman/listinfo/osgi-dev
Robert> 
Robert> 
Robert> 
Robert> 
Robert> _______________________________________________
Robert> OSGi Developer Mail List
Robert> [email protected]
Robert> http://www2.osgi.org/mailman/listinfo/osgi-dev

=======
Ikuo YAMASAKI


_______________________________________________
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

Reply via email to