|
From: Patrick Y. <kc...@ce...> - 2003-05-12 15:47:27
|
Added initialisation codeThanks for the patch. We have added the code =
fragment into the latest source tree.
Regards, -Patrick
----- Original Message -----=20
From: Mayne, Peter=20
To: 'ebx...@li...'=20
Sent: Thursday, May 08, 2003 09:41 AM
Subject: [ebxmlms-develop] Added initialisation code
I've added the following code to my copy of the MessageServiceHandler =
constructor. It allows for a class with a public static =
configure(Property) method to be specified in msh.properties.xml. The =
configure(Property) method of this class is called after the =
MessageServiceHandler constructor has configured various other classes.
(With this in place, I am able to use my local code to install my own =
TrustManager.)=20
Can you please add this (or something similar) to the nightly build.=20
Thanks.=20
public MessageServiceHandler() throws =
MessageServiceHandlerException {=20
super();=20
Property prop =3D null;=20
try {=20
try {=20
prop =3D =
Property.load(Constants.MSH_SERVER_PROPERTY_FILE);=20
:=20
:=20
:=20
}=20
catch (InitializationException e) {=20
throw new MessageServiceHandlerException(e.getMessage());=20
}=20
// Call a specified class to do local configuration.=20
// The MSH/Config/Local property from the properties file is =
the=20
// name of a class with a static configure(Property) method.=20
// (We can't use an interface here because interfaces can't =
have static methods,=20
// so we have to use reflection.)=20
//=20
final String className =3D prop.get("MSH/Config/Local");=20
if(className!=3Dnull)=20
{=20
logger.debug("Calling " + className + =
".configure(Property)");=20
try=20
{=20
Class c =3D Class.forName(className);=20
java.lang.reflect.Method m =3D =
c.getMethod("configure", new Class[]{Property.class});=20
m.invoke(null, new Object[]{prop});=20
}=20
catch(Throwable t)=20
{=20
logger.error("Couldn't call " + className + =
".configure(Property)", t);=20
throw new =
MessageServiceHandlerException(t.getMessage());=20
}=20
}=20
PJDM=20
--=20
Peter Mayne=20
Technology Consultant=20
Spherion Technology Solutions=20
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602=20
T: 61 2 62689727 F: 61 2 62689777=20
The information contained in this email and any attachments to it:
(a) may be confidential and if you are not the intended recipient, any =
interference with,=20
use, disclosure or copying of this material is unauthorised and =
prohibited; and
(b) may contain personal information of the recipient and/or the sender =
as defined=20
under the Privacy Act 1988 (Cth). Consent is hereby given by the =
recipient(s) to=20
collect, hold and use such information and any personal information =
contained in a=20
response to this email, for any reasonable purpose in the ordinary =
course of=20
Spherion's=20
business, including forwarding this email internally or disclosing it to =
a third party. All=20
personal information collected by Spherion will be handled in accordance =
with=20
Spherion's Privacy Policy. If you have received this email in error, =
please notify the=20
sender and delete it.
(c) you agree not to employ or arrange employment for any candidate(s) =
supplied in=20
this email and any attachments without first entering into a contractual =
agreement with=20
Spherion. You further agree not to divulge any information contained in =
this document=20
to any person(s) or entities without the express permission of Spherion.
|