Front cover
Contents
Notices
Trademarks
Preface
The individual that wrote this redbook
Become a published author
Comments welcome
Summary of changes
February 2008, Second Edition
Part 1 Preliminary activities
Chapter 1. Introduction
1.1 Learn, Experience, Explore!
1.2 J2EE simplified
1.2.1 Objective
1.2.2 Specifications
Changes in J2EE standards
1.2.3 Implementations
1.2.4 Web services and messaging
1.2.5 Container architecture
Client Side Tier
(Not shown above)
Presentation Tier
Business Logic Tier
Back End Tier
1.3 Introduction of the scenario
Donate sample application
1.4 Version 2 updates
Chapter 2. Install and configure software
2.1 Required software
2.2 Hardware requirements
2.3 Obtaining the software
2.4 Supported operating systems
2.4.1 Windows operating system considerations
2.4.2 Linux operating system considerations
2.5 Install the base WebSphere Application Server Toolkit V6.1.1
2.6 Install fixes for WebSphere Application Server Toolkit V6.1.1
2.7 Install WebSphere Application Server V6.1 (base)
2.7.1 Disable the WebSphere Application Server automatic startup for Windows
2.8 Install fixes for WebSphere Application Server V6.1
2.8.1 Install the Update Installer
2.8.2 Install the Java SDK Fix Pack
2.8.3 Install the AppServer Fix Pack
Chapter 3. Configure the development environment
3.1 Learn!
3.2 Extract the ExperienceJ2EE.zip samples file
3.3 Create the AST V6.1 workspace
3.4 Configure the WAS V6.1 server runtime definition
3.5 Create the ExperienceJ2EE application server profile
3.6 Create the ExperienceJ2EE Server @ localhost test server definition
3.7 Start the ExperienceJ2EE test server
3.8 Import the sample code snippets
3.9 Explore!
Chapter 4. Prepare the legacy application
4.1 Learn!
4.2 Create the Vacation application database
4.3 Create the Vacation application database tables
4.4 Populate the Vacation application database
4.5 Explore!
Part 2 Core J2EE application
Chapter 5. Create the employee data access element
5.1 Learn!
5.2 Create the enterprise application project
5.3 Develop the Employee entity EJB
5.3.1 Generate the entity EJB from the Vacation database
5.3.2 Set the Default CMP connection factory JNDI name
5.3.3 Generate the deployment code
5.3.4 Alter the workspace settings to ignore unused methods
5.4 Configure the test server for DonateEJB
5.4.1 Start the admin console
5.4.2 Create the ExperienceJ2EE JAAS authentication alias
5.4.3 Create the Derby XA JDBC provider
5.4.4 Create the Vacation JDBC data source
5.5 Add the DonateEAR application to the test server
5.6 Test the Employee entity EJB with the Universal Test Client
5.6.1 Start the UTC
5.6.2 Specify the Admin user ID
5.6.3 Test the Employee entity EJB with the UTC
5.7 Explore!
Chapter 6. Create the funds data access element
6.1 Learn!
6.2 Create the new EJB project
6.3 Develop the Funds entity EJB
6.3.1 Define the Funds entity EJB
6.3.2 Map the Funds entity EJB to a database
6.3.3 Set the Default CMP connection factory JNDI name
6.3.4 Generate the deployment code
6.3.5 Alter the workspace settings to ignore specific warnings
6.4 Create the Funds database and tables
6.4.1 Create the Funds database
6.4.2 Create the Funds tables
6.5 Configure the test server for DonateEJB2
6.5.1 Verify that the ExperienceJ2EE JAAS authentication alias exists
6.5.2 Verify that the Derby (XA) provider already exists
6.5.3 Create the Funds JDBC Data source
6.6 Add DonateEJB2 to DonateEAR
6.7 Test the Funds entity EJB with the UTC
6.7.1 Restart the UTC
6.7.2 Test the Funds entity EJB with the UTC
6.8 Explore!
Chapter 7. Create the donate business logic element
7.1 Learn!
7.2 Define the Donate session EJB
7.2.1 Alter the workspace settings to ignore warnings
7.2.2 Create the EJB references
7.3 Code the Donate session EJB
7.3.1 Create the donateVacation method
7.3.2 Add the call to the Employee entity EJB using a snippet
7.3.3 Add the call to the Funds entity EJB using a snippet
7.3.4 Complete the session EJB
7.4 Test the Donate session EJB with the UTC
7.5 Explore!
Chapter 8. Create the employee facade business logic element
8.1 Learn!
8.2 Define the EmployeeFacade session EJB
8.2.1 Create the EJB reference
8.3 Code the EmployeeFacade session EJB
8.3.1 Create the Employee JavaBean
8.3.2 Create the getEmployeeByKey method
8.4 Test the EmployeeFacade session EJB with the UTC
8.5 Explore!
Chapter 9. Create the Web front end
9.1 Learn!
9.2 Create/Configure the Web project
9.2.1 Create the Web project
9.2.2 Configure the Web project
9.3 Develop the DonateWebRecord JavaBean
9.3.1 Create the EJB references
9.3.2 Create the base class
9.3.3 Code the processEmployee method
9.3.4 Code the processDonation method
9.3.5 Work around: Add serviceLocatorMgr.jar to MANIFEST.MF
9.4 Create and test the Web pages
9.4.1 Create the JSP pages
9.4.2 Complete and test enterEmployee.jsp
9.4.3 Complete and test employeeDetail.jsp
9.4.4 Complete and test donateResult.jsp
9.5 Explore!
Resources
Chapter 10. Create the application client
10.1 Learn!
10.2 Create the application client project
10.3 Create the EJB reference
10.4 Code the main method
10.5 Test the application client
10.6 Explore!
Chapter 11. Implement core security
11.1 Learn!
11.1.1 User registry
11.1.2 Application role based security
11.1.3 Administrative security
11.2 Preliminary security setup
11.2.1 Create and configure the Jython project and script
11.2.2 Run the Jython script
11.3 Enable J2EE application security
11.3.1 Enable J2EE application security
11.3.2 Restart the ExperienceJ2EE Server @ localhost test server
11.4 Implement declarative security
11.4.1 Restrict access to Web pages via declarative security
11.4.2 Restrict access to Donate session EJB via declarative security
11.4.3 Update the EJB method permissions to apply to all interfaces
11.4.4 Update the EAR by gathering roles and assigning users
11.4.5 Test declarative security
11.5 Implement programmatic security
11.5.1 Implement programmatic security in EmployeeFacade
11.5.2 Test programmatic security in the EmployeeFacade session EJB
11.5.3 Implement programmatic security in DonateWeb
11.5.4 Test programmatic security in DonateWeb
11.6 Update the J2EE application client for security
11.6.1 Create a customized properties file
11.6.2 Update and test the J2EE application client test configuration
11.7 Disable J2EE application security
11.7.1 Disable J2EE application security
11.7.2 Restart the ExperienceJ2EE Server @ localhost test server
11.8 Explore!
Chapter 12. Alternative Import the core J2EE application
12.1 Preliminary activities
12.2 Import the sample application
12.3 Configure the sample application
Part 3 Web services
Chapter 13. Create the Web service
13.1 Learn!
13.1.1 Web services and J2EE 1.4
13.2 Create the EJB based Web service
13.3 Modify the WSDL to remove HTTPS
13.4 Test the Web service using the Web Services Explorer
13.5 Create and test a Web service client
13.5.1 Create a new enterprise application project
13.5.2 Create and test the Web service client
13.6 Explore!
Chapter 14. Implement security for the Web service
14.1 Learn!
14.2 Re-enable J2EE application security
14.2.1 Re-enable J2EE application security
14.2.2 Restart the ExperienceJ2EE Server @ localhost test server
14.3 Test the unsecured Web service
14.4 Update the Web service client to support secure access
14.5 Update the Web service to support secure access
14.6 Test the secure Web service
14.7 Disable J2EE application security
14.8 Explore!
Part 4 Messaging
Chapter 15. Create the message-driven bean
15.1 Learn!
15.1.1 Service integration bus
15.2 Configure the test server for base JMS resources
15.2.1 Create the Service Integration Bus
15.2.2 Configure security
15.2.3 Create the destination queue resource
15.2.4 Create the JMS queue destination
15.2.5 Create the JMS activation specification
15.2.6 Create the JMS connection factory for the application client
15.2.7 Restart the ExperienceJ2EE Server @ localhost test server
15.3 Create the message-driven bean
15.3.1 Define the MDB
15.3.2 Add the activation specification information
15.3.3 Create the EJB reference
15.3.4 Code the DonateMDB message-driven bean
15.4 Create the messaging client (DonateMDBClient)
15.5 Test the messaging client
15.6 Explore!
Chapter 16. Add publication of results
16.1 Learn!
16.2 Update the Donate session EJB
16.3 Create the messaging pub sub client (DonatePubSubClient)
16.4 Test the messaging pub sub client
16.4.1 Start DonatePubSubClient
16.4.2 Submit requests
16.5 Explore!
Chapter 17. Implement security for messaging
17.1 Learn!
17.2 Re-enable J2EE application security
17.3 Test the messaging artifacts as-is
17.4 Update DonateMDBClient and DonateMDB
17.4.1 Update the DonateMDBClient code
17.4.2 Update the DonateMDB code
17.5 Test the updated messaging artifacts
17.6 Disable J2EE application security-Optional
17.7 Explore!
Chapter 18. What next?
18.1 developerWorks, alphaWorks, and Google
18.2 Rational Application Developer
18.3 Asynchronous JavaScript and XML
18.4 Portals
18.5 Java EE 5
18.5.1 Java EE 5: JavaServer Faces
18.5.2 Java EE 5: Enterprise JavaBeans V3.0
18.5.3 Java EE 5: Web services support
18.6 Enterprise Service Buses
18.7 Business Process Execution Language
18.8 Service Oriented Architecture
Part 5 Appendixes
Appendix A. Additional material
Locating the Web material
Using the Web material
System requirements for downloading the Web material
How to use the Web material
Related publications
IBM Redbooks
Online resources
How to get IBM Redbooks
Help from IBM
Abbreviations and acronyms
Index
Back cover