Documentation of the module asimba-engine-storage
The StorageFactory is a generic storage backend provider that is managed by Engine. This way, Asimba has a centrally configured facility to manage storages that can be reused by all parts of the Asimba application.
To connect with a storage backend, Asimba introduces the StorageFactory. This is an interface to define two types of backend:
1) System Storage
2) Model Storage
System Storage is the place for storing system configuration, like session- and tgt-storage definitions etcetera.
Model Storage is the place for storing the identification profile configuration, like the RequestorPools, Requestors, Authentication- and AuthorizationMethod settings.
The model- and system datasources can be re-used by other components of Asimba, to provide a generic interface to a backend database storage.
The components that use the model storage as their default:
The components that use the system storage as their default:
Example configuration
<asimba-server>
...
<storagefactory enabled=“true” class=“com.alfaariss.oa.engine.storage.jdbc.JDBCFactory”>
<model driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/asimba-db?autoreconnect=true"
username=“asimba”
password="" />
<system driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/asimba-db?autoreconnect=true"
username=“asimba”
password="" />
</storagefactory>
...
</asimba-server>
Both model as well as system definitions are configured as a JDBCResource.
Implemented in com.alfaariss.oa.engine.storage.jdbc.JDBCFactory
Problem: On Asimba startup, there is an error message in the logfile:
ERROR c.a.o.e.storage.jdbc.JDBCFactory - Could not connect to model resource
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
Solution: Ensure that the mysql-driver is available in the context of the JVM, Tomcat or Asimba. It is preferred to make it a Tomcat-scoped library, so copy the mysql-connector-java-x.x.x.jar in $CATALINA_HOME/lib (or pre Tomcat 6.0: $CATALINA_HOME/common/lib)
Wiki: About configuring Asimba
Wiki: asimba-engine-requestor-jdbc
Wiki: asimba-engine-tgt-jdbc