You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anselmo <an...@googlemail.com> on 2009/07/10 12:41:44 UTC

Actions are not Garbage Collected

I started to profile my app with YourKit and JMeter, because of increasing
request times.

Obviously Actions in my app are not garbage collected until a major
collection when the heap is full.

This also happens with the showcase app from struts.

Any idea which objects still reference the Actions or why they are not
garbage collected after the request has finished.

Thanks in advance
-- 
View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24425128.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Actions are not Garbage Collected

Posted by Martin Gainty <mg...@hotmail.com>.
and the answer is?

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Fri, 10 Jul 2009 10:09:30 -0700
> Subject: Re: Actions are not Garbage Collected
> From: musachy@gmail.com
> To: user@struts.apache.org
> 
> Thank you Martin for yet another text wall,random, off topic, and
> uninformative post. I am starting to appreciate the advantages of
> having forums instead of mailing lists...captcha.
> 
> musachy
> 
> On Fri, Jul 10, 2009 at 9:33 AM, Martin Gainty<mg...@hotmail.com> wrote:
> >
> > web.xml configuration for Spring
> > /* The ContextLoaderListener listener should be registered after
> >  Log4jConfigListener
> >  in web.xml, if the latter is used.
> > */
> >    <listener>
> >        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> >    </listener>
> >
> > once thats configured you'll want to use MethodInvokingFactoryBean for FactoryBean which returns a value which is the result of a static or instance
> >  method invocation
> >
> > http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/beans/factory/config/MethodInvokingFactoryBean.html
> >
> > as mentioned singleton="true" assures you will load,instantiate and store a cached bean
> >
> > static factory methods:
> > An example (in an XML based bean factory definition) of a bean definition
> >  which uses this class to call a STATIC factory method:
> > <bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
> >   <property name="staticMethod"><value>com.whatever.MyClassFactory.getInstance</value></property>
> > </bean>
> >
> > <!-- this example will acquire a (target) instance specific version of System defined (version) property -->
> >  <bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
> >   <property name="targetClass"><value>java.lang.System</value></property>
> >   <property name="targetMethod"><value>getProperties</value></property>
> >  </bean>
> >  <bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
> >   <property name="targetObject"><ref local="sysProps"/></property>
> >   <property name="targetMethod"><value>getProperty</value></property>
> >   <property name="arguments">
> >     <list>
> >       <value>java.version</value>
> >     </list>
> >   </property>
> >  </bean>Since your question addresses GarbageCollection it would be good to know the difference
> > between Spring's Beans loader between ApplicationContext (a load class which implements ApplicationContextAware) and BeanFactory (a class which implements BeanFactoryAware)
> > BeanFactory:
> > 1a)Container locates beans definition (usually derivation of *beans.xml)
> > 1b)Container Loads beans into Container
> > 2)is instantiated LATER with getBean() method
> >
> > ApplicationContext:
> > 1a)Container locates beans definition depeding on invoking class
> > -ClassPathXMLApplicationContext-Loads XML from Classpath
> > -FileSystemXMLApplicationContext-Loads context from XML file in filesystem
> > -XMLWebApplicationContext-Loads Context from XML(beans.xml/ApplicationContext.xml) contained with webApplication
> > 1b)Container loads and instantiates all beans into Container
> >
> > so if you see alot of GC activity from jheap or J2EE Server logs you will probably want to consider using BeanFactoryAware implementor class instead of default ApplicationContextAware implementor class
> >
> > hope this helps
> > Martin Gainty
> > ______________________________________________
> > Verzicht und Vertraulichkeitanmerkung
> >
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >
> >
> >
> >
> >
> >> Date: Fri, 10 Jul 2009 11:10:17 -0400
> >> From: dale@newfield.org
> >> To: user@struts.apache.org
> >> Subject: Re: Actions are not Garbage Collected
> >>
> >> Musachy Barroso wrote:
> >> > On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<mu...@gmail.com> wrote:
> >> >> If your actions are singletons (and they shouldn't be!) then they
> >> >> are not likely to be collected.
> >> >
> >> > because a reference to them will be held by spring, or whatever
> >> > container you are using.
> >>
> >> Or maybe clickstream?  http://www.opensymphony.com/clickstream
> >>
> >> A brief look at the source
> >> https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate
> >> that it only saves stuff extracted from the request object, but maybe I
> >> missed where it's also saving a reference to the request (and therefore
> >> the action) itself?
> >>
> >> -Dale
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >
> > _________________________________________________________________
> > Lauren found her dream laptop. Find the PC that’s right for you.
> > http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009

Re: Actions are not Garbage Collected

Posted by Musachy Barroso <mu...@gmail.com>.
Thank you Martin for yet another text wall,random, off topic, and
uninformative post. I am starting to appreciate the advantages of
having forums instead of mailing lists...captcha.

musachy

On Fri, Jul 10, 2009 at 9:33 AM, Martin Gainty<mg...@hotmail.com> wrote:
>
> web.xml configuration for Spring
> /* The ContextLoaderListener listener should be registered after
>  Log4jConfigListener
>  in web.xml, if the latter is used.
> */
>    <listener>
>        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>    </listener>
>
> once thats configured you'll want to use MethodInvokingFactoryBean for FactoryBean which returns a value which is the result of a static or instance
>  method invocation
>
> http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/beans/factory/config/MethodInvokingFactoryBean.html
>
> as mentioned singleton="true" assures you will load,instantiate and store a cached bean
>
> static factory methods:
> An example (in an XML based bean factory definition) of a bean definition
>  which uses this class to call a STATIC factory method:
> <bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
>   <property name="staticMethod"><value>com.whatever.MyClassFactory.getInstance</value></property>
> </bean>
>
> <!-- this example will acquire a (target) instance specific version of System defined (version) property -->
>  <bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
>   <property name="targetClass"><value>java.lang.System</value></property>
>   <property name="targetMethod"><value>getProperties</value></property>
>  </bean>
>  <bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
>   <property name="targetObject"><ref local="sysProps"/></property>
>   <property name="targetMethod"><value>getProperty</value></property>
>   <property name="arguments">
>     <list>
>       <value>java.version</value>
>     </list>
>   </property>
>  </bean>Since your question addresses GarbageCollection it would be good to know the difference
> between Spring's Beans loader between ApplicationContext (a load class which implements ApplicationContextAware) and BeanFactory (a class which implements BeanFactoryAware)
> BeanFactory:
> 1a)Container locates beans definition (usually derivation of *beans.xml)
> 1b)Container Loads beans into Container
> 2)is instantiated LATER with getBean() method
>
> ApplicationContext:
> 1a)Container locates beans definition depeding on invoking class
> -ClassPathXMLApplicationContext-Loads XML from Classpath
> -FileSystemXMLApplicationContext-Loads context from XML file in filesystem
> -XMLWebApplicationContext-Loads Context from XML(beans.xml/ApplicationContext.xml) contained with webApplication
> 1b)Container loads and instantiates all beans into Container
>
> so if you see alot of GC activity from jheap or J2EE Server logs you will probably want to consider using BeanFactoryAware implementor class instead of default ApplicationContextAware implementor class
>
> hope this helps
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>
>
>> Date: Fri, 10 Jul 2009 11:10:17 -0400
>> From: dale@newfield.org
>> To: user@struts.apache.org
>> Subject: Re: Actions are not Garbage Collected
>>
>> Musachy Barroso wrote:
>> > On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<mu...@gmail.com> wrote:
>> >> If your actions are singletons (and they shouldn't be!) then they
>> >> are not likely to be collected.
>> >
>> > because a reference to them will be held by spring, or whatever
>> > container you are using.
>>
>> Or maybe clickstream?  http://www.opensymphony.com/clickstream
>>
>> A brief look at the source
>> https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate
>> that it only saves stuff extracted from the request object, but maybe I
>> missed where it's also saving a reference to the request (and therefore
>> the action) itself?
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> _________________________________________________________________
> Lauren found her dream laptop. Find the PC that’s right for you.
> http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Actions are not Garbage Collected

Posted by Martin Gainty <mg...@hotmail.com>.
web.xml configuration for Spring
/* The ContextLoaderListener listener should be registered after
 Log4jConfigListener
 in web.xml, if the latter is used.
*/
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

once thats configured you'll want to use MethodInvokingFactoryBean for FactoryBean which returns a value which is the result of a static or instance
 method invocation

http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/beans/factory/config/MethodInvokingFactoryBean.html

as mentioned singleton="true" assures you will load,instantiate and store a cached bean

static factory methods:
An example (in an XML based bean factory definition) of a bean definition
 which uses this class to call a STATIC factory method:
<bean id="myObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
   <property name="staticMethod"><value>com.whatever.MyClassFactory.getInstance</value></property>
</bean>

<!-- this example will acquire a (target) instance specific version of System defined (version) property -->
 <bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
   <property name="targetClass"><value>java.lang.System</value></property>
   <property name="targetMethod"><value>getProperties</value></property>
 </bean>
 <bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
   <property name="targetObject"><ref local="sysProps"/></property>
   <property name="targetMethod"><value>getProperty</value></property>
   <property name="arguments">
     <list>
       <value>java.version</value>
     </list>
   </property>
 </bean>Since your question addresses GarbageCollection it would be good to know the difference
between Spring's Beans loader between ApplicationContext (a load class which implements ApplicationContextAware) and BeanFactory (a class which implements BeanFactoryAware)
BeanFactory:
1a)Container locates beans definition (usually derivation of *beans.xml)
1b)Container Loads beans into Container
2)is instantiated LATER with getBean() method

ApplicationContext:
1a)Container locates beans definition depeding on invoking class
-ClassPathXMLApplicationContext-Loads XML from Classpath
-FileSystemXMLApplicationContext-Loads context from XML file in filesystem
-XMLWebApplicationContext-Loads Context from XML(beans.xml/ApplicationContext.xml) contained with webApplication
1b)Container loads and instantiates all beans into Container

so if you see alot of GC activity from jheap or J2EE Server logs you will probably want to consider using BeanFactoryAware implementor class instead of default ApplicationContextAware implementor class

hope this helps
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.





> Date: Fri, 10 Jul 2009 11:10:17 -0400
> From: dale@newfield.org
> To: user@struts.apache.org
> Subject: Re: Actions are not Garbage Collected
> 
> Musachy Barroso wrote:
> > On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<mu...@gmail.com> wrote:
> >> If your actions are singletons (and they shouldn't be!) then they
> >> are not likely to be collected.
> > 
> > because a reference to them will be held by spring, or whatever
> > container you are using.
> 
> Or maybe clickstream?  http://www.opensymphony.com/clickstream
> 
> A brief look at the source 
> https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate 
> that it only saves stuff extracted from the request object, but maybe I 
> missed where it's also saving a reference to the request (and therefore 
> the action) itself?
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290

Re: Actions are not Garbage Collected

Posted by Dale Newfield <da...@newfield.org>.
Musachy Barroso wrote:
> On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<mu...@gmail.com> wrote:
>> If your actions are singletons (and they shouldn't be!) then they
>> are not likely to be collected.
> 
> because a reference to them will be held by spring, or whatever
> container you are using.

Or maybe clickstream?  http://www.opensymphony.com/clickstream

A brief look at the source 
https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate 
that it only saves stuff extracted from the request object, but maybe I 
missed where it's also saving a reference to the request (and therefore 
the action) itself?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Passing runtime exp into tag

Posted by Peter Bliznak <bl...@rogers.com>.
Figured it out, forget it.




________________________________
From: Peter Bliznak <bl...@rogers.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Friday, July 10, 2009 11:23:15 AM
Subject: Passing runtime exp into tag

Hi all,
translating portion of old code which was using S1 and Tiles and 
ran into problem.

There is one tile representing form which is being used on almost all screens.
One doesn't want to write same tile over and over again since only name
of the action differs.

Existing code used this:

// define name of the action to be a passed from parent tile
<tiles:useAttribute name="formAction" />

then it was used like this:

<html:form action="<%= formAction.toString() %>" ......


I've changed this to use S2 tags:

<s:form action="<%= formAction.toString() %>"  .........

and jsp compilers complains:


JSPG0227E: Exception caught while translating /layout/formLayout.jsp:  
/layout/formLayout.jsp(11,1) --> JSPG0124E: Custom tag attribute action 
cannot be runtime expression. value: "[%= formAction.toString() %]"

Any ideas how to solve it?

Thanks,

Peter.

Passing runtime exp into tag

Posted by Peter Bliznak <bl...@rogers.com>.
Hi all,
translating portion of old code which was using S1 and Tiles and 
ran into problem.

There is one tile representing form which is being used on almost all screens.
One doesn't want to write same tile over and over again since only name
of the action differs.

Existing code used this:

// define name of the action to be a passed from parent tile
<tiles:useAttribute name="formAction" />

then it was used like this:

<html:form action="<%= formAction.toString() %>" ......


I've changed this to use S2 tags:

<s:form action="<%= formAction.toString() %>"  .........

and jsp compilers complains:


JSPG0227E: Exception caught while translating /layout/formLayout.jsp:  
/layout/formLayout.jsp(11,1) --> JSPG0124E: Custom tag attribute action 
cannot be runtime expression. value: "[%= formAction.toString() %]"

Any ideas how to solve it?

Thanks,

Peter.

Re: Actions are not Garbage Collected

Posted by Musachy Barroso <mu...@gmail.com>.
On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<mu...@gmail.com> wrote:
> If your actions are singletons (and they shouldn't be!) then they
> are not likely to be collected.

because a reference to them will be held by spring, or whatever
container you are using.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actions are not Garbage Collected

Posted by Musachy Barroso <mu...@gmail.com>.
"Obviously Actions in my app are not garbage collected until a major
 collection when the heap is full."

If they are garbage collected, then it is ok, the GC has a mind of its
own. If your actions are singletons (and they shouldn't be!) then they
are not likely to be collected.

musachy

On Fri, Jul 10, 2009 at 3:41 AM, Anselmo<an...@googlemail.com> wrote:
>
> I started to profile my app with YourKit and JMeter, because of increasing
> request times.
>
> Obviously Actions in my app are not garbage collected until a major
> collection when the heap is full.
>
> This also happens with the showcase app from struts.
>
> Any idea which objects still reference the Actions or why they are not
> garbage collected after the request has finished.
>
> Thanks in advance
> --
> View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24425128.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actions are not Garbage Collected

Posted by mu...@aol.com.
 It is unlikely but if your actions have a finalize() method they won't be collected by minor GCs
Chris


 


 

-----Original Message-----
From: Anselmo <an...@googlemail.com>
To: user@struts.apache.org
Sent: Sat, Jul 11, 2009 2:55 am
Subject: Re: Actions are not Garbage Collected











The only references I have to my action are

localeProvider of com.opensymphony.xwork2.TextProviderSupport

which has references from the action again. Is this maybe running in
circles?
-- 
View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24432059.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




 


Re: Actions are not Garbage Collected

Posted by Dale Newfield <da...@newfield.org>.
Anselmo wrote:
> The only references I have to my action are
> 
> localeProvider of com.opensymphony.xwork2.TextProviderSupport
> 
> which has references from the action again. Is this maybe running in
> circles?

A circular reference could explain why one type of GC sweep would not 
free that, but another more costly one run when only when the JVM needs 
more space (instead of periodically, just because) would.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actions are not Garbage Collected

Posted by Anselmo <an...@googlemail.com>.
The only references I have to my action are

localeProvider of com.opensymphony.xwork2.TextProviderSupport

which has references from the action again. Is this maybe running in
circles?
-- 
View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24432059.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Actions are not Garbage Collected

Posted by Martin Gainty <mg...@hotmail.com>.
yes that's true
how about the delta between implementing BeanFactory vs ApplicationContext?
for Bean instantiation?

i admit this is off-topic for Struts but ontopic for Spring 
and we dont have a m/l yet!

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.





> Date: Fri, 10 Jul 2009 10:32:23 -0700
> Subject: Re: Actions are not Garbage Collected
> From: musachy@gmail.com
> To: user@struts.apache.org
> 
> Using any decent profiler will tell you who is holding the references
> to the actions.
> 
> musachy
> 
> On Fri, Jul 10, 2009 at 10:23 AM, Anselmo<an...@googlemail.com> wrote:
> >
> > Hi guys, thanks for your answers.
> >
> > Atually I'm not using the spring framework. I use hibernate and have a lot
> > of entity beans in the actions.
> >
> > If I call 50 actions i have 50 of them in the memory and every action has
> > e.g. 50 products, so i have 2500 of the same products in my memory. Is der a
> > possibility to somehow cache the instances of the entities?
> >
> > Thx
> > --
> > View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24431582.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Re: Actions are not Garbage Collected

Posted by Musachy Barroso <mu...@gmail.com>.
Using any decent profiler will tell you who is holding the references
to the actions.

musachy

On Fri, Jul 10, 2009 at 10:23 AM, Anselmo<an...@googlemail.com> wrote:
>
> Hi guys, thanks for your answers.
>
> Atually I'm not using the spring framework. I use hibernate and have a lot
> of entity beans in the actions.
>
> If I call 50 actions i have 50 of them in the memory and every action has
> e.g. 50 products, so i have 2500 of the same products in my memory. Is der a
> possibility to somehow cache the instances of the entities?
>
> Thx
> --
> View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24431582.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actions are not Garbage Collected

Posted by Dale Newfield <da...@newfield.org>.
Anselmo wrote:
> If I call 50 actions i have 50 of them in the memory and every action has
> e.g. 50 products, so i have 2500 of the same products in my memory. Is der a
> possibility to somehow cache the instances of the entities?

look into ehcache

If you're not using spring, what's instantiating the actions in the 
first place?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actions are not Garbage Collected

Posted by Anselmo <an...@googlemail.com>.
Hi guys, thanks for your answers.

Atually I'm not using the spring framework. I use hibernate and have a lot
of entity beans in the actions. 

If I call 50 actions i have 50 of them in the memory and every action has
e.g. 50 products, so i have 2500 of the same products in my memory. Is der a
possibility to somehow cache the instances of the entities?

Thx
-- 
View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24431582.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org