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

A client wants to preserve the reference to the ejbhome object of an enterprise bean instance and use it later. Which of the following can be serialized for this purpose?

617


Define ejb Create() and EjbPostCreate()?

677


What do you mean by ejb ql?

654


What are transaction isolation levels in ejb?

630


How does ejb invocation happens?

633






What is ejb and its types?

593


Which is more beneficial: Stateful or Stateless Bean?

655


What is the default transaction attribute for an ejb?

618


What is dependency injection in ejb?

632


What does @singleton annotation do?

621


How do you decide whether you should use session, entity or message driven bean?

666


What is @enableautoconfiguration?

634


Is microservice stateless?

572


Enlist the contents of Container.

662


What changes have been made in ejb 2.0 specifications?

685