Thanks, Doug!

I would not have thought about that before it would have occured.

I'm not entirely sure how to actually implement it, but I'll figure it out. I have also noticed that in Axis2 1.1 there is a method called currentMessageContext in the MessageContext class. The method returns the ThreadLocal and is intended for storage of the current context. It is my assumption that the messagecontext is an interceptor/handler and thus will avoid further context problems. But as I said, I have not had any time to try it out yet.

- Lars


From: "Bell, Douglas" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: [Axis2] How to add properties to thread local - context
Date: Mon, 22 Jan 2007 15:14:40 -0800

Without using some type of interceptor you will run into context problems.

e.g. The same user makes 3 request:

Request 1 processes on thread 1 (ThreadLocal set/available on this request)
Request 2 processes on thread 2 (ThreadLocal unavailable on this request)
Request 3 processes on thread 1 (ThreadLocal available on this request).
...

You can use a filter in the servlet (keeping you away from a AXIS specific implementation) and set the value there or if you could add a handler in the WSDD.

- Doug

-----Original Message-----
From: Lars Ilebrekke [mailto:[EMAIL PROTECTED]
Sent: Monday, January 22, 2007 2:58 PM
To: [email protected]
Subject: [Axis2] How to add properties to thread local - context

Hi, I would like to set properties on the thread local in order to retrieve session properties from within the business logic. However, I have read through several articles etc., but cannot determine how to set the context for retrieval within the business layers of the application. I want to avoid Axis2 specific code in the business logic, naturally. For instance for using this context for auditing etc.

Does anybody have an idea?

Kind regards,
Lars Ilebrekke

_________________________________________________________________
MSN Music http://music.msn.no Finn din favorittmusikk blant nesten 1 million låter


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Trangt om plassen? http://www.hotmail.com MSN Hotmail gir deg 250MB gratis lagringsplass


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to