Jeremias Maerki wrote:
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)

There you go giving me heart failure again, Jeremias.

'An enterprise Bean must not use read/write static fields. Using read-only static fields is allowed. Therefore, it is recommended that all static fields in the enterprise bean class be declared *final*.'

Note the "recommended". I have been very good. Everything that is logically WORM, but which cannot be declared static final because of complex initialization requirements, has been removed into singletons (which have their own difficulties with EJBs, I gather) where advantage can be taken of the "final" modifier for delayed initialization.

- Use of thread synchronization primitives (FOP does that mostly because
  of the static variables)

'An enterprise Bean must not use thread synchronization primitives to synchronize execution of multiple instances.'


Note the qualifying clause (phrase?). This presumably allows their use to synchronize the operation of multiple thread within the same instance, e.g., the parser and FO tree builder threads. I certainly hope so.

Peter
--
Peter B. West  [EMAIL PROTECTED]  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


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



Reply via email to