Stateful objects <shiver... cringe...>

You can destroy a J2EE session using

session.invalidate();

In say your own servlet or JSP page.  This will destroy the session
and unbind any objects bound to it.

It will also however destroy your J2EE authentication session
effectively logging you out.

You could also iterate over all the objects in the session (also in a
servlet or jsp) and remove a specific object

session.removeAttribute(String name);

Assuming you could identify it by name.

Personaly, I would just avoid designs that require stateful servants.

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email: [EMAIL PROTECTED]
Office: 866-CYNERGY 


--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> If you have a stateful object on the server that means it is stored in
> the server's Session object.  The connection to RemoteObject is made
> over HTTP so there's no real reference to it other than what the Session
> has.  When the session times out the object will go away.  If you want
> to kill the session earlier you'll need to do that in an app-server
> specific manner (I believe Tomcat does have a way to kill the session
> somehow but it's not immediately obvious).  I'm pretty sure there's no
> generic J2EE way to do it.
> 
> You sure you need the RemoteObject to be stateful?
> 
> Matt
>  
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of ping2peng
> Sent: Monday, December 19, 2005 1:14 AM
> To: [email protected]
> Subject: [flexcoders] How can I unload or delete a remoteObject
> reference manually
> 
> Scenario is
>   my flex app used a java bean with a remoteobject id "foo", 
>   if my judgement is correct, calling unloadMovie() will destroy 
>   the flashmovie and its reference.
> 
> 
> 
> 1. how can i release the remoteobject reference manually,
> 
> 2. releasing a reference or destroying on declared stateful-class
> javabean.
> 
> 
> 
> 
> 
>   FLEX 1.5
>   System Spec.
>   jboss4.0.3sp1 EJB3-Clustered
>   with tomcat 5.5 container on 
>   bea-jrockit jdk1.5 under 
>   GNU/linux system kernel 2.6.12-10-686-smp
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to