Re: One Handler for request and response?

2005-11-18 Thread Ron Reynolds
i would recommend moving those central resources to a singleton and allowing
axis to create instances of your handlers as it needs them.  if these
resources are truely shared (and sharable) then having them in a central
thread-safe singleton also decouples them from the api (axis, struts,
whatever) layer which tends to be a good idea.

> That is not always possible. There is some internal state such as
> resources on databases and so on that you dont want to create each time.
>
> -- Robert
>
> zze-ELSOKHON Tony RD-BIZZ-ISS schrieb:
>
>>Robert,
>>
>>You can declare a handler only once as a child element of
>>  and give it a "name" attribute, just like URLMapper or
>> LocalResponder. The specified name could be used later to reference the
>> handler.
>>
>>Declaring a handler this way doesn't guarantee having only one object
>> created. Besides, handlers should be completely stateless objects and
>> manipulate only the data transmitted via MessageContext. Having one or
>> multiple instances created should not be a design issue.
>>
>>Regards,
>>
>>Tony
>>
>>-Message d'origine-
>>De : news [mailto:[EMAIL PROTECTED] De la part de Robert Simmons Jr.
>>Envoyé : mercredi 16 novembre 2005 19:51
>>À : axis-user@ws.apache.org
>>Objet : One Handler for request and response?
>>
>>Greetings, I currently use a handler to do some stuff to the request and
>>response and I wanted to know if it was possible to have it so that one
>>object would be doing both. I have the configuration pasted below and
>>you will see that I have to create 2 instance of ContentCryptoHandler in
>>my HTTP protocol config and I would rahter have just one. Any way to do
>>that ?
>>
>>TIA
>>
>>
>>
>>http://xml.apache.org/axis/wsdd/";
>>xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>>
>>
>>>value="C:\temp\MobileLDAP\attachments"/>
>>
>>>value="org.apache.axis.attachments.AttachmentsImpl"/>
>>
>>
>>
>>
>>>type="java:org.apache.axis.transport.local.LocalResponder"/>
>>>type="java:org.apache.axis.handlers.http.URLMapper"/>
>>>type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
>>
>>
>>
>>
>>>use="literal">
>>Provides Mobile Access to LDAP.
>>
>>>value="com.jambit.mobileLDAP.WSMobileLDAP"/>
>>
>>>languageSpecificType="java:com.jambit.mobileLDAP.Contact"
>>qname="ns1:Contact" xmlns:ns1="urn:com.jambit.MobileLDAP"/>
>>urn:com.jambit.MobileLDAP
>>
>>
>>
>>
>>>type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
>>>type="java:com.jambit.axis.handlers.ContentCryptoHandler"/>
>>
>>
>>>type="java:com.jambit.axis.handlers.ContentCryptoHandler"/>
>>
>>>value="org.apache.axis.transport.http.QSListHandler"/>
>>>value="org.apache.axis.transport.http.QSWSDLHandler"/>
>>>value="org.apache.axis.transport.http.QSListHandler"/>
>>>value="org.apache.axis.transport.http.QSMethodHandler"/>
>>>value="org.apache.axis.transport.http.QSMethodHandler"/>
>>>value="org.apache.axis.transport.http.QSWSDLHandler"/>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>




Re: One Handler for request and response?

2005-11-17 Thread Robert Simmons Jr.
That is not always possible. There is some internal state such as
resources on databases and so on that you dont want to create each time.

-- Robert

zze-ELSOKHON Tony RD-BIZZ-ISS schrieb:

>Robert,
>
>You can declare a handler only once as a child element of 
> and give it a "name" attribute, just like URLMapper or 
>LocalResponder. The specified name could be used later to reference the 
>handler.
>
>Declaring a handler this way doesn't guarantee having only one object created. 
>Besides, handlers should be completely stateless objects and manipulate only 
>the data transmitted via MessageContext. Having one or multiple instances 
>created should not be a design issue.
>
>Regards,
>
>Tony
>
>-Message d'origine-
>De : news [mailto:[EMAIL PROTECTED] De la part de Robert Simmons Jr.
>Envoyé : mercredi 16 novembre 2005 19:51
>À : axis-user@ws.apache.org
>Objet : One Handler for request and response?
>
>Greetings, I currently use a handler to do some stuff to the request and
>response and I wanted to know if it was possible to have it so that one
>object would be doing both. I have the configuration pasted below and
>you will see that I have to create 2 instance of ContentCryptoHandler in
>my HTTP protocol config and I would rahter have just one. Any way to do
>that ?
>
>TIA
>
>
>
>http://xml.apache.org/axis/wsdd/";
>xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>
>
>value="C:\temp\MobileLDAP\attachments"/>
>
>value="org.apache.axis.attachments.AttachmentsImpl"/>
>
>
>
>
>type="java:org.apache.axis.transport.local.LocalResponder"/>
>type="java:org.apache.axis.handlers.http.URLMapper"/>
>type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
>
>
>
>
>use="literal">
>Provides Mobile Access to LDAP.
>
>value="com.jambit.mobileLDAP.WSMobileLDAP"/>
>
>languageSpecificType="java:com.jambit.mobileLDAP.Contact"
>qname="ns1:Contact" xmlns:ns1="urn:com.jambit.MobileLDAP"/>
>urn:com.jambit.MobileLDAP
>
>
>
>
>type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
>type="java:com.jambit.axis.handlers.ContentCryptoHandler"/>
>
>
>type="java:com.jambit.axis.handlers.ContentCryptoHandler"/>
>
>value="org.apache.axis.transport.http.QSListHandler"/>
>value="org.apache.axis.transport.http.QSWSDLHandler"/>
>value="org.apache.axis.transport.http.QSListHandler"/>
>value="org.apache.axis.transport.http.QSMethodHandler"/>
>value="org.apache.axis.transport.http.QSMethodHandler"/>
>value="org.apache.axis.transport.http.QSWSDLHandler"/>
>
>
>
>
>
>
>
>
>
>
>  
>
begin:vcard
fn:Robert Simmons Jr
n:Simmons Jr;Robert
org:jambit GmbH
adr;quoted-printable:;;R=C3=B6ntgenstrasse 7;Martinsried;;82152;Germany
email;internet:[EMAIL PROTECTED]
title:Senior Software Architect / Consultant
note:Author: "Hardcore Java", O'Reilly and Associates, (2004) http://www.oreilly.com/catalog/hardcorejv/index.html
x-mozilla-html:TRUE
url:http://www.jambit.com
version:2.1
end:vcard



RE: One Handler for request and response?

2005-11-17 Thread zze-ELSOKHON Tony RD-BIZZ-ISS

Robert,

You can declare a handler only once as a child element of  
and give it a "name" attribute, just like URLMapper or LocalResponder. The 
specified name could be used later to reference the handler.

Declaring a handler this way doesn't guarantee having only one object created. 
Besides, handlers should be completely stateless objects and manipulate only 
the data transmitted via MessageContext. Having one or multiple instances 
created should not be a design issue.

Regards,

Tony

-Message d'origine-
De : news [mailto:[EMAIL PROTECTED] De la part de Robert Simmons Jr.
Envoyé : mercredi 16 novembre 2005 19:51
À : axis-user@ws.apache.org
Objet : One Handler for request and response?

Greetings, I currently use a handler to do some stuff to the request and
response and I wanted to know if it was possible to have it so that one
object would be doing both. I have the configuration pasted below and
you will see that I have to create 2 instance of ContentCryptoHandler in
my HTTP protocol config and I would rahter have just one. Any way to do
that ?

TIA



http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

















Provides Mobile Access to LDAP.




urn:com.jambit.MobileLDAP