Hi All
I have the jsp container on machine A and the EJB container on machine B.
I have to pass the session from the JSP conatiner to the EJB container.
Can anybody point me in the right direction.
Any help would be much appreciated.
Regards
-
How do i pass session from a JSP page to a Stateful Session Bean (5 messages)
- Posted by: Venkataramanan Tharagam
- Posted on: July 06 2004 01:24 EDT
Threaded Messages (5)
- How do i pass session from a JSP page to a Stateful Session Bean by Amit L on July 06 2004 02:02 EDT
- How do i pass session from a JSP page to a Stateful Session Bean by Kamati Pura on July 06 2004 07:49 EDT
- How do i pass session from a JSP page to a Stateful Session Bean by Arun Nair on July 06 2004 09:21 EDT
-
How do i pass session from a JSP page to a Stateful Session Bean by Senthil Chinnaiyan on July 06 2004 09:29 EDT
- How do i pass session from a JSP page to a Stateful Session Bean by Tomas Inger on July 06 2004 11:40 EDT
- How do i pass session from a JSP page to a Stateful Session Bean by Kamati Pura on July 06 2004 07:49 EDT
-
How do i pass session from a JSP page to a Stateful Session Bean[ Go to top ]
- Posted by: Amit L
- Posted on: July 06 2004 02:02 EDT
- in response to Venkataramanan Tharagam
Hi AllI have the jsp container on machine A and the EJB container on machine B.I have to pass the session from the JSP conatiner to the EJB container.Can anybody point me in the right direction.Any help would be much appreciated.Regards
Hi,
You want to pass session so I think you want to pass some information from JSP to EJB via Session. Instead of using HttpSession I can think of following ways
1. You can use a Stateful session bean to store these required values which you want to pass from JSP to EJB. From JSP put the required values in SFSB and on EJB side retrieve the same which is similar to using session.
2. Other way which I think is more appropriate . If you want to pass some Value object to EJB from JSP then why dont you make that Value Object serializable and pass the EJB method as a part of Method Parameters.
Please let me know how you have solved the problem
Thanks
Amit -
How do i pass session from a JSP page to a Stateful Session Bean[ Go to top ]
- Posted by: Kamati Pura
- Posted on: July 06 2004 07:49 EDT
- in response to Amit L
Yes I agree with amit. The second method he suggested is much more preferable.
And the entire HTTPSession is probably not required by the bean anyways, right?
so then why pass it?
Cheers
Ajay -
How do i pass session from a JSP page to a Stateful Session Bean[ Go to top ]
- Posted by: Arun Nair
- Posted on: July 06 2004 09:21 EDT
- in response to Kamati Pura
Collect the values into a ValueObject and pass to EJB layer, would be a much suitable way of doing.
Also, I think one cannot use 'HTTPSession' interface as an argument to a remote call because it's neither a remote object nor serializable.
-arun -
How do i pass session from a JSP page to a Stateful Session Bean[ Go to top ]
- Posted by: Senthil Chinnaiyan
- Posted on: July 06 2004 09:29 EDT
- in response to Kamati Pura
EJB is a server side component that can be accessed by different kinds of client components. By passing HttpSession to EJB, you are restricting the accessibility to web only. As Amit pointed out, by using ValueObject pattern, you can have a clear separation of client and ejb.
Thanks,
Senthil. -
How do i pass session from a JSP page to a Stateful Session Bean[ Go to top ]
- Posted by: Tomas Inger
- Posted on: July 06 2004 11:40 EDT
- in response to Senthil Chinnaiyan
I just want to say that I agree. Passing the HttpSession as an argument to an EJB seems to be a very good example of an anti-pattern.
/Tomas