Search code examples
mysqlglassfishejb-3.0hibernate-mappingmyeclipse

using Hibernate ORM in an EJB Project in Myeclipse with glassfish and mysql data base


I am new to J2EE development and its frameworks, so I'm leads to create a J2EE application usign Myeclipse,glassfish ans mysql as SGBD ... I need to create a project EJB3 session I have to use Hibernate3 ORM .. My concern is that I've worked with hibernate but in a web project type and not EJB and I really do not know how my project should be like .. I just need to understand the structure of my EJB project because normally we have 2 basic classes: EJBService and EJBserviceRemote .. EJBService, containing all my methods that I would need to call from my client (a web project for exemple) and EJBServiceRemote which contains the signature of each method .. so where do I rank the DAO classes generated by Hibernate ORM and how to call them?? shoukd I copy their code in EJBService and then declare in EJBServiceRemote to be able to call them by my client??

SOS I'm really disturbed


Solution

  • add all the jars that you're using in your ejb project to the following glassfish directory :

    1. C:/..../glassfish/lib
    2. C:/..../glassfish/domains/"your domain name"/lib