StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

EJB injection does not work with BasicXDocReportDispatcher #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The datasource is a DB accessed by EJB.

@EJB
Projects projectBean;

would get the handle to the EJB by JEE-Server injection.
With the current implementation of ...ReportDispatcher or ..ReportServlet, the 
JEE server can not inject and the handles are null.

Using a simple Servlet, implementing doPost and doGet, injection works fine. 
The servlet references the IDocument, see the attached UML with the strategy 
pattern.

Original issue reported on code.google.com by juerg.br...@gmail.com on 26 Oct 2011 at 1:14

GoogleCodeExporter commented 8 years ago
Hi,

It's difficult for me to help you.
Could you send me your Java code ...ReportDispatcher or ..ReportServlet?

Regards Angelo

Original comment by angelo.z...@gmail.com on 26 Oct 2011 at 1:34

GoogleCodeExporter commented 8 years ago
Hi Angelo,

I'm sorry, I was not precise enough. It's your code like in 
fr.opensagres.xdocreport.document.web, and all the related Web Dispatcher or 
Web servlet where injection doesn't work. I did not further investigate the 
reasons. I wrote my servlet to search for a principal error and I saw it 
working very well. Hence I'll stick to it.

If you like to have a look at my working code, see the attachment Reports.zip. 
Of course, it's partially implemented, but it already works for the existing 
Document ProjectPreview.odt
as well as for HTML and pdf. Though the latter are not as nice I would like to 
have them:

Regards

Juerg

Original comment by angelo.z...@gmail.com on 27 Oct 2011 at 7:19

GoogleCodeExporter commented 8 years ago
Hi Juerg,

It's really difficult to help you because I have never used @EJB. Is it 
possible to you to investigate the problem please (it should be very cool)? At 
first I will test XDocReport the dispatcher by setting the source of XDocReport 
in your project (perhaps it works with your HttpServlet because it's not a 
JAR?) and I will go step by step to see the problem by removing some code of 
XDocReport dispatcher and test again.

Thank a lot for your help.

Regards Angelo

Original comment by angelo.z...@gmail.com on 27 Oct 2011 at 7:22

GoogleCodeExporter commented 8 years ago

Original comment by angelo.z...@gmail.com on 1 Sep 2012 at 12:06

GoogleCodeExporter commented 8 years ago
cleanup

Original comment by pascal.leclercq on 10 Oct 2014 at 7:37