uk.co.lakesidetech.springxmldb.startup.xindice
Class XindiceManagedServer

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.startup.xindice.XindiceManagedServer
All Implemented Interfaces:
IXMLDBServerStartup

public class XindiceManagedServer
extends java.lang.Object
implements IXMLDBServerStartup

The XindiceManagedServer will start up a local embedded managed instance of Xindice without XMLRPC access. The database can be accessed through a Driver class of org.apache.xindice.client.xmldb.DatabaseImpl and a url of xmldb:xindice-embed://

The startup bean needs to indicate the location of configuration file otherwise the startup will use a default configuration with a database name of db and a directory root of ./db

Author:
Stuart Eccles

Field Summary
static java.lang.String DEFAULT_CONFIGURATION
           
 
Constructor Summary
XindiceManagedServer()
           
 
Method Summary
protected  org.apache.xindice.util.Configuration createXindiceConfiguration()
          Create a Xindice configuration from the indicated Resource configuration file.
 void setConfigurationFile(org.springframework.core.io.Resource configurationFile)
           
 void setDatabaseRootLocation(org.springframework.core.io.Resource databaseRootLocation)
           
 void shutdown()
          shutdown this Xindice embedded database
 void startup()
          startup the Xindice embedded database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIGURATION

public static final java.lang.String DEFAULT_CONFIGURATION
See Also:
Constant Field Values
Constructor Detail

XindiceManagedServer

public XindiceManagedServer()
Method Detail

setConfigurationFile

public void setConfigurationFile(org.springframework.core.io.Resource configurationFile)
Parameters:
configurationFile - The configurationFile to set.

setDatabaseRootLocation

public void setDatabaseRootLocation(org.springframework.core.io.Resource databaseRootLocation)

startup

public void startup()
startup the Xindice embedded database

Specified by:
startup in interface IXMLDBServerStartup
See Also:
IXMLDBServerStartup.startup()

shutdown

public void shutdown()
shutdown this Xindice embedded database

Specified by:
shutdown in interface IXMLDBServerStartup
See Also:
IXMLDBServerStartup.shutdown()

createXindiceConfiguration

protected org.apache.xindice.util.Configuration createXindiceConfiguration()
                                                                    throws java.io.IOException,
                                                                           org.apache.xindice.util.XindiceException
Create a Xindice configuration from the indicated Resource configuration file. Otherwise use the default xindice configuration

Returns:
a configured Xindice configuration
Throws:
java.io.IOException - if the configuration file cant be found
org.apache.xindice.util.XindiceException - if the configuration is wrong