flux
Class DatabaseType

java.lang.Object
  extended byflux.DatabaseType
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DatabaseType
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Indicates the kind of database to which engine information is stored.

If the default JDBC driver, the default JDBC URL, an old-style in-memory database JDBC driver, an old-style in-memory database JDBC URL, or a recognized HSQL JDBC driver class name is used in an engine configuration, the database type configuration property is automatically set to DatabaseType.HSQL.

If the database type is set to HSQL, the engine delegates to an HSQL database, version 1.7.2 or greater. The engine itself does not provide any kind of database.

When configuring engines with the HSQL database, do not use HSQL for clustering under any circumstances. HSQL is not robust enough for clustering use. It is an error to cluster engines using HSQL.

Author:
Copyright 2000-2008 Flux Corporation. All rights reserved.
See Also:
Serialized Form

Field Summary
static DatabaseType DB2
          The engine uses DB2-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.
static DatabaseType HSQL
          The engine uses the HSQL database, which supports the READ_UNCOMMITTED transaction isolation mode only and therefore requires specific workarounds.
static DatabaseType MYSQL
          The engine uses the MySQL database, which contains limited functionality and therefore requires specific workarounds.
static DatabaseType ORACLE
          The engine uses Oracle-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.
static DatabaseType SQL_SERVER
          The engine uses SQL Server-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.
static DatabaseType SYBASE
          The engine uses Sybase ASE-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.
static DatabaseType SYBASE_ASA
          The engine uses Sybase ASA-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.
 
Method Summary
 java.lang.Object clone()
          Since DatabaseType is an immutable enumeration, returns this instance of DatabaseType.
static DatabaseType getInstance(java.lang.String enumeration)
          Returns a pre-existing instance of this enumeration from the specified name.
 java.lang.String toString()
          Returns a readable version of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DB2

public static final DatabaseType DB2
The engine uses DB2-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.


HSQL

public static final DatabaseType HSQL
The engine uses the HSQL database, which supports the READ_UNCOMMITTED transaction isolation mode only and therefore requires specific workarounds. When an HSQL in-memory database is used, each engine in each JVM uses a different HSQL in-memory database.

NOTE! Because HSQL's transaction isolation mode support is limited to READ_UNCOMMITED, only one HSQL database transaction can be open at a time. For this reason, if you attempt to open a new database transaction while an existing transaction is open, the new transaction will block until the first one completes.

For example, if a thread retrieves a FlowChartIterator, ForecastElementIterator, MessageIterator, BusinessProcessIterator, or a similar object from an engine, all of which contain a close() method, then that thread could deadlock if it calls a different method on the same engine before calling close() on the retrieved object. This deadlock will occur in HSQL only due to HSQL's transaction isolation mode limitation.

To avoid such deadlocks, simply close these objects before calling another method on the engine.

If the default JDBC driver, the default JDBC URL, an old-style in-memory database JDBC driver, an old-style in-memory database JDBC URL, or a recognized HSQL JDBC driver class name is used in an engine configuration, the database type configuration property is automatically set to DatabaseType.HSQL.

If the database type is set to HSQL, the engine delegates to an HSQL database, version 1.7.2 or greater. The engine itself does not provide any kind of database.

When configuring engines with the HSQL database, do not use HSQL for clustering under any circumstances. HSQL is not robust enough for clustering use. It is an error to cluster engines using HSQL.


MYSQL

public static final DatabaseType MYSQL
The engine uses the MySQL database, which contains limited functionality and therefore requires specific workarounds.


ORACLE

public static final DatabaseType ORACLE
The engine uses Oracle-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.


SQL_SERVER

public static final DatabaseType SQL_SERVER
The engine uses SQL Server-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.


SYBASE

public static final DatabaseType SYBASE
The engine uses Sybase ASE-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.


SYBASE_ASA

public static final DatabaseType SYBASE_ASA
The engine uses Sybase ASA-specific SQL statements to reduce the probability of deadlocks and achieve greater performance.

Method Detail

getInstance

public static DatabaseType getInstance(java.lang.String enumeration)
Returns a pre-existing instance of this enumeration from the specified name.

Parameters:
enumeration - The name of a pre-existing instance of this enumeration.
Returns:
A pre-existing instance of this enumeration from the specified name.
Throws:
java.lang.IllegalArgumentException - If the name of the specified enumeration instance does not exist.

toString

public java.lang.String toString()
Returns a readable version of this object.

Returns:
A readable version of this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Since DatabaseType is an immutable enumeration, returns this instance of DatabaseType.

Returns:
This instance of DatabaseType.
Throws:
java.lang.CloneNotSupportedException - If an error occurs.


© 2000-2008 Flux Corporation. All rights reserved.