Pow2toolkit provides a simple system to configure:
The ConnectionFactory class provides JDBC connection objects to the clients. It gives a common interface to retrieve connection objects, but defer the database interaction to specialized connectionProvider classes.
The connectionFactory package provides tree connectionProvider classes:
connection provider class | description |
---|---|
JakartaConnectionProvider |
Provides connection objects using the Jakarta
commons-dbcp
Connection Pool library. class name: com.pow2.dao.JakartaConnectionProvider
|
ProtomatterConnectionProvider |
Provides connection objects using the
Protomatter Connection Pool library. class name: com.pow2.dao.ProtomatterConnectionProvider
|
SimpleConnectionProvider |
Provides connection objects, but does not use connection pool components. class name: com.pow2.dao.SimpleConnectionProvider
|
The com.pow2.dao.datalist
package provides a JDBC 2.0 implementation of the
Data List Handler
pattern by Claudio Fratarcangeli.
"The the DataListHandler design pattern represents a substantial improvement over traditional
methods for efficiently processing Internet searches and quickly displaying the results to the user.
The DataListHandler design pattern addresses the problem of processing Internet search queries that
return large result sets in an efficient manner.
It provides a set of interfaces, DataListHandler, DataList, and DataListIterator,
that insulate the client from the underlying details of the search and retrieval implementation."
Read the PDF
here.
The com.pow2.dao.IdGenerator
class provides the generation of ID values using the
HIGH / LOW strategy described by Scott W. Ambler
into his Mapping Objects To Relational Databases white paper.
The com.pow2.user
package provides simple User management (geUser, deleteUser, createUser)
and authentication via the UserManager
class.
UserManager
is a facade to the UserDAOFactory
, that
provides data access to relational databases or LDAP servers.
The com.pow2.struts
package provides the integration with
Jakarta Struts framework.
action class | description |
---|---|
ActionServlet |
the custom ActionServlet class extends org.apache.struts.action.ActionServlet
and override the processActionPerform method.
It checks if the input action is a subclass of BaseAction ; then execute its
validateSession method
|
BaseAction |
provides the validateSession hook method; developers could override this method to
implement their own user validation rule
|
DispatcherAction | Ted Husted's DispatcherAction class. See his Struts Catalog for more Struts' patterns |
UserValidationAction |
check for a valid com.pow2.user.User object reference into the session context
|
UserValidationDispatcherAction |
extends DispatcherAction class and provides simple User validation rule
|