Common knowledge in Java

A few notes, observations that I would like to document about Java. This may be common,trivial knowledge, but I just want it to be in one place.

Thursday, June 23, 2005

EJB in two minutes: a refresher

  • More detail here
  • You have your EJB server, container, EJBs and clients.
  • Entity Beans (think persistence), Session Beans (stateful/stateless), Mesage Driven Beans (needs no interface)
EJBs have:
  • Home Interface: provides methods for locating, creating, and removing instances of EJB classes, home object is implementation
  • Remote Interface: is the client facing interface, it has all the business methods.
  • Enterprise Java Bean: Is in the container result of deploying home and remote interface.
  • Create home interface by extending EJBHome
  • Create Remote interface by extending EJBObject
  • Define primary key object.
  • Create your Entity Bean implementing EntityBean
Typical lifecycle:
  • Locate home object, create or find remote object from home object, apply business methods on remote object

0 Comments:

Post a Comment

<< Home