Ak uz mas pre dany aplikacny server (JVM-ko) nastavene premenne pre
SAAJ, tak tam moze byt problem.
SAAJ ma tri Factory, od ktorych zavisi, ktoru implementaciu pouzije:
SOAPFactory, MessageFactory, SAAJMetaFactory. Vsetky maju vsak rovnaku
postupnost pre ziskanie nastavenia (vid. koniec mailu)
Problem je tu ten, ze najprv idu po system property. Cize ak ich mas
nastavene na aplikacnom serveri, tak cely server pouziva specifikovanu
implementaciu.
Mozne riesenia:
1) zmena nastavenia pre server .... ovplyvni vsetky aplikacie na
uvedenom serveri
2) zrusenie nastavenia pre server a nastavenie kazdej aplikacii potrebnu
implemntaciu
Dynamicky v kode by som nenastavoval uvedene property, lebo tym mozes
ovplyvnit ine aplikacie pocas behu.
Najlepsie je pozriet si dokumentaciu pre SAAJ API.
Stano
PS:
Creates a new |SOAPFactory| object that is an instance of the default
implementation (SOAP 1.1), This method uses the following ordered lookup
procedure to determine the SOAPFactory implementation class to load:
* Use the javax.xml.soap.SOAPFactory system property.
* Use the properties file "lib/jaxm.properties" in the JRE
directory. This configuration file is in standard
java.util.Properties format and contains the fully qualified name
of the implementation class with the key being the system property
defined above.
* Use the Services API (as detailed in the JAR specification), if
available, to determine the classname. The Services API will look
for a classname in the file
META-INF/services/javax.xml.soap.SOAPFactory in jars available to
the runtime.
* Use the SAAJMetaFactory instance to locate the SOAPFactory
implementation class.
Date: Fri, 28 Mar 2008 11:28:07 +0100
From: " Lukáš Zapletal " <[EMAIL PROTECTED]>
Subject: Jak nastavit systemovou property v J2EE aplikaci
To: Java <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
Zdravim
potrebujeme v nasi J2EE aplikaci nastavit systemovou promennou, aby se
nepouzivala implementace SAAJ knihovny JBossi, ale Sunovska. Jak to
provest na aplikacni (ne globalni) urovni?
Diky