Setting OSGI properties using System.setProperty is not working [message #242978] |
Fri, 15 June 2007 19:00  |
Eclipse User |
|
|
|
Hi,
I want to integrate Birt in a webapp, for that I am using the servlet
example describes in http://wiki.eclipse.org/index.php/Servlet_Example.
Everything works fine but the OSGI module writes files in the
configuration directory of my webapp.
I know I can change the directory where OSGI writes the files by editing
the config.ini file located in WEB-INF/platform/configuration and set the
following line:
osgi.configuration.area= file:/C:/temp/
osgi.instance.area= file:/C:/temp/
osgi.instance.area.default= file:/C:/temp/
But I would like to set the properties using the System.setProperty
methods.
A lot of article say it is possible and a bug has been created and fixed
on this subject:
http://dev.eclipse.org/mhonarc/lists/birt-dev/msg06530.html
Unfortunately it does not work for me, I tried with BIRT 2.1.1, 2.1.2 and
2.2RC2.
In the WebReport.java servlet, in the init method I have:
public void init() throws ServletException {
System.setProperty("osgi.configuration.area","C:/Temp");
System.setProperty("osgi.instance.area","C:/Temp");
System.setProperty("osgi.instance.area.default","C:/Temp");
BirtEngine.initBirtConfig();
}
But it does not work, no files are created in c:\temp.
Someone knows what is wrong with my code? Or how should I set the
properties?
Thanking you in advance for your help
|
|
|
Re: Setting OSGI properties using System.setProperty is not working [message #242991 is a reply to message #242978] |
Fri, 15 June 2007 23:30  |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Nicolas,
Did you try the setOsgi methods in the EngineConfig?
The bug concerning this is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159445
Jason
Nicolas wrote:
> Hi,
> I want to integrate Birt in a webapp, for that I am using the servlet
> example describes in http://wiki.eclipse.org/index.php/Servlet_Example.
>
> Everything works fine but the OSGI module writes files in the
> configuration directory of my webapp.
>
> I know I can change the directory where OSGI writes the files by editing
> the config.ini file located in WEB-INF/platform/configuration and set
> the following line:
> osgi.configuration.area= file:/C:/temp/
> osgi.instance.area= file:/C:/temp/ osgi.instance.area.default=
> file:/C:/temp/
>
> But I would like to set the properties using the System.setProperty
> methods.
> A lot of article say it is possible and a bug has been created and fixed
> on this subject:
> http://dev.eclipse.org/mhonarc/lists/birt-dev/msg06530.html
>
> Unfortunately it does not work for me, I tried with BIRT 2.1.1, 2.1.2
> and 2.2RC2.
>
> In the WebReport.java servlet, in the init method I have:
>
> public void init() throws ServletException {
> System.setProperty("osgi.configuration.area","C:/Temp");
> System.setProperty("osgi.instance.area","C:/Temp");
> System.setProperty("osgi.instance.area.default","C:/Temp");
> BirtEngine.initBirtConfig();
> }
>
> But it does not work, no files are created in c:\temp.
> Someone knows what is wrong with my code? Or how should I set the
> properties?
>
> Thanking you in advance for your help
>
|
|
|
Powered by
FUDForum. Page generated in 0.05668 seconds