Just to record the resolution:
Pointing directly to com.icl.saxon.TransformerFactoryImpl didn't work. That
class was loaded but methods invoked on the instance failed with
ClassNotFound.
We were reluctant to try the system property approach because we are
developing a commercial application and don't want to disrupt other apps a
customer may be running. Websphere, however, allows multiple instances of
the server, so our solution is to require that our application run in a
dedicated server instance where the system property can be set and will
effect only that instance.
I'm relieved that I don't have to give up Saxon. I'd been using Xalan for
the last three years but since switching recently to Saxon have had fewer
problems and faster performance.
Thanks.
Andy Hardacker
-----Original Message-----
From: saxon-help-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
[mailto:saxon-help-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx]On
Behalf Of Michael Kay
Sent: Tuesday, November 18, 2003 12:26 PM
To: saxon-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
Subject: RE: [saxon] Websphere 4
> Yes, I have done that. I put this line of code in the init()
> method of a servlet that is loaded at start-up:
>
> System.setProperty("javax.xml.transform.TransformerFactory",
> "com.icl.saxon.TransformerFactoryImpl");
>
> This seems to cause Websphere to use Saxon for all its XML
> transforming, and it works fine when my web app starts up
> along with Websphere. If Websphere has already used XML
> transforms before my web app starts, though, it leads to some
> confusion. (Presumably this would cause other web apps in the
> same server to use Saxon for their XML transforming as well.)
>
To add some ideas (there may be drawbacks):
If you don't want to run the risk of other apps picking up the system
property, you can always try instantiating the Saxon TransformerFactory
directly:
replace
System.setProperty("javax.xml.transform.TransformerFactory",
"com.icl.saxon.TransformerFactoryImpl");
TransformerFactory f = TransformerFactory.newInstance();
by
TransformerFactory f = new com.icl.saxon.TransformerFactory();
or if you don't want a compile-time reference to the class, you could
instantiate it dynamically using newInstance().
Michael Kay
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
saxon-help mailing list
saxon-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/saxon-help
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
|