XSL Transform in Session Bean - Design Options?

Discussions

XML & Web services: XSL Transform in Session Bean - Design Options?

  1. XSL Transform in Session Bean - Design Options? (2 messages)

    I'd like to implement an XSL transform service using session beans. Hence an entity bean may assemble an XML document and a session bean may be used to transform this into html or wap etc.

    Ideally I'm following the Xalan implementation from Apache where I have processors and compiled stylesheetroot objects. My design problem is how can I cache the compiled stylesheets?

    My initial thought is to have a stateless session bean which contains an instance of the XSL processor. Now the stylesheetroot could be an entity bean, however stylesheetroots are thread safe, so this seems like I may not be utilising this facility effectively. Hence whats the best mechanism for utilising cached stylesheets in this scenario?

    regards Rob
  2. Defintely keep the transformation process outside the EJB layer unless u have a really good reason to do so. I have designed a solution that uses Xalan to do transformations for XML documents coming in from other parts of the system, via the EJB server. We found it to be more scalable to do the transformations at the "web" layer (or whatever server will finally serve up info to the user). For a big improvement in transformation speed, I would use "compiled" stylsheets in Xalan and set up a basic object pooling mechanism so that the transformers and stylsheets are cached.
  3. I may have a solution[ Go to top ]

    please contact me offline - chuck dot mallott at homecomings dot com

    thanks