You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Anand K Kalyanasundaram <an...@CAVS.MsState.Edu> on 2004/07/08 23:46:29 UTC
Jetspeed user session objects
Hi,
I have a jetspeed applet portlet that talks to a few servlets (in the same application as jetspeed) to get its work done.
I am able to retrieve the turbine user by getting the "turbine.user" object from tomcat session.
My problem is, I want some objects to be stored as a part of the turbine user session.
I tried using using the tomcat session, but I quickly learned that they are not the same.
Please correct me if I am wrong here.
Can I use the turbine user temp storage (org.apache.turbine.om.security.User.getTemp(String) and
org.apache.turbine.om.security.User.setTemp(String, Object) calls) for this ?
I want the objects to expire and be destroyed as soon as the user logs out.
Thanks.
Anand
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Jetspeed user session objects
Posted by Anand K Kalyanasundaram <an...@CAVS.MsState.Edu>.
Hi Brian,
Thanks.
Anand
Brian Lawler wrote:
> Anand-
>
> This should work just fine. I believe that the setTemp() stuff is
> just a HashMap in the user object anyway, so if you are able to obtain
> that object, which is itself stored in the servlet session, you should
> be able to safely use it to store session stuff. By the way, if you
> need to do any explicit destruction of objects on logout/container
> session destruction, you can extend the User object and implement the
>
> public void valueUnbound(HttpSessionBindingEvent hsbe)
> {
> }
>
> method. This method is invoked by the container on the User object
> when the object is unbound from the session that is being destroyed.
> This can be quite helpful if you need to do explicit cleanup on your
> own. Just be sure to call super.valueUnbound(...) to let Turbine have
> its own shot at cleaning up as well.
>
> HTH.
>
> -B
>
> On Jul 8, 2004, at 2:46 PM, Anand K Kalyanasundaram wrote:
>
>> Hi,
>> I have a jetspeed applet portlet that talks to a few servlets (in the
>> same application as jetspeed) to get its work done.
>> I am able to retrieve the turbine user by getting the "turbine.user"
>> object from tomcat session. My problem is, I want some objects to be
>> stored as a part of the turbine user session. I tried using using the
>> tomcat session, but I quickly learned that they are not the same.
>> Please correct me if I am wrong here.
>>
>> Can I use the turbine user temp storage
>> (org.apache.turbine.om.security.User.getTemp(String) and
>> org.apache.turbine.om.security.User.setTemp(String, Object) calls)
>> for this ?
>> I want the objects to expire and be destroyed as soon as the user
>> logs out.
>>
>> Thanks.
>> Anand
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Jetspeed user session objects
Posted by Brian Lawler <br...@tribenetwork.com>.
Anand-
This should work just fine. I believe that the setTemp() stuff is just
a HashMap in the user object anyway, so if you are able to obtain that
object, which is itself stored in the servlet session, you should be
able to safely use it to store session stuff. By the way, if you need
to do any explicit destruction of objects on logout/container session
destruction, you can extend the User object and implement the
public void valueUnbound(HttpSessionBindingEvent hsbe)
{
}
method. This method is invoked by the container on the User object
when the object is unbound from the session that is being destroyed.
This can be quite helpful if you need to do explicit cleanup on your
own. Just be sure to call super.valueUnbound(...) to let Turbine have
its own shot at cleaning up as well.
HTH.
-B
On Jul 8, 2004, at 2:46 PM, Anand K Kalyanasundaram wrote:
> Hi,
> I have a jetspeed applet portlet that talks to a few servlets (in the
> same application as jetspeed) to get its work done.
> I am able to retrieve the turbine user by getting the "turbine.user"
> object from tomcat session. My problem is, I want some objects to be
> stored as a part of the turbine user session. I tried using using the
> tomcat session, but I quickly learned that they are not the same.
> Please correct me if I am wrong here.
>
> Can I use the turbine user temp storage
> (org.apache.turbine.om.security.User.getTemp(String) and
> org.apache.turbine.om.security.User.setTemp(String, Object) calls) for
> this ?
> I want the objects to expire and be destroyed as soon as the user logs
> out.
>
> Thanks.
> Anand
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org