i'm working on an ejb 3.0 tutorial and i want to add data to the database when i set run it doesn't indicate any error and it doesn't add the following data in the db either : this is the session bean code :
public String creerCompte(CompteBancaire c) {
try{
em.persist(c);
return null;
}catch (Exception ex) {
return ex.getLocalizedMessage();
}
}
public static void main(String[] args) throws Exception{
GestionnaireDeCompteBancaire g=new GestionnaireDeCompteBancaire();
CompteBancaire c=new CompteBancaire("John Lennon", 150000);
g.creerCompte(c);}
the method main just to try the method creercompte out