how can u integrate ejb and hibernate? How can u call
hibernateDAO methods in session bean?

Answer Posted / guest

hibernate used to perform OR(object relational) mapping.it
is alternate to DAO .
servlets--->ejbSEssionbean(to store businesslogic)--->ejb
entity bean(to maintain persistence logic)here we use
hibernate instead of entity bean.
the above said is the integration procedure to separate
businesslogic from perssitence logic.
to call DAO methods in session bean normally we use
callback methods ejbcreate(),ejbload() to clear previous
datas in database,ejbstore()to store new datas using
primarykey value.ejbsetSessionContext() to initiate the
call.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bean-managed transaction?

787


Define EAR, WAR and JAR ?

826


What is ejb client?

788


What is the difference between ejbcreate() and ejbpostcreate?

733


Explain ejbhome and ejbobject in ejb?

813


What is enterprise javabeans (ejb) container?

736


What is software architecture of ejb?

745


What are the differences between ejb 3.0 and ejb 2.0?

738


What are the various types of entrepreneur java bean?

737


What is ejb context?

754


What does it mean to be stateless?

760


How is ejb different from java beans?

743


Enlist the changes in EJB 2.1 ?

794


How to determine, that beans are TX or not?

1845


Explain what is an EJB Context?

821