Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » possible ways in order BIRT should see Java event handlers
possible ways in order BIRT should see Java event handlers [message #758618] Wed, 23 November 2011 17:08 Go to next message
Csaba Missing name is currently offline Csaba Missing name
Messages: 16
Registered: July 2009
Junior Member
Hello Guys,

We would like to use BIRT reporting in an OSGi/Equinox based application. Report bundles/plugins will come and go at runtime dynamically. Reports will use Java event handlers.
What can I do in order BIRT should see the reports' Java event handlers during report generation?
What is the best way to do this?
Or what possible ways do I have here?

I know about the solution that sets the jar file on the Resources tab.

Is there any other (dynamic/flexible) solution?

Many thanks,
Csaba

Re: possible ways in order BIRT should see Java event handlers [message #759490 is a reply to message #758618] Mon, 28 November 2011 14:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

If you are using the 3.7 runtime they only need to be in the classpath.

Jason

On 11/23/2011 5:08 PM, Csaba wrote:
> Hello Guys,
>
> We would like to use BIRT reporting in an OSGi/Equinox based
> application. Report bundles/plugins will come and go at runtime
> dynamically. Reports will use Java event handlers.
> What can I do in order BIRT should see the reports' Java event handlers
> during report generation?
> What is the best way to do this?
> Or what possible ways do I have here?
>
> I know about the solution that sets the jar file on the Resources tab.
>
> Is there any other (dynamic/flexible) solution?
>
> Many thanks,
> Csaba
>
>
Re: possible ways in order BIRT should see Java event handlers [message #759511 is a reply to message #759490] Mon, 28 November 2011 15:44 Go to previous messageGo to next message
Csaba Missing name is currently offline Csaba Missing name
Messages: 16
Registered: July 2009
Junior Member
Hello Jason,

ok, but the Java event handlers of reports would be contained by bundles that may come and go at runtime in our OSGi application (one bundle per report).

So the names of those JARs (the bundles themselves actually) wouldn't be known in advance, so how can I put such JARs onto BIRT's classpath?

To put it in another way, I need to extend BIRT's classpath dynamically or at runtime.

Many thanks, Csaba.
Re: possible ways in order BIRT should see Java event handlers [message #759697 is a reply to message #759511] Tue, 29 November 2011 11:37 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

This could be a bit tricky. If you are using the 3.7 pojo runtime and
add an event handler to the cp it will be there for the life of the
runtime. If you decide to use the report engine plugins from your
plugin you will need to figure a way of to add the event handler jars to
your plugins cp dynamically. For some tips on this you may want to look
at the 2.6.2 source specifically the ExecutionContext.java class in the
org.eclipse.birt.report.engine.executor package. it has a method called
getApplicationClassLoader that is used to dynamically get at a class
that is added later. The only issue with this approach is that once
added it will be there for the life of the runtime.

Jason

On 11/28/2011 3:44 PM, Csaba wrote:
> Hello Jason,
>
> ok, but the Java event handlers of reports would be contained by bundles
> that may come and go at runtime in our OSGi application (one bundle per
> report).
>
> So the names of those JARs (the bundles themselves actually) wouldn't be
> known in advance, so how can I put such JARs onto BIRT's classpath?
>
> To put it in another way, I need to extend BIRT's classpath dynamically
> or at runtime.
>
> Many thanks, Csaba.
Previous Topic:Making of autocomplete anket
Next Topic:Mismatch dataset count
Goto Forum:
  


Current Time: Fri Aug 01 05:56:21 EDT 2014

Powered by FUDForum. Page generated in 0.02252 seconds