Strategies for Integrating J2EE-Based Applications into a Portal Server Environment
The goal of this article is to help the developer understand the issues associated with migrating an application from an application server architecture to a portal-centric architecture.
Need for Migration to a Portal Server
When should an organization think about integrating application and portal server environments? Let's consider an example:
Other benefits of using the portal server could include:
- Wireless access
- Secure remote access
- Knowledge management
- Real-time collaboration (chat)
A portal server environment offers the ideal platform since it provides all the above services and much more. For example:
- A user can access e-mail, his local file-system, static Web pages, as well as applications running on either a Web or application server.
- Once someone logs in to the portal, the user doesn't have to log in again to access any of the above mentioned applications, which require authentication. The Single Sign On (SSO) facility of most portal servers provide this freedom to integrate these types of applications.
- An authorized portal user can telnet/ftp from outside of the firewall to another user's machine and use the files/resources that user normally would (without opening the ports for ftp/telnet in the firewall).
- The user can personalize the content available through the portal server, such as the look and feel of the pages he or she sees on the browser.
- The contents/applications available through the portal server can be made accessible according to a user's job role/position in the company.
- Portal and application servers provide very complementary services, so the purpose of this article is to highlight the specific areas the developer needs to think about when building applications.
The following sections attempt to highlight the areas that must be considered when planning to use the portal server and application server in the same environment.
Migration Case 1
In many situations, an IT team knows that the application being built using application servers will ultimately be integrated into a portal environment. Here are some tips on how to make that integration and deployment easier:
- Follow a Model-View-Controller (MVC) pattern as much as possible when building a J2EE-based application. MVC patterns represent best practices development techniques where business logic is separated from presentation logic to provide greater flexibility for applications to change over time without having to recode entire applications.
- Make sure JSP forwards and redirects behave as intended in the portal server. There are cases where these are not allowed. Other forms of navigation, such as HREF, should be used with caution too because these can take the navigation out of a portal environment.
- Do not handle authentication and authorization programatically in the application. Leverage the container-managed security available with the portal server. Almost all portal servers provide some support for authentication. Because an authentication mechanism can be modified declaratively, this will be much easier to maintain.
- Make sure the session bean façades expose remote interfaces also, because the Web tier may be hosted in a separate server in a portal environment.
- The target portal server may not support the version of J2EE that the application server supports; therefore, make sure the JSP/servlets are compatible with the portal server versions.
Page 1 of 2