4.6. Solution Analysis

In order to solve specific technical issues, a mix of technologies needed to be used, including Enterprise JavaBeans, Servlets and Java ServerPages, XML, JNDI, and others.

4.6.1. Enterprise JavaBeans (EJBs)

Session beans encapsulate all interactions with the back-office mortgage application first developed with C++ and Art*Enterprise as part of HomeSide's previous origination system. Session beans, via the service layer, also control the entity beans that access the Oracle database.

4.6.2. Session Maintenance

A session is established when a customer registers on the site or logs back in, using a previously entered user name and password. Like many e-commerce sites, transactions are grouped on a page basis (when the customer presses the Continue button) to minimize database interactions. This feature also allows customers to pick up where they left off if the Web connection is disrupted, or for transactions to be rolled back and resumed if the entry somehow becomes corrupted.

HomeSide developers wrote approximately 40 session beans and roughly 150 entity beans. By comparison the database numbered over 200 individual tables.

4.6.3. Entity Beans

While session beans provide a service layer for the Web server, entity beans are used for persisting and retrieving data from Oracle tables. The entity beans were based on the database's table structure, with one entity bean per table. “At the time we designed this, we thought this was the most straightforward solution, and it was the approach recommended by many professionals,” says Jeff Griffith, the consultant who was the primary entity-bean developer. He adds, “In retrospect, it would have been more efficient for us to have designed the entity beans as true objects representing concepts rather than a simple one-to-one mapping to the table. That would have made the objects less granular.” Instead of being table-specific, the entity beans would have corresponded to common application objects such as property, borrower, or loan.

In fact, designing object-based entity beans might have been more complex at the outset, because it would have required the object/relational mappings to be designed into the bean itself, rather than the application. However, in the long run, using object-based beans would have incurred less maintenance, since there would have been fewer of them to manage.

Nonetheless, most of the time, the application invokes a small fraction of the beans, such as those relating to contact information and basic information about the loan, such as loan amount and property location.

4.6.4. Persistence

HomeSide used Bean-Managed Persistence (BMP) to manage object/relational database mappings, and to maintain state. The team decided to have each bean manage persistence individually because the alternative—Container-Managed Persistence (CMP)—would have required more performance overhead for its more-generalized settings.

In order to provide for scalability, the application would need to deploy BEA WebLogic on a clustered configuration. Due to concurrency issues, CMP entity beans in a clustered installation must assume that the database is shared with other instances of the bean. This limitation means that an entity bean built to mimic the database structure would have caused two round trips to the database any time a getter or setter method was called on the bean. First the bean would execute a select on the database to fill the bean with current information. After the get or set was complete, the bean would then execute an update to ensure that the database matched the current state of the bean.

According to Griffith, this level of database activity proved impractical for the application because of the sheer volume of data that could come from the underwriting system for each transaction. BMP allows the developer to control when the database is accessed. The primary hurdle in this case is, again, concurrency. There is a tradeoff between developer effort when writing code that uses BMP entity beans, and performance of the BMP beans. “We chose to require our developers to pay close attention to all BMP access, and to manage concurrency ourselves in order to gain the tremendous performance benefits provided by BMP entity beans” notes Griffith. The use of BMP beans resulted in a fivefold increase in database access efficiency, a welcome performance benefit for a Web-based application.

4.6.5. Interaction with Existing Applications

A key function performed by Session Beans is the interface with HomeSide's existing loan origination application. As noted below, the existing application is activated after the loan approval process. At this stage of the process, the workflows vary by customer, dictating the use of the existing system.

4.6.6. Servlets and Java ServerPages

Servlets are used in conjunction with JSPs to coordinate the front end. Specifically, a “master” servlet is used for activating the JSPs that, in turn, dynamically generate the Web pages.

Significantly, servlets, rather than HomeSide's existing loan origination application, are used for managing all the basic steps required for getting loan approvals. Servlets could handle this task because, on the Web, the process for all customers is the same.

Relationship with Existing Application

Although servlets handle the standard workflows for the loan approval process, once the underwriting decision is delivered, the workflows vary by consumer. Instead of reinventing the wheel, HomeSide leveraged its existing loan origination application based on C++, and used Session Beans to encapsulate interaction with the system.

This part of the process involves extensive data gathering that is conducted on the back end, isolating the consumer from all the complexity. At this stage, the existing application choreographs all workflows, including the gathering of all remaining information (such as income and asset verifications) and the completion of all necessary tasks (such as ordering appraisals or flood certifications) in the proper sequence, all the way through the final printing of the actual closing documents.

4.6.7. JNDI

The Java Naming and Directory Interface (JNDI) provides location transparency when locating services. This transparency helps to make the migration to a clustered environment a relatively trivial exercise.

4.6.8. JMS

Java Message Service (JMS) was employed in the service layer for some of the long-running beans. Those beans include the underwriting and credit report ordering beans. A pool of servers was set up to read the messages written to the JMS queue and process the transaction. By doing this, HomeSide was able to put a governor on the number of simultaneous underwriting or credit report transactions that can occur. This allows them to better manage system resources, since the underwriting process can sometimes be long and resource-intensive. Significantly, this mechanism is very similar to the new Message Driven Bean component introduced in the EJB 2.0 specification.

4.6.9. Oracle Database

The existing database and table structure was, for the most part, maintained with the new application. However, the changes in the business process and workflow dictated some minor modifications and the addition of new tables.

4.6.10. XML

This standard data format is used for most interactions, except to and from the Oracle database, in order to keep the data as transparent as possible. Using XML is critical, especially to HomeSide's OEM marketing strategy, which involves having retail partners co-brand the process to sell mortgages to their customers. The use of XML simplifies the task of adapting this process for OEM deployment, because data can be converted using off-the-shelf XML parsing tools.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset