Hi Matt, There has been a recent discussion on this topic in this list. Some changes were made in SVN trunk so that ConnectorService callback methods are systematically called after sending representations/responses.
You basically have to provide a custom ConnectorService that intercepts those calls to update your EntityManager accordingly. Also, as this piece of code seems rather generic, there might be an opportunity to provide a specific Restlet extension for this... Feel free to contribute one or to enter a RFE. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : [email protected] [mailto:[email protected]] Envoyé : mercredi 15 avril 2009 19:50 À : [email protected] Objet : RE: Managing a JPA/Hibernate session Hi Could anyone give me some advice how I could implement such a Filter or ConnectorService for hibernate? The main problem is: How can I get the EntityManager that I created in the Filter at some other point? Now I'm using auto-generated JPA Controller classes form NetBeans but this leads to lots of problems when accessing data when the EntityManager has already been closed. Thanks for any Help Matt ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=17305 94 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1742765

