OMG, thank you for this, if you didn't suggest this jsp i haven't
noticed that I'm the most stupid person on the planet, the root cause
of the problem was just not restarting the other appserv on the
cluster. i was actually accessing the old copies.


Thank You very much... it was my mistake.


--- In [email protected], "Dave Wolf" <[EMAIL PROTECTED]> wrote:
>
> My suggestion is this.  Write a very simple JSP page called say
> cleanupsession.jsp.  Inside that do something like this:
> 
> <% @page language="java" %>
> 
> String[]keys = session.getValueNames();
> 
> for(int i=0; i<keys.length; i++)
> {
> session.removeAttribute(keys[i]);
> }
> 
> session.invalidate();
> 
> Now, when you call that JSP it will empty the session object of all
> objects in its Map then destroy the session itself.  Call this JSP
> page from the Flex UI.  That will remove all references to stateful
> classes, then invalidate the session.  
> 
> What you were seeing was effectively a memory leak where the session
> couldnt actually be garbage collected because it held a reference to
> the remote class.  You might also have to add a method to the remote
> class to release any references to objects it might have.  Please keep
> in mind that for the Java GC to do its job, it must create an
> object-map and make sure *every* class in the map has a reference
> count of zero before it can get collected.
> 
> Let me know how that goes.
> 
> -- 
> Dave Wolf
> Cynergy Systems, Inc.
> Macromedia Flex Alliance Partner
> http://www.cynergysystems.com
> 
> Email: [EMAIL PROTECTED]
> Office: 866-CYNERGY
> 
> 
> 
> 
> 
> --- In [email protected], "ping2peng" <[EMAIL PROTECTED]> wrote:
> >
> > It is a little confusing about how i described the problem.
> > 
> > the scenario is a java-bean named Foo.java is a simple bean that
> > consume a Facade EJB-SLSB, this Foo.java is registered on the
> > flex-config as a named="FooSrv", remote-object with stateful-class.
> > 
> > We all basically know that when there are no references on an object
> > it is directly thrown into a trash-bin for GC to collect but when i
> > tried to call unloadMovie() where basically destroys the flex-app
> > together with the reference to the FooSrv-remoteObject, and calling
> > the controller-javabean to invalidate session using
> > flashgateway.getSession,
> > 
> > It do log-me out remove some initialized stuff for session-and-jaas
> > handling but the problem is that the reference of the flex-app to the
> > FooSrv isn't garbage collected,
> > 
> > ------------
> > 
> > this is not a problem when I make the FooSrv flex-config into a
> > stateless-class, it naturally release-references lock but having like
> > 13 instances on a method-invocation giving a lot processing and eating
> > too much traffic on the network isn't good.
> > 
> > I also tried using a local-server-state-session-type bean with a bunch
> > of ThreadLocals for this, and it worked, but there is a larger
> > problem, coz re-coding and redesigning would eat too much time,
> > developing only the cool-flex-presentation over presentation layer.
> > 
> > is there something like 
> > fooSrvInstance = null;
> > to release the reference from the flex-app and unloadMovie() this
> > would kill it?
> > 
> > I'm using one stage where i load and unload flash-movies and flex-app
> > at the same time, the application is quite cool but on the
> > backend-it-hurts.
> >
>





------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/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