Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Soliciting Ideas for Dealing with Initial Entity Manager Creation Lag

We've begun integrating EclipseLink into an RCP business application.
One interesting problem is on the fist call to createEntityManager()
there is a significant lag as I assume all the Entities are loaded and
other magic stuff goes on, so users aren't really expecting to have to
wait the first time they do a search, or load an editor.

Some background:
We will end up with about 5 or 6 plugins each with their own
collection of entities and their own EntityManagerFactories.

We are creating the Entity Manager Factory from a datasource, the
entities are all listed in a persistence.xml.

One idea we had was to simply turn off lazy loading of a plugin and
creating an initial entity manager in a job, then disposing it. Users
are used to waiting during the initial load. One problem is if you
wanted the plugins to load on startup you'd have to turn off lazy
loading which uses more memory for plugins the users may not even use
that session.

I'm hoping someone with some EclipseLink back end knowledge might have
some insight into what exactly takes so long the first time you create
an entity manager (subsequent ones are quicker, so i'm assuming class

Or if any of the other RCP/OSGI users have dealt with this yet and
have some ideas that'd be great.

Thanks as always!


Back to the top