This series of articles shows the characteristics of the Java™server Faces Technologypreview in Websphere®studio V5.1.1, which is the 4th part of the paper.
In part 3rd of the article series, we saw how JSF applications use Service data Object (SDO) technology to access data. In this article, we'll see how JSF leverages the existing Java EE technology. We will create a JSF page that invokes the existing EJB application and use Javabeandata control to display the EJB invocation results, taking into account the RAD nature of JSF. In addition, we will use the Quick edits view to write the Action Handler to invoke an existing stateless session bean.
To complete these exercises, you need to download the information contained in this article. In case you haven't finished the 3rd part, the download file contains the solution; Please import the EAR file as described in part 3rd. To run the example, you also need to create the database as described in part 3rd, and after you import the solution, run the application in the method described in the last section of part 3rd, so that you can create the JDBC data source in the Server Configuration for this exercise.
Import and install STOCKSYSTEMEJB
Now let's create the next JSF results page for the stock Data page created in part 2nd. First we import the existing EJB JAR file and then create a JSF page that displays the results.
To import an EJB JAR file and make it part of an existing EAR file, you need to perform the following steps:
Select File => Import in the WebSphere Studio application Developer (hereafter referred to application Developer).
Figure 1. Application Developer File Menu
Select EJB JAR file, and then click Next.
Figure 2. File Import dialog box
Navigate to C:\JSFArticleSeries\Part4\StockSystemEJB.jar. The Project name should be STOCKSYSTEMEJB. Select the existing ear file stocksystemear. (You must explicitly select an existing EAR; it is stocksystemejbear by default, which is likely to be misleading.) ) Click Finish.
Figure 3. EJB Import