Domino Features Enabling Applications to Integrate with J2EE
Domino ships with features that facilitate the integration of Domino data with J2EE applications. You can reap many benefits by combining Domino and J2EE applications including, most importantly, the addition of human interaction into scalable and transactional applications built on J2EE. When integrating Domino with a J2EE-based application, there are two key ways to access Domino functions:
Domino Objects for Java
Domino Custom JSP tags
The Domino Objects for Java are essentially the Domino Java API. These objects allow for Java object-based access into the Domino data store for the key database functions of create, read update, and deleteor CRUD actions. The Domino Objects for Java API allows access not only to Domino data but also to key Domino services, such as registering users, running agents, sending mail, and others. The Domino Objects for Java can be used by experienced Domino developers for adding Domino specific function to J2EE applications. For example, a servlet or JSP can be enhanced with Domino function by using the Domino Java Objects within the servlet's or JSP's Java code.
Lotus Domino Toolkit for WebSphere Studio
Starting with Domino 6.0.2, the Lotus Domino Toolkit for WebSphere Studio provides developers with an intuitive tool to implement the Domino custom JSP tags into their WebSphere applications. The toolkit is a set of plug-ins that enhances the WebSphere Studio Application Developer (WSAD) user interface. It enables J2EE developers to integrate Domino functions into Web applications without the complexity of the Domino Java API or even a detailed understanding of the Domino Custom JSP tags.
The toolkit adds a new view to WSAD, a "Domino view," which allows you to work easily with Domino database objects such as forms, fields, views, and agents. Using this new Domino view within WSAD, you can access a Domino database (locally or remotely) and display the database's forms, fields, views, and agents. These objects can be dragged and dropped onto JSPs being developed, and the equivalent Domino custom JSP tag code is inserted. Using the Lotus Domino Toolkit enables developers without an in-depth understanding of Domino function to easily incorporate that function into their applications.
Domino has extensive XML capabilities that can be used from a J2EE application. A J2EE application can use the Domino Java API to retrieve Domino documents in XML format without knowing specifics about the data stored in Domino. Then, the J2EE application can process the XML and transform it to the specific format needed by the application. If the application needs to update the Domino data, the same interface can be used to update the database by passing back XML.
Emerging Web services standards simplify and broaden application integration by defining a standardized means to make service requests and receive response data over common Internet protocols. The lingua franca of Web services is the XML based access protocol known as Simple Object Access Protocol (SOAP). Designers express the application or service interface using XML. Domino can host Web services that expose Domino data and function using Java or LotusScript. Using a combination of a J2EE server such as WAS, appropriate SOAP classes and the Domino Java Objects, developers can expose desired portions of their current Domino applications as Web services. To do so requires some Java development skills and knowledge of the Domino object model, which we discuss in detail in following chapters. For pure J2EE applications, WAS ships with the needed SOAP classes, and the WebSphere Studio development environment has wizards for creating, consuming, managing, and deploying Web services.
Domino Data in a Relational Database
Domino has a capability, via the Lotus Enterprise Integrator (LEI) feature, to store all document data in a relational database, such as DB2, Sybase, or Oracle, rather than in a Domino NSF database file. The benefit is that Domino maintains its security controls and the database design, but since the document data is stored in the relational database, document access is improved due to the performance efficiencies offered by the relational database. This access method is referred to as Advanced RealTime connectivity. Advanced RealTime connectivity allows significantly better scalability and performance, since the relational technology is used for data storage versus the Domino NSF file format.
The Advanced RealTime connectivity feature can be used as a means to integrate Domino data with J2EE applications. As mentioned previously, J2EE applications running on WAS can access relational data stores directly using JDBC or EJB interfaces. Instead of using Domino provided mechanisms to access Domino data stored in NSF files, the application can utilitize relational data access methods. A designer can achieve high performance by employing standard data access techniques such as connection pooling, caching, and minimizing JNDI lookups.
J2EE allows for the abstraction of databases and their connections from application code by accessing a business object layer rather than the database directly. This layer, in turn, accesses the database itself. The same business objects can be accessed by different applications. The database design is decoupled from the application itself, creating easier maintenance going forward.