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 the difference between ejb and spring?

534


What are ejb containers?

547


What is message-driven bean?

578


What does statelessness mean?

529


Which services are provided to ejb components by the ejb container?

733






Can remove() be a Stateless Session bean?

583


What are the advantages of ejb components?

562


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

569


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

2024


Why is ejb used?

510


What is stateless ejb?

531


What is ejb home object?

571


Explain the concept of local interfaces?

535


What is backing bean?

612


What is the difference between ejb and java beans?

561