Portlet Factory, Version 6.1.2
Database storage of profile information
IBM® WebSphere Portlet Factory is capable of storing profile information in and retrieving it from a database.
Overview of database storage mechanisms
This section discusses database storage mechanism and the procedures required to set up a database repository of profile information. The following components implement database profile support.
- Base Audit Handler
- Provides a standard abstract implementation for recording an audit log of user changes to the profile set data. The classes NullAuditHandlerImpl.java and LoggingAuditHandlerImpl.java are used to implement this functionality.
This handler dumps an audit log of profile set changes to the standard WebSphere Portlet Factory event log. Each audit record contains a leading key which associates this change with others in a sequence.
- Base Connection Factory
- Provides a standard abstract implementation for creating and managing a set of database connections. The following implementation are possible.
- A J2EE DataSource Connection Factory
The class J2eeDataSourceConnectionFactoryImpl.java is used to implement this functionality. This handler creates connections from a standard JDBC DataSource instance obtained by querying a JNDI context. The configuration and management of the DataSource (including any pooling of the created connections) is the responsibility of the application server.
- A JDBC Pooled Connection Factory
The class jdbcPooledConnectionFactoryImpl.java is used to implement this functionality.
Note: You must implement a J2EE DataSource Connection Factory mechanism on your production servers.
- Base Storage Handler
- Provides a standard abstract implementation for all storage handlers regardless of what storage mechanism they front. The class DbStorageHandlerImpl.java implements this functionality.
This smart handler looks for data changes at the lowest level of granularity that is feasible. For example, at the Value granularity rather than the whole profile. The handler is also selective about what it is willing to write to the database. For example, it attempts to prevent semantically invalid profile sets from being stored.
This handler also supports stored procedures. This allows you to customize the implementation provided (for example, tables and indices) to match your enterprise database standards without resorting to rewriting Java code. in effect, the stored procedures are equivalent to a Java interface and an implementation of that interface.
Properties used for configuration
Database profile storage is configured by properties in the following location.../WebContent/WEB-INF/config/cluster.propertiesThe actual properties that need to be configured depend upon what you choose for the audit handler and connection factory.Note: All optional properties are assigned default values intended to optimize performance.
Parent topic: Profile selection and storage mechanisms
- Example: Properties that Configure the Server
A typical server property configuration might look as follows.
- Setting up database storage
Follow these general steps to set up database storage.
Library | Support |