db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JDO-138) Cache pmf instances
Date Mon, 13 Mar 2006 22:15:41 GMT
     [ http://issues.apache.org/jira/browse/JDO-138?page=all ]
Craig Russell resolved JDO-138:

    Fix Version: JDO 2 final
     Resolution: Fixed

> Cache pmf instances
> -------------------
>          Key: JDO-138
>          URL: http://issues.apache.org/jira/browse/JDO-138
>      Project: JDO
>         Type: Improvement
>   Components: tck20
>     Reporter: Michelle Caisse
>     Assignee: Michael Bouschen
>      Fix For: JDO 2 final

> In order to improve performance with connection pooling, cache pmf instances in JDO_Test,
rather than closing pmf after each test.
> Some design issues & suggestions:
> [Craig:]
> It might be worthwhile looking at the JDO_Test method where the PMF is acquired. Perhaps
a static Map that holds the PMF between tests would work. The thing to watch for is to make
sure that the PMF that's cached fully meets the requirements of the Properties/Map that is
being used. There is some logic there.
> ...
> The reason to close the pmf is to gracefully close the underlying files. This was a requirement
of the original FOStore implementation, and I don't remember exactly why we wanted to do that,
but we did.
> It's worth experimenting with this to see if we can avoid closing the PMF in case we
are running multiple tests. 
> We might need a maven postGoal to close the pmf after all the tests have run.
> [Karan:]
> We could adapt a policy of not closing pmf, but only those tests which require an explicit
closing of pmf would call closePMF() or something like this which would
> 1. explicitly close the pmf in cache (pmf.close())
> 2. flush the cache.
> For [tests that need to set pmf properties], we could have a setPMF(Properties props)
and closePMF() methods in JDO_Test which will modify the cache appropriately.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message