openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTCINW)" <dk0...@att.com>
Subject RE: Best way to "prime" OpenJPA before first request?
Date Thu, 21 Jan 2010 20:24:52 GMT
> -----Original Message-----
> From: Miłosz Tylenda [mailto:mtylenda@o2.pl]
> Sent: Wednesday, December 30, 2009 7:03 AM
> To: users@openjpa.apache.org
> Subject: Re: Best way to "prime" OpenJPA before first request?
> 
> > I'm building a REST-based app using CXF and OpenJPA 1.2.1.  The app
> > works fine, but I've noticed that the first request to the app after
> > startup takes quite a while, and most of the time is spent on the
> first
> > JPA request.  Following requests, even for different objects and
> > classes, goes much faster.  What are my possible options for
> "priming"
> > JPA at startup so that the first request doesn't take so long?
> 
> 1. If you are using servlets, confgure web.xml to load your servlet at
> start-up or add some *Listener.
> 2. Your application server might provide some scheduler API - try to
> configure it so that it issues a request to your app after the app gets
> loaded.

> 3. openjpa.InitializeEagerly property but I am afraid it requires a
> newer OpenJPA than 1.2.1

I see that this property isn't in 1.2.2.  Will it be in the next point release?

Mime
View raw message