|
From: Patrick Y. <kc...@ce...> - 2003-03-28 01:30:57
|
RE: [ebxmlms-develop] Setup of ApplicationContextsYes, this is the =
correct way.
To make Hermes start to listen for incoming messages, we have 2 ways:
1. creating a Request object with a non-null AppContext.. just create it =
is sufficient, as registration will be done in the constructor.
2. creating a Request object with a null AppContext, and then sending =
out a message. Implicit registration will be done before sending out the =
message. The AppContext to be registered will be same as the one in the =
message.
Regards, -Patrick
----- Original Message -----=20
From: Mayne, Peter=20
To: 'ebx...@li...'=20
Sent: Friday, March 28, 2003 9:06 AM
Subject: RE: [ebxmlms-develop] Setup of ApplicationContexts
I believe that just creating a new Request is sufficient, but I'm open =
to reeducation.=20
/**=20
* Register our servlet as a Hermes listener for all incoming =
messages.=20
*=20
* If this is not successful, it doesn't necessarily mean things =
are bad. It could be that=20
* Hermes is not running yet. Therefore, if the registration =
doesn't happen, don't panic=20
* unless the specific error indicates otherwise.=20
*=20
* @return boolean true if the registration was successful, false =
otherwise.=20
**/=20
private boolean registerListener(URL mshServerUrl, URL =
mshListenerUrl)=20
{=20
MessageListener listener =3D new =
MessageListenerImpl(mshListenerUrl);=20
Request mshReq =3D null;=20
ApplicationContext appContext =3D new ApplicationContext("*", =
"*", "*", "*");=20
try=20
{=20
logger.info("new Request to " + mshServerUrl + " to listen =
at " + mshListenerUrl);=20
mshReq =3D new Request(appContext, mshServerUrl, listener, =
"HTTP");=20
logger.info("listener registered");=20
}=20
catch(RequestException re)=20
{=20
logger.error("registerListener: Couldn't create new =
Request: " + re);=20
return false;=20
}=20
=20
return true;=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
> -----Original Message-----=20
> From: Jason van Zyl [mailto:ja...@ze...]=20
> Sent: Friday, 28 March 2003 11:56 AM=20
> To: ebx...@li...=20
> Subject: RE: [ebxmlms-develop] Setup of ApplicationContexts=20
>=20
>=20
> On Thu, 2003-03-27 at 17:10, Mayne, Peter wrote:=20
> > In my listener I create a new Request with ApplicationContext("*", =
> > "*", "*", "*"), which presumably listens to everything. Since this =
> > registration is permanent, it only needs to be done once, but I=20
> > presume it doesn't hurt to do it multiple times.=20
>=20
> How are you doing this without sending a message?=20
>=20
> I would like to initialize the pathway between the client =
application=20
> and the server without sending anything and then reuse that pathway. =
>=20
> --=20
> jvz.=20
>=20
> Jason van Zyl=20
> ja...@ze...=20
> http://tambora.zenplex.org=20
>=20
> In short, man creates for himself a new religion of a rational=20
> and technical order to justify his work and to be justified in it.=20
> =20
> -- Jacques Ellul, The Technological Society=20
>=20
>=20
>=20
> -------------------------------------------------------=20
> This SF.net email is sponsored by:=20
> The Definitive IT and Networking Event. Be There!=20
> NetWorld+Interop Las Vegas 2003 -- Register today!=20
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en=20
> _______________________________________________=20
> ebxmlms-develop mailing list=20
> ebx...@li...=20
> https://lists.sourceforge.net/lists/listinfo/ebxmlms-develop=20
>=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.
|