[
https://issues.apache.org/jira/browse/OPENJPA-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923506#action_12923506
]
Jeremy Bauer commented on OPENJPA-1824:
---------------------------------------
I think introducing an EJB into the sample would limit its use to only JEE
environments with an EJB container. Since all you really need is a way to
inject an emf, you might be able to accomplish that by introducing a dispatcher
servlet or a listener into the app. That would only require inclusion of the
Geronimo servlet API into the build, instead of the EJB and potentially other
libraries.
> OpenBooks should used container managed persistence when deployed in an
> application server.
> -------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1824
> URL: https://issues.apache.org/jira/browse/OPENJPA-1824
> Project: OpenJPA
> Issue Type: Bug
> Components: samples
> Affects Versions: 2.0.1
> Environment: Windows Sever 2003
> Reporter: Rohit Dilip Kelapure
> Priority: Minor
>
> OpenBooks is using an app managed persistence context and it isn't cleaning
> up properly. openbook.server.ServiceFactory.getService(...) creates an EMF,
> but it is never closed.
> OpenBooks application is using an app managed persistence context which is
> NOT cleaned up correctly when deployed in a JEE server.
> This results in the JEE container JPA Runtime does NOT calling
> DataCacheManager.close() on the DataCacheManager plugin.
> The container JPA Runtime does NOT call openjpa.DataCacheManager.close() when
> the application is stopped.
> This does not give a chance to any OpenJPA L2 cache provider to cleanup their
> resources and remove cache instances from static hashmaps. utlimately
> resulting in a memory leak.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.