Setting OSGI properties using System.setProperty is not working [message #242978] |
Fri, 15 June 2007 23:00 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Nicolas Thuillier![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=nthuillier%40kaidara.com) Messages: 17 Registered: July 2009 |
Junior Member |
|
|
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] |
Sat, 16 June 2007 03:30 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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.03956 seconds