• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why we use entity bean ?

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
can anybody tell why we use enity bean and how do we map the fields in the table using entity beans :-(
Any site giving the details of implementation will be a great help
thanks
namita

------------------
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Namita !
As per EJB 2.0 there r 3 types of beans

1) Session Beans
2) Entity Beans
3) Message Beans
Entity Beans r divided into two types

1) BMP : Bean Managed Persistance
2) CMP : Container Managed Persistance
In the BMP Entity Beans u ll get a connection to ur database from the application server u r using, in case of weblogic u ll ve to define ur pool in the properties file.
in ur bean u can get this connection directly from the pool or using datasource object.
e.g. Connection con = DriverManager.getConnection("jdbc:weblogic ool:ur_pool_name");

In CMP ur connections will be taken care by the container. u ll just ve to map ur table fields for selection.
U can access the databse through ur session beans but with direct connection. ur server ll not take care of ur connection management.

 
namita pa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks shishir
------------------
 
reply
    Bookmark Topic Watch Topic
  • New Topic