users@glassfish.java.net

Re: Hwo to use Jpa on servlet

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Wed, 09 Jun 2010 09:06:56 +0530

See
http://weblogs.java.net/blog/ss141213/archive/2005/12/introduction_to.html

On Wednesday 09 June 2010 08:50 AM, glassfish_at_javadesktop.org wrote:
> I am new in jpa , I try some Jpa example on java application, but when I walk on step more try to test jpa on servlet , I get the problem on create an EntityManagerFactory , It looks like I can't use the some way that I create EntityManagerFactory method like the follow
>
> [b]EntityManagerFactory emf=Persistence.createEntityManagerFactory("MyJPAApplicationPU");
> EntityManager em=emf.createEntityManager();
> try{
> EntityTransaction entr=em.getTransaction();[/b]
> I Google, and find some Thread-safe issuer , any not ideal how to use jpa in servlet .
> any help is appreciate !
> [Message sent by forum member 'newnet']
>
> http://forums.java.net/jive/thread.jspa?messageID=473466
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>