Castor Service

This is a Service that offers access to the object to relational mapping from Castor . We recommend that if you need an Object Relational mapping, that you use the Turbine Peer system with Torque instead.

Configuration

# -------------------------------------------------------------------
# 
#  S E R V I C E S
#
# -------------------------------------------------------------------
# Classes for Turbine Services should be defined here.
# Format: services.[name].classname=[implementing class]
#
# To specify properties of a service use the following syntax:
# service.[name].[property]=[value]

services.CastorService.classname=org.apache.turbine.services.castor.TurbineCastorService
.
.
.
# -------------------------------------------------------------------
# 
#  C A S T O R  S E R V I C E
#
# -------------------------------------------------------------------

services.CastorService.classname=org.apache.turbine.services.castor.TurbineCastorService
services.CastorService.properties.logfile=/tmp/castor.log
services.CastorService.properties.logprefix=turbinecastor
services.CastorService.properties.databasefile=/tmp/database.xml
services.CastorService.properties.databasename=turbine

Usage

TurbineServices ts = TurbineServices.getInstance();
CastorService cs = (CastorService) ts.getService (CastorService.SERVICE_NAME);
Database db = cs.getDatabase();
db.begin();
...
db.commit();
db.close();