You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by MPF <ma...@procon.co.at> on 2007/07/09 16:19:11 UTC
How i can destroy a bean without destroying the session
Hi!
Is it possible to destroy a managed bean (scope=session) which will be new
instantiated the next time?
--
View this message in context: http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11502745
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: How i can destroy a bean without destroying the session
Posted by MPF <ma...@procon.co.at>.
Hi!
i fixed it like that:
/**
* remove given bean from SessionScope
* @param name of the bean
*/
public static void destroySessionBean(String bean){
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove(bean);
}
thx for the help
best regards.
Anton Gavazuk wrote:
>
> Hi Markus!
> You can do de-provisioning for fields in the bean or just simply set null
> value for instance of this bean
>
> 2007/7/9, MPF <ma...@procon.co.at>:
>>
>>
>> Hi!
>> Is it possible to destroy a managed bean (scope=session) which will be
>> new
>> instantiated the next time?
>> --
>> View this message in context:
>> http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11502745
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11515561
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: How i can destroy a bean without destroying the session
Posted by MPF <ma...@procon.co.at>.
Hi!
i fixed it like that:
/**
* remove given bean from SessionScope
* @param name of the bean
*/
public static void destroySessionBean(String bean){
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove(bean);
}
Anton Gavazuk wrote:
>
> Hi Markus!
> You can do de-provisioning for fields in the bean or just simply set null
> value for instance of this bean
>
> 2007/7/9, MPF <ma...@procon.co.at>:
>>
>>
>> Hi!
>> Is it possible to destroy a managed bean (scope=session) which will be
>> new
>> instantiated the next time?
>> --
>> View this message in context:
>> http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11502745
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11515557
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: How i can destroy a bean without destroying the session
Posted by Anton Gavazuk <an...@gmail.com>.
Hi Markus!
You can do de-provisioning for fields in the bean or just simply set null
value for instance of this bean
2007/7/9, MPF <ma...@procon.co.at>:
>
>
> Hi!
> Is it possible to destroy a managed bean (scope=session) which will be new
> instantiated the next time?
> --
> View this message in context:
> http://www.nabble.com/How-i-can-destroy-a-bean-without-destroying-the-session-tf4049678.html#a11502745
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>