users@glassfish.java.net

MYSQL DataSource with Glassfish under Netbeans 6.9

From: <forums_at_java.net>
Date: Wed, 6 Apr 2011 16:02:03 -0500 (CDT)

Normal 0 21 false false false FR X-NONE AR-SA MicrosoftInternetExplorer4 /*
Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal";
mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes;
mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm;
mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan;
font-size:11.0pt; font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}
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/789365