Re: accessing session variables in java Bean(In business logic Layer)

2005-04-14 Thread Hubert Rabago
Maybe Mallik should use a filter that would clear thread locals after the request has been processed. On 4/14/05, Jeff Beal <[EMAIL PROTECTED]> wrote: > I'm not sure that web containers are required to create a new thread > at the beginning of each request. Weblogic, for example, seems to > keep

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-14 Thread Jeff Beal
I'm not sure that web containers are required to create a new thread at the beginning of each request. Weblogic, for example, seems to keep a pool of available threads, and uses one of these threads to process each request. Using ThreadLocal with this type of app server would mean that whatever y

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-14 Thread Jeff Beal
All of our application state (including the user) is kept in a separate "session" object in the business layer. (We use a stateful session EJB, but you could easily write your own POJO for this.) The web session, then, only has a reference to this session object (and a few other view-specific var

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-14 Thread Lionel
Corey Probst wrote: > Take a look at ThreadLocal, I've never used it but it should do what > you want. > Someone correct me if this is not a good idea or won't work It works fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Corey Probst
I don't know of a way to access the session from your business logic other than passing it in as a parameter (which I would *NOT* recommend). Even if you could access it, you would be tying the business layer to the servlet api, which is what you are trying to avoid by not passing the session dire

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Mallik
tSession for whatever parameter you desire > Is there something specific you want? > Martin- > - Original Message - > From: "Mallik" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, April 13, 2005 8:08 PM > Subject: accessing session variables in java Bean(

Re: accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Martin Gainty
there something specific you want? Martin- - Original Message - From: "Mallik" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 13, 2005 8:08 PM Subject: accessing session variables in java Bean(In business logic Layer) Hi I use plain java beans for model/business layer. I

accessing session variables in java Bean(In business logic Layer)

2005-04-13 Thread Mallik
Hi I use plain java beans for model/business layer. I have a question regarding accessing session variables in java Beans(In model Layer). I can pass session variables from action class but is there any other way I can access session variables directly by extending any class. Because I need "sessi