Skip to main content



      Home
Home » Archived » BIRT » Using Spring ApplicationContext from my scripted datasource
Using Spring ApplicationContext from my scripted datasource [message #263673] Fri, 21 December 2007 05:31 Go to next message
Eclipse UserFriend
Originally posted by: erikvaningen.gmail.com

Hi all,

We use the Birt Viewer ((J2EE App/Plugin). In our reports we use
scripted datasets. From the scripted datasets we would like to acces the
Spring application context in order to retrieve the data from the Spring
beans.

What would be a good way to do this?

Kind Regards,
Erik
Re: Using Spring ApplicationContext from my scripted datasource [message #263698 is a reply to message #263673] Sat, 22 December 2007 17:59 Go to previous messageGo to next message
Eclipse UserFriend
Add the Spring libraries and configuration files to the viewer's
classpath (WEB-INF/lib) and use Spring as usually.

Snjeza

Erik van Ingen wrote:
> Hi all,
>
> We use the Birt Viewer ((J2EE App/Plugin). In our reports we use
> scripted datasets. From the scripted datasets we would like to acces the
> Spring application context in order to retrieve the data from the Spring
> beans.
>
> What would be a good way to do this?
>
> Kind Regards,
> Erik
Re: Using Spring ApplicationContext from my scripted datasource [message #263705 is a reply to message #263698] Sun, 23 December 2007 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erikvaningen.gmail.com

How do I reach the spring application context from a scripted datasource?


Snjezana Peco wrote:
> Add the Spring libraries and configuration files to the viewer's
> classpath (WEB-INF/lib) and use Spring as usually.
>
> Snjeza
>
> Erik van Ingen wrote:
>> Hi all,
>>
>> We use the Birt Viewer ((J2EE App/Plugin). In our reports we use
>> scripted datasets. From the scripted datasets we would like to acces
>> the Spring application context in order to retrieve the data from the
>> Spring beans.
>>
>> What would be a good way to do this?
>>
>> Kind Regards,
>> Erik
Re: Using Spring ApplicationContext from my scripted datasource [message #263708 is a reply to message #263705] Sun, 23 December 2007 11:59 Go to previous message
Eclipse UserFriend
A scripted datasource is an ordinary Java class. You can call the spring
application context in the following way:

ApplicationContext context =
ClassPathXmlApplicationContext("/applicationContext.xml");

or in any other way you prefer.

The most important thing is to set the classpath correctly.

Snjeza

Erik van Ingen wrote:
> How do I reach the spring application context from a scripted datasource?
>
>
> Snjezana Peco wrote:
>> Add the Spring libraries and configuration files to the viewer's
>> classpath (WEB-INF/lib) and use Spring as usually.
>>
>> Snjeza
>>
>> Erik van Ingen wrote:
>>> Hi all,
>>>
>>> We use the Birt Viewer ((J2EE App/Plugin). In our reports we use
>>> scripted datasets. From the scripted datasets we would like to acces
>>> the Spring application context in order to retrieve the data from the
>>> Spring beans.
>>>
>>> What would be a good way to do this?
>>>
>>> Kind Regards,
>>> Erik
Previous Topic:Plug-in Development Target Definition for Testing BIRT Extensions
Next Topic:Dependency on Xerces 2.8 and Apache.xml.resolver 1.1: needed?
Goto Forum:
  


Current Time: Sat May 10 10:11:55 EDT 2025

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

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

Back to the top