In the example are used:
- IDE - Eclipse Luna
- Server - glassfish 3.1
- JDK - Java 1.7
EJB project structure - example
*Note: Take into account that the EJB 3.1 API needs to be added to the build path
The implementations details are in the previous post: http://javawithbreakfast.blogspot.com/2015/11/ocejbcd-3-accesing-session-beans.html
Create Web project
Web project structure:
*Note: Take into account that the servlet3.0 API needs to be added to the build path
Make the EJB project visible to the web project
Include the EJB project in the build path of the web project:
-Select web project, right button.
-Build path/Projects/ Add the EJB project
Important: to make the EJBs visible to the web project, the EJB project should be included in the deployment assembly:
- Select web project, right button.
- Deployment assembly/ Add: add EJB jar
Deployment
No comments:
Post a Comment