Buddy Classloading for POJOs Access? [message #200080] |
Thu, 09 November 2006 15:30  |
Eclipse User |
|
|
|
Originally posted by: flori.docufy.de
Hi!
I'm actually trying to use BIRT in a RCP application to create some nice
reports in PDF. I'm using hibernate, so I want to use some POJOs as data
source for my report. I found all these tutorials saying that I have to
put my classes into the WEB-INF/lib directory of the viewer plug-in -
but I'm not using this plug-in! So where to put the classes?
I am not very comfortable with putting an artifact under development
into a folder of my target platform.
As far as I understand, this whole WEB-INF hack is only necessary to
give the scripting engine access to my classes. But why not simply using
buddy classloading for that? Then I would simply have to put something like
Eclipse-RegisterBuddy: org.eclipse.birt.core
into my MANIFEST.MF and everything will be fine - at least at runtime.
Am I totally on the wrong track? Did you ever think about this?
Sincerely,
Florian
|
|
|
|
Re: Buddy Classloading for POJOs Access? [message #200340 is a reply to message #200324] |
Fri, 10 November 2006 14:58  |
Eclipse User |
|
|
|
Originally posted by: flori.docufy.de
Buddy classloading did not help either - I could not find out where to
register the buddy. I tried birt.core, birt.data and birt.report.engine.
So I gave up this idea.
But I found another solution: I set an array with all objects via the
IRunAndRenderTask.addScriptableJavaObject method and used this variable
to get access to my objects (varName is the name of the scriptable java
object):
open:
count = 0;
fetch:
if (count < varName.length) {
row["row1"] = varName[0].getName();
....
count++;
return true;
}
return false;
This works. I don't know if I found a new solution for this problem, but
I thought I better write it down anyways. Maybe that helps anybody.
Best Regards,
Florian
Jason Weathersby schrieb:
> The WEB-INF/lib or the scriptlib directories are intended for web
> deployment. The engine should be able to get at them if they are in your
> classpath.
> I have not attempted buddy loading with this but I would imagine it would
> work. In addition you can set a system propery like
> System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY,"c:/myclasses" );
>
>
>
> Jason
>
> "Florian Thienel" <flori@docufy.de> wrote in message
> news:ej033r$s0m$1@utils.eclipse.org...
>> Hi!
>>
>> I'm actually trying to use BIRT in a RCP application to create some nice
>> reports in PDF. I'm using hibernate, so I want to use some POJOs as data
>> source for my report. I found all these tutorials saying that I have to
>> put my classes into the WEB-INF/lib directory of the viewer plug-in -
>> but I'm not using this plug-in! So where to put the classes?
>>
>> I am not very comfortable with putting an artifact under development
>> into a folder of my target platform.
>>
>> As far as I understand, this whole WEB-INF hack is only necessary to
>> give the scripting engine access to my classes. But why not simply using
>> buddy classloading for that? Then I would simply have to put something
>> like
>>
>> Eclipse-RegisterBuddy: org.eclipse.birt.core
>>
>> into my MANIFEST.MF and everything will be fine - at least at runtime.
>>
>> Am I totally on the wrong track? Did you ever think about this?
>>
>> Sincerely,
>>
>> Florian
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04075 seconds