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

Explain transaction and various methods to manage it?

528


What is ejb ql?

566


What is the difference between ejbcreate() and ejbpostcreate?

531


What is stateless session?

553


What is stateless authentication?

517






How does ejb work in java?

544


What do you mean by timer service and where it is used?

510


Enlist the declarative transaction types?

597


Explain the important elements of ejb?

551


When was ejb developed?

569


Enlist the CallBack methods of Entity Bean.

580


What is stateful or stateless?

528


What is ejb bean in java?

581


Is ejb a framework?

525


What is ejb and why it is used?

495