Hi, John.

"John Meyer" <[EMAIL PROTECTED]> wrote on 2004-06-02 03:54:31 PM:
> Just to be clear, I don't think binary compatibility across different
> versions is all that useful or pragmatic. I was under the impression
> that version compatibility was a requested feature from another user.

Yes, another user suggested that it's at the very least misleading to 
implement the Serializable interface, but not provide version 
compatibility.  I believe that the concern was that different servers in a 
cluster could be running slightly different levels of software, so 
compatibility would be a must.

> My
> use case for needing to serialize templates arises from a large set of
> XML documents that need to be transformed, styled, and annotated with
> other XML documents. The business logic for this takes place in 3
> stateless EJB beans. The XSLT templates are also self-feeding and can be
> generated as a result of another transformation. The EJBs use a caching
> algorithm to keep references the XSLTs because some are expensive to
> piece together and may even originate from an external (unreliable)
> network. The first-hit cost of creating and compiling the templates is
> acceptable as long as future requests are speedy. My concern is that if
> the templates are no longer serializable, I will have to recreate the
> XSLTs every time the bean is activated. I can verify that
> passivation/activation occurs fairly often for stateless beans because
> I've tried tweaking the Borland Enterprise Server settings to optimize
> the ready pool.

In this case, you might be able to capture the stylesheet module or 
modules locally in Java Strings or char arrays without much complexity. 
Then each time the EJB is activated, create the 
TransformerFactory.newTemplates from the Strings or char arrays.  I think 
it might be worth the experiment, even if we keep the Serializable 
interface on the Templates objects, because it will ensure you have 
portability across JAXP implementations.  Not that you'd ever want to use 
any other implementation of JAXP! ;-)

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]


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

Reply via email to