users@glassfish.java.net

Re: MYSQL DataSource with Glassfish under Netbeans 6.9

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Wed, 06 Apr 2011 13:57:19 -0700

Hi Miloud_j2ee,

The following blog will help you answer the question:

http://blogs.sun.com/arungupta/entry/totd_122_creating_a_jpa

Let me know if you are looking for something else.

Thanks,
-Arun

On 4/6/11 1:49 PM, forums_at_java.net wrote:
> HI,
>
> -------- CAN ANYONE TELL ME HOW TO SET UP A MYSQL DATASOURCE WITH
> GLASSFISH
> UNDER NETBEANS 6.9 --------------------------------------------------
>
> so that I can use the following code:
>
> *1)EntityManagerFactory emf=
> Persistence.createEntityManagerFactory("ejbPU");
> 2)Authentification em = (Authentification) emf.createEntityManager();*
>
> where authentification is an entity class obtained from a database
>
> -------- SO FAR I CAN GET "EMF" WITH SUCCESS BUT FAILED TO GET "EM" AND GET
> THE ERROR: CANNOT ACQUIRE DATASOURCE [MYSQL/DATASOURCE] -------------
>
>
> --
>
> [Message sent by forum member 'Miloud_j2ee']
>
> View Post: http://forums.java.net/node/789364
>
>

-- 
Blog: http://blogs.sun.com/arungupta
Twitter: http://twitter.com/arungupta