Hi
I face prob.. where i want to get session contents from my
web tier please sugg.. me how i can play with session object
-
how can get session object's of web tier in EJB (5 messages)
- Posted by: prabhu biradar
- Posted on: October 07 2003 05:03 EDT
Threaded Messages (5)
- how can get session object's of web tier in EJB by Paul Strack on October 07 2003 11:44 EDT
- how can get session object's of web tier in EJB by prabhu biradar on October 08 2003 00:24 EDT
-
how can get session object's of web tier in EJB by Race Condition on October 08 2003 12:53 EDT
-
how can get session object's of web tier in EJB by prabhu biradar on October 08 2003 02:59 EDT
- how can get session object's of web tier in EJB by Paul Strack on October 09 2003 06:42 EDT
-
how can get session object's of web tier in EJB by prabhu biradar on October 08 2003 02:59 EDT
-
how can get session object's of web tier in EJB by Race Condition on October 08 2003 12:53 EDT
- how can get session object's of web tier in EJB by prabhu biradar on October 08 2003 00:24 EDT
-
how can get session object's of web tier in EJB[ Go to top ]
- Posted by: Paul Strack
- Posted on: October 07 2003 11:44 EDT
- in response to prabhu biradar
The best way to do this is to pass the objects as method parameters from your Web Tier to your EJB tier.
Object value = session.getAttribute("value");
ejb.ejbMethod(value);
This is probably not the answer you were hoping for, but if you want good seperation of tiers, it is your only option. -
how can get session object's of web tier in EJB[ Go to top ]
- Posted by: prabhu biradar
- Posted on: October 08 2003 00:24 EDT
- in response to Paul Strack
thanks
but do u think I should import web tier session API in EJB ? -
how can get session object's of web tier in EJB[ Go to top ]
- Posted by: Race Condition
- Posted on: October 08 2003 00:53 EDT
- in response to prabhu biradar
thanks
> but do u think I should import web tier session API in EJB ?
No. -
how can get session object's of web tier in EJB[ Go to top ]
- Posted by: prabhu biradar
- Posted on: October 08 2003 02:59 EDT
- in response to Race Condition
iI do't think this is soln.. -
how can get session object's of web tier in EJB[ Go to top ]
- Posted by: Paul Strack
- Posted on: October 09 2003 18:42 EDT
- in response to prabhu biradar
Race Condition is right. Importing the servlet session in your EJB layer will almost certainly fail to work. Pass your data between tiers explicitly as method parameters.
If your really must pass the entire servlet session between your tiers, store all your servlet session data in a Map, and pass this entire map between your tiers. But I am sure if you spend more time thinking about your design, you can come up with something better than that.