We will see examples of using JMS APIs in three different ways.
In the first example, we will create a simple addCourse.jsp page, one JSP bean, and one Service class that actually performs JMS tasks.
In the second example, we will use JSF and managed beans. We will use JMS APIs in the managed beans. We will also see how to use JMS annotations in JSF managed beans.
In the last example, we will use MDBs to consume JMS messages.
Let's start with the first example, which uses JSP, bean, and JMS APIs. Create a web project by selecting File | New | Dynamic Web Project or File | New | Other and then Web | Dynamic Web Project:
Enter the Project name as CourseManagementJMSWeb. Make sure that Target runtime is GlassFish . Click Next, and accept all the default options...