• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb server provide persistence means ?

 
manis yadav
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejb server provide persistence
what does this means ?

please tell
 
Pranav Shukla
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB Server can provide persistence service for your Entity Beans if you want.

Entity Bean generally represents an entity in a persistence store(mostly a relational database like oracle/mysql). If you choose not to use container's persistence service you will have to write the JDBC(or SQL/J) code to do the database operations for you entity (insert/update/delete and many others).

But if you choose to use Container's persistence service you can configure the entity's abstract persistence schema in your DD (which properties your entity has). Then with a vendor specific deployment descriptor you can map your entity's abstract schema to actual database table and column names.

When you deploy such an entity bean the ejb container will generate the JDBC code to map your abstract entity bean to the database table that you specified. So you neeed not write any JDBC code yourself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic