Skip to main content



      Home
Home » Archived » BIRT » Running BIRT scripted data source in non-servlet environment
Running BIRT scripted data source in non-servlet environment [message #258663] Wed, 17 October 2007 20:24 Go to next message
Eclipse UserFriend
Originally posted by: vencat.b.gmail.com

Hi,
I'm trying to use BIRT in a threaded application running in tomcat but not
with-in a servlet. I would like to know how to create IPlatformContext. In
the examples seen thus far (including snippet below), IPlatformContext is
created using PlatformServletContext passing servlet context. In my case
thats not possible.

Thanks

public static synchronized IReportEngine getBirtEngine(ServletContext sc) {

if (birtEngine_ == null) {

EngineConfig config = new EngineConfig();

config.setEngineHome("");

IPlatformContext context = new PlatformServletContext(sc);

config.setPlatformContext(context);


try {

Platform.startup(config);

}

catch (BirtException e) {

logger_.error(e);

}
Re: Running BIRT scripted data source in non-servlet environment [message #258690 is a reply to message #258663] Thu, 18 October 2007 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

You can use the PlatformFileContext, which looks for the BIRT_HOME var.

Jason

venc wrote:
> Hi,
> I'm trying to use BIRT in a threaded application running in tomcat but not
> with-in a servlet. I would like to know how to create IPlatformContext. In
> the examples seen thus far (including snippet below), IPlatformContext is
> created using PlatformServletContext passing servlet context. In my case
> thats not possible.
>
> Thanks
>
> public static synchronized IReportEngine getBirtEngine(ServletContext sc) {
>
> if (birtEngine_ == null) {
>
> EngineConfig config = new EngineConfig();
>
> config.setEngineHome("");
>
> IPlatformContext context = new PlatformServletContext(sc);
>
> config.setPlatformContext(context);
>
>
> try {
>
> Platform.startup(config);
>
> }
>
> catch (BirtException e) {
>
> logger_.error(e);
>
> }
>
>
Re: Running BIRT scripted data source in non-servlet environment [message #259243 is a reply to message #258690] Tue, 23 October 2007 22:48 Go to previous message
Eclipse UserFriend
Originally posted by: vencat.b.gmail.com

Thanks jason

"Jason Weathersby" <jasonweathersby@alltel.net> wrote in message
news:ff7o90$jcu$4@build.eclipse.org...
> You can use the PlatformFileContext, which looks for the BIRT_HOME var.
>
> Jason
>
> venc wrote:
>> Hi,
>> I'm trying to use BIRT in a threaded application running in tomcat but
>> not with-in a servlet. I would like to know how to create
>> IPlatformContext. In the examples seen thus far (including snippet
>> below), IPlatformContext is created using PlatformServletContext passing
>> servlet context. In my case thats not possible.
>>
>> Thanks
>>
>> public static synchronized IReportEngine getBirtEngine(ServletContext sc)
>> {
>>
>> if (birtEngine_ == null) {
>>
>> EngineConfig config = new EngineConfig();
>>
>> config.setEngineHome("");
>>
>> IPlatformContext context = new PlatformServletContext(sc);
>>
>> config.setPlatformContext(context);
>>
>>
>> try {
>>
>> Platform.startup(config);
>>
>> }
>>
>> catch (BirtException e) {
>>
>> logger_.error(e);
>>
>> }
>>
Previous Topic:birt report table
Next Topic:LIstener Error when starting BIRT
Goto Forum:
  


Current Time: Fri Apr 25 01:59:13 EDT 2025

Powered by FUDForum. Page generated in 0.03213 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top