Sample EJB Project using MyEclipse
http://www.myeclipseide.com/documentation/quickstarts/firstejb/
In WebLogic Single Server mode, EJB objects have local and remote interfaces, each EJB object can have EJBObject and EJBHomeObject. Client firsts interacts with EJBHome to get bean object, then client interacts with EJBRemote object to do business logic and commit in database. In short, the various EJB related objects functionality can be summerized as below:
The EJB Remote interface class that declares the business operations that are available to a client
The EJB implementation class, also known as the bean class, that contains the business logic
The EJB Home interface class, which controls the bean's life-cycle
Article about applying EJB
http://media.techtarget.com/tss/static/articles/content/ApplyingEJB/matena8.pdf
Some important EJB methods:
ejbLoad - synchronize an instance of the bean values with the value in database. Client can't invoke it.
ejbStore - store the values to database. Client can't invoke it.
ejbActivate - it is called usually before ejbLoad at the beginning of the transaction, it initialized the field assocation to the primary key attribute of the object.
ejbPassivate - it is called so that the Contain Managed Persistence values are reset and the memory associated to the bean is returned to the pool.After the ejbPassivate method completes, the bean instance is no longer associated with an identity and, by calling ejbActivate, can be used to service a request on behalf of a different ejb object instance.
A BMP(Bean managed persistance) code details:
http://docs.oracle.com/javaee/1.2.1/devguide/html/Entity3.html
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.1.0)
http://docs.oracle.com/cd/B31017_01/web.1013/b28221/undejbs002.htm#CIHHEIGA