You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/06/06 21:19:18 UTC

Memory Leak

Hello, I've created a scheduler service and noticed a memory leak. I'm using
the exact code below to perform the test. I read an article related to class
reloading causing memory leaks,
http://tapestry.apache.org/class-reloading.html However, I don't really
understand what is being implied. I'm wondering if I'm doing something wrong
to cause this issue. After running the app from 14:56:23.026 through
15:16:30.222 with one second memory printouts I've noticed the following
loss. 

Available memory JVM (bytes) 8826784 14:56:23.026 
Available memory JVM (bytes) 6906536 15:16:30.222

//appmodule
    public static void bind(ServiceBinder binder) {
        binder.bind(SchedulerService.class, SchedulerServiceImpl.class);
    }

    @Startup
    public static void initApplication(SchedulerService scheduler) {
        scheduler.init();
    }


    public static AutocompleteCacheService<ApplicationUser>
buildUserAutocompleteCache() {
        return new AutocompleteCacheServiceImpl<ApplicationUser>() {
        };
    }

    public static AutocompleteCacheService<IfasvVendor>
buildVendorAutocompleteCache() {
        return new AutocompleteCacheServiceImpl<IfasvVendor>() {
        };
    }

    public static AutocompleteCacheService<IfasvRequisitionCode>
buildRequisitionAutocompleteCache() {
        return new AutocompleteCacheServiceImpl<IfasvRequisitionCode>() {
        };
    }

    public static AutocompleteCacheService<Evaluator>
buildEvaluatorAutocompleteCache() {
        return new AutocompleteCacheServiceImpl<Evaluator>() {
        };
    }

//Impl
public class SchedulerServiceImpl implements SchedulerService {
    
    @Inject
    private RemoteUserSync remoteUserSync;
    
    @Inject
    private Session session;
    
    @Inject
    private PeriodicExecutor executor;
    
    @InjectService("userAutocompleteCache") 
    private AutocompleteCacheService<ApplicationUser> userAutocompleteCache;
    
    @InjectService("vendorAutocompleteCache") 
    private AutocompleteCacheService<IfasvVendor> vendorAutocompleteCache;
    
    @InjectService("requisitionAutocompleteCache") 
    private AutocompleteCacheService<IfasvRequisitionCode>
requistionAutocompleteCache;
    
    @InjectService("evaluatorAutocompleteCache") 
    private AutocompleteCacheService<Evaluator> evaluatorAutocompleteCache;
    
    public SchedulerServiceImpl() {
    }
    
    public void init() {
        this.autocompleteCacheUpdate();
    }

    private void autocompleteCacheUpdate() {
        this.executor.addJob(ScheduleUtils.secondlySchedule(1),
            "Autocomplete Cache Updates",
            new Runnable() {                
                public void run() {
                    memoryUsage();
                   
System.out.println("*******************Completed**********************");
                }                
            });
    }

    public void memoryUsage() {
    /* Total amount of free memory available to the JVM */
    System.out.println("Available memory JVM (bytes): " + 
        Runtime.getRuntime().freeMemory());
        
    }

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Memory Leak

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 06 Jun 2012 19:37:41 -0300, George Christman  
<gc...@cardaddy.com> wrote:

> Hi Thiago, I'm not saying T-IoC is the issue, I don't know enough about
> T-IoC to know whether or not I'm using it correctly. I know I have a  
> memory issue, three mornings in a row the server has been brought down  
> with an out of memory exception, so I first wanted to be sure I was  
> using T-IoC
> correctly.

Your Tapestry-IoC code looks fine. I'd check the cache implementation  
itself and whether there are some points in your code that allocate too  
many objects and still have references pointing to them (so they cannot be  
garbage collected).

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Memory Leak

Posted by George Christman <gc...@cardaddy.com>.
Hi Thiago, I'm not saying T-IoC is the issue, I don't know enough about
T-IoC to know whether or not I'm using it correctly. I know I have a memory
issue, three mornings in a row the server has been brought down with an out
of memory exception, so I first wanted to be sure I was using T-IoC
correctly.

On Wed, Jun 6, 2012 at 6:23 PM, Thiago H de Paula Figueiredo [via Tapestry]
<ml...@n5.nabble.com> wrote:

> On Wed, 06 Jun 2012 18:40:05 -0300, Muhammad Gelbana <[hidden email]<http://user/SendEmail.jtp?type=node&node=5713677&i=0>>
>
> wrote:
>
> > May be most of your services are singletons while this is more than
> > needed? Like some services actually deserve to be per-thread ? Or per
> > session ?
>
> I'd check your code memory usage without Tapestry-IoC and then with T-IoC
>
> before saying there's a memory leak in T-IoC. In addition, knowing how
> Java handles memory is very important, specially when doing benchmarks
> like that.
>
> --
> Thiago H. de Paula Figueiredo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713677&i=1>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713677&i=2>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713677.html
>  To unsubscribe from Memory Leak, click here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713668&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTcxMzY2OHwxNjMyOTYxMjA3>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713678.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Memory Leak

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Wed, 06 Jun 2012 18:40:05 -0300, Muhammad Gelbana <m....@gmail.com>  
wrote:

> May be most of your services are singletons while this is more than  
> needed? Like some services actually deserve to be per-thread ? Or per  
> session ?

I'd check your code memory usage without Tapestry-IoC and then with T-IoC  
before saying there's a memory leak in T-IoC. In addition, knowing how  
Java handles memory is very important, specially when doing benchmarks  
like that.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Memory Leak

Posted by Muhammad Gelbana <m....@gmail.com>.
May be most of your services are singletons while this is more than needed
? Like some services actually deserve to be per-thread ? Or per session ?

I'm not even sure if that may be it, just saying.

On Wed, Jun 6, 2012 at 9:34 PM, George Christman <gc...@cardaddy.com>wrote:

> On Wed, Jun 6, 2012 at 3:24 PM, Howard Lewis Ship [via Tapestry] <
> ml-node+s1045711n5713671h38@n5.nabble.com> wrote:
>
> > Tapestry has been noted to be effectively free of memory leaks.
> >
>
> Hi Howard, I'm pretty new to services, so I'm just not sure if I'm using
> them correctly. I've had the system go down three nights due to an out of
> memory error.
>
>
> > What release of Tapestry are you using?
> >
>
> v5.3.3
>
> >
> > You seem to have a caching service here .. do you ever clear your
> > cache?  Could the contents of your cache account for the memory usage?
> >
>
> Nothing in the cache, I've disabled all caching and just let the scheduler
> run outputting memory usage.
>
>
> >
> > Are you checking memory usage after running at least one full GC?  If
> > you aren't running out of memory, Java is happy to let it clutter up
> > the place.
> >
>
> Perhaps I don't completely understand how GC works. I'll read up on this
> some more.
>
> >
> > You can use VisualVM to get an idea of what objects are in memory,
> > that might help identify what, if anything, is leaking.
> >
>
> I'll look into that as well. Thanks Howard.
>
> >
> > On Wed, Jun 6, 2012 at 12:19 PM, George Christman
> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5713671&i=0>>
> > wrote:
> >
> > > Hello, I've created a scheduler service and noticed a memory leak. I'm
> > using
> > > the exact code below to perform the test. I read an article related to
> > class
> > > reloading causing memory leaks,
> > > http://tapestry.apache.org/class-reloading.html However, I don't
> really
> > > understand what is being implied. I'm wondering if I'm doing something
> > wrong
> > > to cause this issue. After running the app from 14:56:23.026 through
> > > 15:16:30.222 with one second memory printouts I've noticed the
> following
> > > loss.
> > >
> > > Available memory JVM (bytes) 8826784 14:56:23.026
> > > Available memory JVM (bytes) 6906536 15:16:30.222
> > >
> > > //appmodule
> > >    public static void bind(ServiceBinder binder) {
> > >        binder.bind(SchedulerService.class, SchedulerServiceImpl.class);
> > >    }
> > >
> > >    @Startup
> > >    public static void initApplication(SchedulerService scheduler) {
> > >        scheduler.init();
> > >    }
> > >
> > >
> > >    public static AutocompleteCacheService<ApplicationUser>
> > > buildUserAutocompleteCache() {
> > >        return new AutocompleteCacheServiceImpl<ApplicationUser>() {
> > >        };
> > >    }
> > >
> > >    public static AutocompleteCacheService<IfasvVendor>
> > > buildVendorAutocompleteCache() {
> > >        return new AutocompleteCacheServiceImpl<IfasvVendor>() {
> > >        };
> > >    }
> > >
> > >    public static AutocompleteCacheService<IfasvRequisitionCode>
> > > buildRequisitionAutocompleteCache() {
> > >        return new AutocompleteCacheServiceImpl<IfasvRequisitionCode>()
> {
> > >        };
> > >    }
> > >
> > >    public static AutocompleteCacheService<Evaluator>
> > > buildEvaluatorAutocompleteCache() {
> > >        return new AutocompleteCacheServiceImpl<Evaluator>() {
> > >        };
> > >    }
> > >
> > > //Impl
> > > public class SchedulerServiceImpl implements SchedulerService {
> > >
> > >    @Inject
> > >    private RemoteUserSync remoteUserSync;
> > >
> > >    @Inject
> > >    private Session session;
> > >
> > >    @Inject
> > >    private PeriodicExecutor executor;
> > >
> > >    @InjectService("userAutocompleteCache")
> > >    private AutocompleteCacheService<ApplicationUser>
> > userAutocompleteCache;
> > >
> > >    @InjectService("vendorAutocompleteCache")
> > >    private AutocompleteCacheService<IfasvVendor>
> > vendorAutocompleteCache;
> > >
> > >    @InjectService("requisitionAutocompleteCache")
> > >    private AutocompleteCacheService<IfasvRequisitionCode>
> > > requistionAutocompleteCache;
> > >
> > >    @InjectService("evaluatorAutocompleteCache")
> > >    private AutocompleteCacheService<Evaluator>
> > evaluatorAutocompleteCache;
> > >
> > >    public SchedulerServiceImpl() {
> > >    }
> > >
> > >    public void init() {
> > >        this.autocompleteCacheUpdate();
> > >    }
> > >
> > >    private void autocompleteCacheUpdate() {
> > >        this.executor.addJob(ScheduleUtils.secondlySchedule(1),
> > >            "Autocomplete Cache Updates",
> > >            new Runnable() {
> > >                public void run() {
> > >                    memoryUsage();
> > >
> > >
> > System.out.println("*******************Completed**********************");
> > >                }
> > >            });
> > >    }
> > >
> > >    public void memoryUsage() {
> > >    /* Total amount of free memory available to the JVM */
> > >    System.out.println("Available memory JVM (bytes): " +
> > >        Runtime.getRuntime().freeMemory());
> > >
> > >    }
> > >
> > > --
> > > View this message in context:
> > http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668.html
> > > Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5713671&i=1>
> > > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5713671&i=2>
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5713671&i=3>
> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5713671&i=4>
> >
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> > http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713671.html
> >  To unsubscribe from Memory Leak, click here<
> http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713668&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTcxMzY2OHwxNjMyOTYxMjA3
> >
> > .
> > NAML<
> http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713673.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>



-- 
*Regards,*
*Muhammad Gelbana
Java Developer*

Re: Memory Leak

Posted by George Christman <gc...@cardaddy.com>.
On Wed, Jun 6, 2012 at 3:24 PM, Howard Lewis Ship [via Tapestry] <
ml-node+s1045711n5713671h38@n5.nabble.com> wrote:

> Tapestry has been noted to be effectively free of memory leaks.
>

Hi Howard, I'm pretty new to services, so I'm just not sure if I'm using
them correctly. I've had the system go down three nights due to an out of
memory error.


> What release of Tapestry are you using?
>

v5.3.3

>
> You seem to have a caching service here .. do you ever clear your
> cache?  Could the contents of your cache account for the memory usage?
>

Nothing in the cache, I've disabled all caching and just let the scheduler
run outputting memory usage.


>
> Are you checking memory usage after running at least one full GC?  If
> you aren't running out of memory, Java is happy to let it clutter up
> the place.
>

Perhaps I don't completely understand how GC works. I'll read up on this
some more.

>
> You can use VisualVM to get an idea of what objects are in memory,
> that might help identify what, if anything, is leaking.
>

I'll look into that as well. Thanks Howard.

>
> On Wed, Jun 6, 2012 at 12:19 PM, George Christman
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5713671&i=0>>
> wrote:
>
> > Hello, I've created a scheduler service and noticed a memory leak. I'm
> using
> > the exact code below to perform the test. I read an article related to
> class
> > reloading causing memory leaks,
> > http://tapestry.apache.org/class-reloading.html However, I don't really
> > understand what is being implied. I'm wondering if I'm doing something
> wrong
> > to cause this issue. After running the app from 14:56:23.026 through
> > 15:16:30.222 with one second memory printouts I've noticed the following
> > loss.
> >
> > Available memory JVM (bytes) 8826784 14:56:23.026
> > Available memory JVM (bytes) 6906536 15:16:30.222
> >
> > //appmodule
> >    public static void bind(ServiceBinder binder) {
> >        binder.bind(SchedulerService.class, SchedulerServiceImpl.class);
> >    }
> >
> >    @Startup
> >    public static void initApplication(SchedulerService scheduler) {
> >        scheduler.init();
> >    }
> >
> >
> >    public static AutocompleteCacheService<ApplicationUser>
> > buildUserAutocompleteCache() {
> >        return new AutocompleteCacheServiceImpl<ApplicationUser>() {
> >        };
> >    }
> >
> >    public static AutocompleteCacheService<IfasvVendor>
> > buildVendorAutocompleteCache() {
> >        return new AutocompleteCacheServiceImpl<IfasvVendor>() {
> >        };
> >    }
> >
> >    public static AutocompleteCacheService<IfasvRequisitionCode>
> > buildRequisitionAutocompleteCache() {
> >        return new AutocompleteCacheServiceImpl<IfasvRequisitionCode>() {
> >        };
> >    }
> >
> >    public static AutocompleteCacheService<Evaluator>
> > buildEvaluatorAutocompleteCache() {
> >        return new AutocompleteCacheServiceImpl<Evaluator>() {
> >        };
> >    }
> >
> > //Impl
> > public class SchedulerServiceImpl implements SchedulerService {
> >
> >    @Inject
> >    private RemoteUserSync remoteUserSync;
> >
> >    @Inject
> >    private Session session;
> >
> >    @Inject
> >    private PeriodicExecutor executor;
> >
> >    @InjectService("userAutocompleteCache")
> >    private AutocompleteCacheService<ApplicationUser>
> userAutocompleteCache;
> >
> >    @InjectService("vendorAutocompleteCache")
> >    private AutocompleteCacheService<IfasvVendor>
> vendorAutocompleteCache;
> >
> >    @InjectService("requisitionAutocompleteCache")
> >    private AutocompleteCacheService<IfasvRequisitionCode>
> > requistionAutocompleteCache;
> >
> >    @InjectService("evaluatorAutocompleteCache")
> >    private AutocompleteCacheService<Evaluator>
> evaluatorAutocompleteCache;
> >
> >    public SchedulerServiceImpl() {
> >    }
> >
> >    public void init() {
> >        this.autocompleteCacheUpdate();
> >    }
> >
> >    private void autocompleteCacheUpdate() {
> >        this.executor.addJob(ScheduleUtils.secondlySchedule(1),
> >            "Autocomplete Cache Updates",
> >            new Runnable() {
> >                public void run() {
> >                    memoryUsage();
> >
> >
> System.out.println("*******************Completed**********************");
> >                }
> >            });
> >    }
> >
> >    public void memoryUsage() {
> >    /* Total amount of free memory available to the JVM */
> >    System.out.println("Available memory JVM (bytes): " +
> >        Runtime.getRuntime().freeMemory());
> >
> >    }
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713671&i=1>
> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713671&i=2>
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713671&i=3>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5713671&i=4>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713671.html
>  To unsubscribe from Memory Leak, click here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713668&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTcxMzY2OHwxNjMyOTYxMjA3>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668p5713673.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Memory Leak

Posted by Howard Lewis Ship <hl...@gmail.com>.
Tapestry has been noted to be effectively free of memory leaks.

What release of Tapestry are you using?

You seem to have a caching service here .. do you ever clear your
cache?  Could the contents of your cache account for the memory usage?

Are you checking memory usage after running at least one full GC?  If
you aren't running out of memory, Java is happy to let it clutter up
the place.

You can use VisualVM to get an idea of what objects are in memory,
that might help identify what, if anything, is leaking.

On Wed, Jun 6, 2012 at 12:19 PM, George Christman
<gc...@cardaddy.com> wrote:
> Hello, I've created a scheduler service and noticed a memory leak. I'm using
> the exact code below to perform the test. I read an article related to class
> reloading causing memory leaks,
> http://tapestry.apache.org/class-reloading.html However, I don't really
> understand what is being implied. I'm wondering if I'm doing something wrong
> to cause this issue. After running the app from 14:56:23.026 through
> 15:16:30.222 with one second memory printouts I've noticed the following
> loss.
>
> Available memory JVM (bytes) 8826784 14:56:23.026
> Available memory JVM (bytes) 6906536 15:16:30.222
>
> //appmodule
>    public static void bind(ServiceBinder binder) {
>        binder.bind(SchedulerService.class, SchedulerServiceImpl.class);
>    }
>
>    @Startup
>    public static void initApplication(SchedulerService scheduler) {
>        scheduler.init();
>    }
>
>
>    public static AutocompleteCacheService<ApplicationUser>
> buildUserAutocompleteCache() {
>        return new AutocompleteCacheServiceImpl<ApplicationUser>() {
>        };
>    }
>
>    public static AutocompleteCacheService<IfasvVendor>
> buildVendorAutocompleteCache() {
>        return new AutocompleteCacheServiceImpl<IfasvVendor>() {
>        };
>    }
>
>    public static AutocompleteCacheService<IfasvRequisitionCode>
> buildRequisitionAutocompleteCache() {
>        return new AutocompleteCacheServiceImpl<IfasvRequisitionCode>() {
>        };
>    }
>
>    public static AutocompleteCacheService<Evaluator>
> buildEvaluatorAutocompleteCache() {
>        return new AutocompleteCacheServiceImpl<Evaluator>() {
>        };
>    }
>
> //Impl
> public class SchedulerServiceImpl implements SchedulerService {
>
>    @Inject
>    private RemoteUserSync remoteUserSync;
>
>    @Inject
>    private Session session;
>
>    @Inject
>    private PeriodicExecutor executor;
>
>    @InjectService("userAutocompleteCache")
>    private AutocompleteCacheService<ApplicationUser> userAutocompleteCache;
>
>    @InjectService("vendorAutocompleteCache")
>    private AutocompleteCacheService<IfasvVendor> vendorAutocompleteCache;
>
>    @InjectService("requisitionAutocompleteCache")
>    private AutocompleteCacheService<IfasvRequisitionCode>
> requistionAutocompleteCache;
>
>    @InjectService("evaluatorAutocompleteCache")
>    private AutocompleteCacheService<Evaluator> evaluatorAutocompleteCache;
>
>    public SchedulerServiceImpl() {
>    }
>
>    public void init() {
>        this.autocompleteCacheUpdate();
>    }
>
>    private void autocompleteCacheUpdate() {
>        this.executor.addJob(ScheduleUtils.secondlySchedule(1),
>            "Autocomplete Cache Updates",
>            new Runnable() {
>                public void run() {
>                    memoryUsage();
>
> System.out.println("*******************Completed**********************");
>                }
>            });
>    }
>
>    public void memoryUsage() {
>    /* Total amount of free memory available to the JVM */
>    System.out.println("Available memory JVM (bytes): " +
>        Runtime.getRuntime().freeMemory());
>
>    }
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Memory-Leak-tp5713668.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org