Thanks for your help

-----Message d'origine-----
De: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Date: lundi 10 février 2003 14:08
À: [EMAIL PROTECTED]
Objet: Re: Antwort: Fop and multithreading.


Frédéric and Reto,

having read the "24.1.2 Programming restrictions" of the EJB 2.0
specification, I'd recommend you guys don't call FOP from an EJB. The
programming restrictions forbid among other things the following:
- Reading or writing of static variables (FOP still does this too often)
- Use of thread synchronization primitives (FOP does that mostly because
  of the static variables)
- Use of AWT functionality
- Use of java.io package to access files (which obviously happens as
  well)

So the singleton may also be a bad idea. I recommend you don't use FOP
within EJBs. Use a Servlet, a WebService or a custom-built server
service instead.

I've done some serious debugging of multithreading issues last November
by writing a test application that uses FOP in a multi-threaded fashion
(PDF only, no AWT). I haven't had the symptoms you describe so I can
only imagine it has to do with the enviroment (EJBs). Of course, it
could be that my test application was suboptimal, so maybe you two can
come up with a test application that triggers your symptoms outside an
EJB server. That would help track the error down. If you can't reproduce
the bug outside the EJB server I recommend you drop the EJB idea.
  
You can find the spec mentioned above here:
http://java.sun.com/products/ejb/docs.html#specs

Good luck!


On 10.02.2003 13:00:56 frederic.kieffer wrote:
> Thanks for your help.
> In addition, I'm in the same kind of situation as you are (multiprocessor
> Unix box, executing FOP in a Message Driven EJB on JBoss).
> I designed a singleton class which is used by this ejb each time a message
> is being consumed.
> I'm going to try to synchronize its methods. Maybe this will help.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to