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