Comments inside the message...
>From: Sven van �t Veer <[EMAIL PROTECTED]>
So, you participate here too, hum?
>Reply-To: Sven van �t Veer <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: XSL Transforming of XML inside EJB Container
>Date: Fri, 13 Jul 2001 13:50:18 -0300
>
>I�m studying the architecture for a J2EE project which heavilly relies
>on XML parsing happening inside the Application Server.
>The basic scenario is as follows:
>A client sends an org.w3c.dom.Document to a stateless session bean. The
>bean then creates a Transformer (xalan) to do the transformation of the
>xml which should:
>- run some javascript code based on some xml elements (using the ibm bsf
>framework),
>- generate a new org.w3c.dom.Document based on some elements (which I
>later use to do a bulkinsert into Oracle using OracleXMLSave)
>- insert, delete or update some data in a table based on some tags (the
>previous step depends on this data)
>
>Although I�m basically familiar with all these steps, I�m not really
>certain on
>a) am I allowed to load the stylesheet inside the EJB container (it�s
>not the ejb loading the file but a helper class)
According to the specification, actually yes, but it�s not advisable though
due to some bugs in some AS (at least I was told so...)
You could register an object in the JNDI tree that loads your stylesheet.
>b) which is the best solution for inserting, deleting or updating data
>from the table.
>There are basically three options:
>1 - using apache.xalan.lib.sql to connect directly to the database from
>the transformer which would require me to open or obtain a (pooled)
>connection from the Application server or directly through jdbc.
>2 - Creating a class which in turn either calls an entity bean to do the
>db work
>3 - Creating a class which obtains a connection (pooled) either from the
>app server or using jdbc directly and execute insert or update sql
>statements.
I would go for option 3. I'd create a DataSource and register it as a
resource in the AS, making it go to the JNDI tree.
>Sven
BTW, u sent this message two times...
>===========================================================================
----------------------------------------------------
Michael Nascimento Santos
Sun Certified Programmer for the Java 2 Platform
Analista/Consultor
Moderador SouJava - www.soujava.org.br
CPM Sistemas - www.cpm.com.br
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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".