What the EJB “Hello World” sample does

The sample application requests input, appends the input to a standard message, and displays the resulting string. The sample consists of:
The sample works like this:
  1. The user starts the application from a Web browser. A form is displayed.
  2. The form asks the user to input a phrase. When the user presses the SUBMIT button, the servlet is invoked.
  3. The servlet:
    1. Looks up a reference to the enterprise bean in the JNDI namespace
    2. Creates a new remote instance of the enterprise bean in CICS
    3. Invokes a method on the bean-instance, passing as input the phrase input by the user
  4. The enterprise bean appends the user's phrase to the string “You said ” and returns the result to the servlet.
  5. The servlet uses a JavaServer Page to display the result on the user's browser.

Figure 1 shows the components of the sample application.

Figure 1. Overview of the EJB “Hello World” sample application. The main elements of the sample are a Java servlet and an enterprise bean. In this example, the servlet is running in a Web application server on a Windows NT server; a COS Naming Server is used. Other configurations are possible. For example, an LDAP name server could have been used; or the COS Naming Server might not have been hosted in the same application server as the servlet.
The picture shows a workstation, a Windows NT server, and a z/OS operating system. On the workstation, a Web browser is running. On Windows NT, there are a Web server and a Web application server. In the Web application server, a Java servlet and a COS Naming Server are running. On z/OS, an enterprise bean instance is running in a CICS EJB server.The workstation user uses the Web browser to start the Java servlet on Windows NT. The Java servlet finds the home interface of the enterprise bean by means of a JNDI call to the COS Naming Server, then starts an instance of the bean in CICS, passing the bean the user's input. The enterprise bean returns the changed input string to the servlet, which uses a JavaServer Page to display it on the user's browser.