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

Answers were Sorted based on User's Feedback



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

Answer / vamsee

As both are different technologies, they vary in mapping to
Data bases. Ejb's uses service of J2EE container to talk to
DB's but is not. It is ORM model which directly talk to the
DB objects. Hibernate reduces the level of complexity to
map the DB.

Is This Answer Correct ?    3 Yes 3 No

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

Answer / 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

More EJB Interview Questions

What is the major difference SessionBean and EntityBean?

3 Answers   KPIT, Wipro,


Tell me difference between Container managed persistent bean & Bean managed persistent bean?

1 Answers   KPIT,


why Bean class implements all business method of Remote interface but bean bean class not implements the remote interface

0 Answers   Polaris,


How can I call one EJB from inside of another EJB?

2 Answers   CTS,


What does @inject mean in java?

0 Answers  






Enlist the CallBack methods of Entity Bean.

0 Answers  


What is the difference between find and select methods in ejb?

0 Answers  


List down the steps for the demonstration of ejp persistence mechanism.

0 Answers  


How 'messaging' supported in EJB 2.0 Specification?

1 Answers  


What is ejb in java?

0 Answers  


can anyone explain me the workflow of EJB.I have developed an app. in WSAD using an example that contains CMP and session bean.But i am not able to understand the basic flow between diffrent packages.

0 Answers  


What is ejb bean in java?

0 Answers  


Categories