Implement EJB Interface | Interfaces required by standard EJB component model to enable container-based management of EJB |
Implement EJB Business-Specific Class (bean class) |
Any business-specific interfaces (usually in session beans) and any supporting helper and utility classes. |
Compile EJB Code | Compile: EJB classes |
Deployment Descriptors |
create for deployment of your EJBs (optional if using annotations) specifies:
|
Package EJBs into EJB Jar module* | Optional but, a good idea. |
Application Deployment Descriptor | Optional, but, if grouped into modules will need |
Deploy the Aplication | Deploy to container using descriptor(s). |
1. Grab EJB object to execute business logic on (e.g. JNDI service for Remote EJB) See http://puzzle.mcs.csueastbay.edu/docs/javaee-tutorial/doc/gipjf.html#gipiz for different combinations - local or remote client using dependency injection or JNDI OPTION 1: Using JNDI for remote EJB
OPTION 2: Local and no interface EJB using dependency injection
@EJB ExampleBean exampleBean; exampleBean.businessMethod1();
|
2. Invoke methods on EJB object (here called A)
A.addCourse(); //what ever method you want.
|