org.jmonks.batch.framework.repository.db4o
Class ClientServerDb4oRepository

java.lang.Object
  extended byorg.jmonks.batch.framework.Repository
      extended byorg.jmonks.batch.framework.repository.db4o.Db4oRepository
          extended byorg.jmonks.batch.framework.repository.db4o.ClientServerDb4oRepository

public class ClientServerDb4oRepository
extends Db4oRepository

ClientServerDb4oRepository access the Db4o Server and use it as a repository. This requires the db4o server configuration in the repository configuration. Framework provides a utility shell script to start the server. Following is an example repository configuration to use Db4o in client and server mode.

    <repository-config repository-class-name="org.jmonks.batch.framework.repository.db4o.ClientServerDb4oRepository">
          <property key="db4o-server-name">server name or IP Address</property>
          <property key="db4o-server-port">4545</property>
          <property key="db4o-server-username">scott</property>
          <property key="db4o-server-password">tiger</property>
    </repository-config>
  

Since:
1.0
Version:
1.0
Author:
Suresh Pragada

Field Summary
static java.lang.String PROPERTY_DB4O_SERVER_NAME
          Property identifies the Db4o Server name which is db4o-server-name.
static java.lang.String PROPERTY_DB4O_SERVER_PASSWORD
          Property identifies the Db4o Server password which is db4o-server-password.
static java.lang.String PROPERTY_DB4O_SERVER_PORT
          Property identifies the Db4o Server port which is db4o-server-port.
static java.lang.String PROPERTY_DB4O_SERVER_USERNAME
          Property identifies the Db4o Server user name which is db4o-server-username.
 
Fields inherited from class org.jmonks.batch.framework.repository.db4o.Db4oRepository
DB4O_REPOSITORY_FILENAME, PROPERTY_DB4O_DIRECTORY, repositoryConfigProperties
 
Fields inherited from class org.jmonks.batch.framework.Repository
jobName
 
Constructor Summary
ClientServerDb4oRepository()
          Enables the creation of the ClientServerDb4oRepository instance from the factory method.
 
Method Summary
protected  com.db4o.ObjectContainer createContainer(java.util.Map configProps)
          Creates the container by looking at the configuration from given Map.
protected  void init(java.util.Map configProps)
           Initializes the ClientServerDb4oRepository by accepting the map consist of properties needed to access Db4o server.
 
Methods inherited from class org.jmonks.batch.framework.repository.db4o.Db4oRepository
clearDataTransferredFromThisJob, getDataFromPreviousJob, logStatistics, registerJobMgmtMntrInfo, sendDataToNextJob, unregisterJobMgmtMntrInfo
 
Methods inherited from class org.jmonks.batch.framework.Repository
createRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_DB4O_SERVER_NAME

public static final java.lang.String PROPERTY_DB4O_SERVER_NAME
Property identifies the Db4o Server name which is db4o-server-name.

See Also:
Constant Field Values

PROPERTY_DB4O_SERVER_PORT

public static final java.lang.String PROPERTY_DB4O_SERVER_PORT
Property identifies the Db4o Server port which is db4o-server-port.

See Also:
Constant Field Values

PROPERTY_DB4O_SERVER_USERNAME

public static final java.lang.String PROPERTY_DB4O_SERVER_USERNAME
Property identifies the Db4o Server user name which is db4o-server-username.

See Also:
Constant Field Values

PROPERTY_DB4O_SERVER_PASSWORD

public static final java.lang.String PROPERTY_DB4O_SERVER_PASSWORD
Property identifies the Db4o Server password which is db4o-server-password.

See Also:
Constant Field Values
Constructor Detail

ClientServerDb4oRepository

public ClientServerDb4oRepository()
Enables the creation of the ClientServerDb4oRepository instance from the factory method.

Method Detail

init

protected void init(java.util.Map configProps)

Initializes the ClientServerDb4oRepository by accepting the map consist of properties needed to access Db4o server. This make sure required properties like db4o-server-name, db4o-server-port, db4o-server-username and db4o-server-password have been defined and the value defined for this property is valid.

Overrides:
init in class Db4oRepository
Parameters:
configProps - Map contains the configuration properties.
Throws:
ConfigurationException - If any one of the required properties are not defined and the value specified is invalid.
java.lang.IllegalArgumentException - If given configProps is null.

createContainer

protected com.db4o.ObjectContainer createContainer(java.util.Map configProps)
Description copied from class: Db4oRepository
Creates the container by looking at the configuration from given Map.

Overrides:
createContainer in class Db4oRepository
Returns:
Returns the Db4o object container reference.
See Also:
Db4oRepository.createContainer(Map)