Kirk Wylie M7 Corporation
Andrew Hill wrote:
(Im not actually an EJB expert but heres what I know. Hopefully if I get it wrong someone will correct me quickly!)
It would need to be passed back via the methods return value.
When you call the EJB method the parameters are serialized over to the ejb -
so the ejb code will be working with a different instance (if the EJB is
local to the same JVM as its caller it may be a different matter but one
shouldnt just assume one is making a local call).
Afaik the EJB container will not serialize back any changes made to the passed objects when the call completes - unless of course those objects are part of the return value. The return value object will of course be serialized back.
-----Original Message----- From: Greg Dunn [mailto:[EMAIL PROTECTED] Sent: Wednesday, 29 October 2003 00:58 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: how to access HttpSession in EJB code?
I was having difficulty with something like the reverse of this. If you
pass the object to your EJB (or in my case a task scheduler), which then
updates it, is there any way to pass it back to store the updated version in
context?
Greg
-----Original Message----- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Monday, October 27, 2003 3:29 AM To: Struts Users Mailing List Subject: RE: how to access HttpSession in EJB code?
Hi Viral, You will need to get the required object from the session up in the p-tier and pass it to your ejb in a method parameter when you call the EJB (or facade to it). (The EJB layer doesnt know about servlets and such like (indeed its client might well not be a servlet app)). -Andrew
-----Original Message----- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Monday, 27 October 2003 17:21 To: Struts Users Mailing List Subject: how to access HttpSession in EJB code?
Is there any way, I can access the object from session in the EJB bean method?
I am keeping the profile object in HttpSession, once the user gets successfully logged-in. Now I want to access few values from this profile object which is kept inside session.
The application flow is as below :
Struts Action --> Business Delegate --> Session Façade...
Thanks, Viral
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]