You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brian Shields <br...@geminga.it.nuigalway.ie> on 2006/01/31 11:31:23 UTC

Handlers in Axis2

Hello,
When using the same handler for inflow and outflow messages, does axis2 
create a seperate object of the handler for the different flow. It uses 
the same object for all inflows, but is there a second object for all 
outflow messages? It is confusing as the two instances of the handler 
(if there are two instances) have the same object hashCode, yet when 
using a java collection object within the handler, the outflow cannot 
see the same collection object as the inflow?? Any suggestions?

-- 
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.

Re: trouble redeploying handlers

Posted by iksrazal <ik...@gmail.com>.
I think I seen this a while back, and since then, what I do is simple but 
effective: stop server, remove all mar's and aar's neccesary, re-start 
server, stop server, reinstall, start server. 

If that works, try writing a test case and filing a jira. Or reply to the list 
- I'm working on axis2 handlers at the moment and I may be able to confirm 
the behavior. (got other probelms at the moment ;-) ) . 

HTH,
iksrazal
http://www.braziloutsource.com/

Em Terça 31 Janeiro 2006 15:08, o Brian Shields escreveu:
> Hello,
> I am having some trouble redeploying a handler .mar file in axis2. The
> engine seems to have an old reference to the classes inside my module
> and any changes i make are not being reflected when i repackage the
> module and redeploy it. I am restarting the web server and it is still
> referencing the older version of the classes!! Any ideas?

-- 

Re: Handlers in Axis2

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi Brian,

Small clarification. OperationContext is not only for request-response
(In-Out). It is per MEP. But for the time being we support InOut and
In only MEPs.

- -- Chinthaka

Brian Shields wrote:

> Thanks Srinath, using the OperationContext I can persist object
> state between the request and the reply. Regards, Brian.
>
> Srinath Perera wrote:
>
>> Hi Brian;
>>
>> Handlers are stateless across multiple invocations. You should
>> store the states in the OperationContext
>> (msgctx.getOperationContext()). Get back if that do not solve
>> your problem.
>>
>> Thanks Srinath
>>
>> On 1/31/06, Brian Shields <br...@geminga.it.nuigalway.ie>
>> wrote:
>>
>>
>>> Hello, When using the same handler for inflow and outflow
>>> messages, does axis2 create a seperate object of the handler
>>> for the different flow. It uses the same object for all
>>> inflows, but is there a second object for all outflow messages?
>>> It is confusing as the two instances of the handler (if there
>>> are two instances) have the same object hashCode, yet when
>>> using a java collection object within the handler, the outflow
>>> cannot see the same collection object as the inflow?? Any
>>> suggestions?
>>>
>>> -- Brian Shields BSc. MSc., PhD Candidate, Department of
>>> Information Technology, National University of Ireland, Galway,
>>> Ireland.
>>>
>>>
>>
>>
>>
>> -- ============================ Srinath Perera:
>> http://www.cs.indiana.edu/~hperera/
>> http://www.bloglines.com/blog/hemapani
>>
>>
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
 
iD8DBQFD33mrjON2uBzUhh8RAqZRAKCVhs22wm+y3Li53GXGhqdOs2R1xwCgqeo0
C3/4iz1DlcUzrSgbZSShfeQ=
=PZnG
-----END PGP SIGNATURE-----


Re: Handlers in Axis2

Posted by Brian Shields <br...@geminga.it.nuigalway.ie>.
Thanks Srinath, using the OperationContext I can persist object state 
between the request and the reply.
Regards,
Brian.

Srinath Perera wrote:

>Hi Brian;
>
>Handlers are stateless across multiple invocations. You should store
>the states in the OperationContext (msgctx.getOperationContext()). Get
>back if that do not solve your problem.
>
>Thanks
>Srinath
>
>On 1/31/06, Brian Shields <br...@geminga.it.nuigalway.ie> wrote:
>  
>
>>Hello,
>>When using the same handler for inflow and outflow messages, does axis2
>>create a seperate object of the handler for the different flow. It uses
>>the same object for all inflows, but is there a second object for all
>>outflow messages? It is confusing as the two instances of the handler
>>(if there are two instances) have the same object hashCode, yet when
>>using a java collection object within the handler, the outflow cannot
>>see the same collection object as the inflow?? Any suggestions?
>>
>>--
>>Brian Shields BSc. MSc.,
>>PhD Candidate,
>>Department of Information Technology,
>>National University of Ireland,
>>Galway,
>>Ireland.
>>
>>    
>>
>
>
>--
>============================
>Srinath Perera:
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>
>
>  
>

-- 
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.

Re: Handlers in Axis2

Posted by Srinath Perera <he...@gmail.com>.
Hi Brian;

Handlers are stateless across multiple invocations. You should store
the states in the OperationContext (msgctx.getOperationContext()). Get
back if that do not solve your problem.

Thanks
Srinath

On 1/31/06, Brian Shields <br...@geminga.it.nuigalway.ie> wrote:
> Hello,
> When using the same handler for inflow and outflow messages, does axis2
> create a seperate object of the handler for the different flow. It uses
> the same object for all inflows, but is there a second object for all
> outflow messages? It is confusing as the two instances of the handler
> (if there are two instances) have the same object hashCode, yet when
> using a java collection object within the handler, the outflow cannot
> see the same collection object as the inflow?? Any suggestions?
>
> --
> Brian Shields BSc. MSc.,
> PhD Candidate,
> Department of Information Technology,
> National University of Ireland,
> Galway,
> Ireland.
>


--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: trouble redeploying handlers

Posted by Brian Shields <br...@geminga.it.nuigalway.ie>.
thanks guys, figured it out....silly mistake on my behalf. I had an old 
classname referenced from the modules.xml file within the .mar file. 
Still unusual behaviour though, surely i should have gotten a 
ClassNotFoundException as the class being referred to was no longer on 
the system!!
Brian.

Deepal Jayasinghe wrote:

> hmmm , that can  not be unless you have some files in commons lib , or 
> the lib that CCL pick up , I have test that and I don't have any 
> problem , any way pls try it again ,
> 1. do the changes
> 2. re-create mar file
> 3. re-deploy that
> 4. re-start the server
>
> if you still have the problem pls create JIRA
>
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
> ----- Original Message ----- From: "Brian Shields" 
> <br...@geminga.it.nuigalway.ie>
> To: <ax...@ws.apache.org>
> Sent: Tuesday, January 31, 2006 11:08 PM
> Subject: trouble redeploying handlers
>
>
>> Hello,
>> I am having some trouble redeploying a handler .mar file in axis2. 
>> The engine seems to have an old reference to the classes inside my 
>> module and any changes i make are not being reflected when i 
>> repackage the module and redeploy it. I am restarting the web server 
>> and it is still referencing the older version of the classes!! Any 
>> ideas?
>>
>> -- 
>> Brian Shields BSc. MSc.,
>> PhD Candidate,
>> Department of Information Technology,
>> National University of Ireland,
>> Galway,
>> Ireland.
>>
>
>
>

-- 
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.

Re: trouble redeploying handlers

Posted by Deepal Jayasinghe <de...@opensource.lk>.
hmmm , that can  not be unless you have some files in commons lib , or the 
lib that CCL pick up , I have test that and I don't have any problem , any 
way pls try it again ,
 1. do the changes
 2. re-create mar file
 3. re-deploy that
 4. re-start the server

if you still have the problem pls create JIRA

Thanks,
 Deepal
................................................................
~Future is Open~

----- Original Message ----- 
From: "Brian Shields" <br...@geminga.it.nuigalway.ie>
To: <ax...@ws.apache.org>
Sent: Tuesday, January 31, 2006 11:08 PM
Subject: trouble redeploying handlers


> Hello,
> I am having some trouble redeploying a handler .mar file in axis2. The 
> engine seems to have an old reference to the classes inside my module and 
> any changes i make are not being reflected when i repackage the module and 
> redeploy it. I am restarting the web server and it is still referencing 
> the older version of the classes!! Any ideas?
>
> -- 
> Brian Shields BSc. MSc.,
> PhD Candidate,
> Department of Information Technology,
> National University of Ireland,
> Galway,
> Ireland.
> 



trouble redeploying handlers

Posted by Brian Shields <br...@geminga.it.nuigalway.ie>.
Hello,
I am having some trouble redeploying a handler .mar file in axis2. The 
engine seems to have an old reference to the classes inside my module 
and any changes i make are not being reflected when i repackage the 
module and redeploy it. I am restarting the web server and it is still 
referencing the older version of the classes!! Any ideas?

-- 
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.