开发者

How to share EntityManagerFactory Object across the various Resource files in a Restlet application?

开发者 https://www.devze.com 2022-12-21 03:15 出处:网络
I would like to create one EMF object and use it in various Resource class objects.. any ideas on ho开发者_JS百科w to do this?the answer is to use a class which follows the singleton design pattern -

I would like to create one EMF object and use it in various Resource class objects.. any ideas on ho开发者_JS百科w to do this?


the answer is to use a class which follows the singleton design pattern - for more details see - http://vatsalad.wordpress.com/2010/03/05/single-entitymanagerfactory-object-across-various-restlet-resources/

0

精彩评论

暂无评论...
验证码 换一张
取 消