(This was also asked by Wolfgang, and responded to, on the
comp.lang.java.beans newsgroup)

Hi!

This is a very important question. Glad you asked.

Wolfgang Schweighofer wrote:
> 1) classloaders are not alowed within EJB, but the processor uses it
>    (has to use it, as it instantiates classes, known to him only as
> strings in the XSLT code)
> 2) streams are not allowed within EJB, but the processor uses it (only
> for intern handling but not for File IO-operations)
> 3) don't know what else happens in the 600 classes of the processor...

Correct.

> Question:
> 1) Does ANYONE have ANY expierences with using an XSLT processor within
> an EJB Server ?
> 2) What happens, if we don't deploy the processor into the AppServer,
> but have the processor runing aside ?
>    That means: the processor is made available to an EJB via setting the
> classpath, but it executes not within the Appserver.

2 is the proper approach here. Basically you should add Xalan to the
classpath of the application server and call it from within your EJB's.
This will make it possible for Xalan to do things that aren't normally
allowed by EJB's.

There is a big BUT here:
Xalan must be very carefully constructed to allow it to be used this
way. It all comes down to using doPrivileged calls at appropriate times,
as well as using classloaders properly (these issues are well documented
in the list archives, see archives.java.sun.com).
If this is not done, then IMHO it is a bug in Xalan. If libraries such
as Xalan are not adapted to be used in this way, which is likely, then
they are not constructed properly.

>    What does this mean for the transactional context. Can we ever access
> an EJB again from the processor, that runs within the
>    same transaction as that bean, which invoked the processor ?

You mean bean calling processor calling bean? Should be no problem. As
long as the call from the processor to the bean is done in the same
thread as the bean to processor call it will work, since transactions
are associated with threads.

> 3) Does anyone know about an XSLT-EJB to buy (as the EJB/J2EE has the
> idea of a bean market) ?

No, and I don't think it is necessary. Modifying Xalan to work in these
cases should be sufficient.

Makes sense?

/Rickard

--
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to