NOTE July 6, 2010: The following instructions are not rigorously tested but
the class works.
JUnit test base class that allows AssetAPI and limited ICS usage in the
absence of the ContentServer web container.
Using this class, it is possible to test the DAO layer without requiring
deployment to the web container.
To set up, follow the following instructions:
- mount the shared filesystem on your local machine in the same path that
it is mounted on on the application server
- mount (or copy) the Content Server home folder onto your local file
system. It is probably not a bad idea to mount it in the same place that it
is mounted on the application server. TODO: verify
- add the path to futuretense.ini to your classpath (this is the home
folder described above)
- add a system property for cs.installDir, and set it to the of the Content
Server home folder
- add a property file called "datasource.properties" to your classpath that
contains the following properties, set to the appropriate values for the
purposes of setting up a JDBCDataSource (you can probably get these from your
application server administrator: username, password, driverClassName, url,
maxActive, maxIdle)
This effectively sets up a local copy of Content Server without a servlet
context. Some operations that require the execution of a JSP element and
related items will fail when using ICS, but core DB operations should
succeed. The ICS object's cache is not reliable in this configuration,
however, and writes to the database will not be noticed on the main server.
An ICS object is available, protected, and as well
SessionFactory.getSession(ics)
operates per usual.