public class MultiConnectionManager extends Object
| Constructor and Description |
|---|
MultiConnectionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
_removeConnectionManager(Number id) |
protected static void |
_removeConnectionManager(String id) |
void |
clearConnectionManager() |
static void |
commit(Connection con)
This method makes one commit operation of all the connections which are
related to the entry parameter except the connections which belong to the
standard manager.
|
protected static void |
configureDatabaseMultiConnectionManager(NodeList dbMCManagerList) |
static boolean |
configureMultiConnectionManager(String multiConnectionManagerPath) |
static void |
disconnect(Connection con)
All connections that are related to the entry parameter except the
standard one will be disconnected
|
static Connection |
getConnection(String entity,
Connection con,
int id)
Checks if the specified connection belongs to the entity connection
manager.
|
static DatabaseConnectionManager |
getConnectionManager(Number numericId)
Gets the connection manager with the specified numeric identifier
'numericId'.
|
static DatabaseConnectionManager |
getConnectionManager(String id)
Gets the connection manager with the specified identifier 'id'.
|
static DatabaseConnectionManager |
getConnectionManagerForEntity(String entity)
Return the connection manager assigned to the specified entity
|
static String[] |
getConnectionManagerIds()
Gets all connection manager identifiers
|
protected static int |
getDatabaseConnectionManagerListIndex(Object id) |
static DatabaseConnectionManager |
getDefaultConnectionManager()
Return default connection manager.
|
static List |
getGroupConnections(Connection con)
Gets a list with all related connections
|
static OntimizeConnection |
getOntimizeConnection(Connection con,
DatabaseConnectionManager connectionManager)
Gets the Ontimize connection that contains the connection entry
parameter.
|
static String |
getTextValue(Node son) |
protected static boolean |
isOwnerConnectionManager(Connection con,
DatabaseConnectionManager dbcm)
Checks if the specified connection belongs to the connection manager
'dbcm'
|
static void |
removeConnectionManager(Object id) |
static void |
rollback(Connection con)
This method makes one rollback operation of all the connections which are
related to the entry parameter except these that are in the standard
manager.
|
static void |
setAutoCommit(Connection con,
boolean autocommit)
This method makes one commit operation of all the connections which are
related to the entry parameter except the connections which belong to the
standard manager.
|
static void |
setConnectionManager(Number numId,
String id,
DatabaseConnectionManager cm,
ArrayList entities)
Adds a new connection manager to the managers list
|
static void |
setConnectionManager(String id,
DatabaseConnectionManager cm,
ArrayList entities)
Adds a new connection manager to the managers list
|
static void |
setDefaultConnectionManager(DatabaseConnectionManager gC) |
static void |
setLocator(EntityReferenceLocator loc) |
public static final String CONNECTION_MANAGERS
public static final String DATABASE_MULTICONNECTION_MANAGER
public static final String CONNECTION_MANAGER
public static final String DB_PROPERTIES
public static final String AUTONUMERICAL_PROPERTIES
public static final String INITIAL_CONNECTIONS
public static final String CONNECTION_INFO
public static final String ENTITY
public static final String ID
protected static DatabaseConnectionManager defaultConnectionManager
protected static DatabaseConnectionManager[] connectionManagers
protected static ArrayList[] connectionManagerEntities
protected static Number[] connectionMangerNumId
protected static String[] connectionManagerId
protected static Vector connectionsGroup
protected static Hashtable connectionManagerStore
protected static EntityReferenceLocator locator
protected static final String PARAM_ELEMENT
protected static final String NAME_ELEMENT
protected static final String VALUE_ELEMENT
protected static DatabaseMultiConnectionManager dbMCManager
public static String[] getConnectionManagerIds()
public static DatabaseConnectionManager getConnectionManager(String id)
id - public static DatabaseConnectionManager getConnectionManager(Number numericId)
numericId - public static void setDefaultConnectionManager(DatabaseConnectionManager gC)
public static void setConnectionManager(Number numId, String id, DatabaseConnectionManager cm, ArrayList entities) throws IllegalArgumentException
numId - Numeric connection manager identifier.id - Connection manager identifiercm - Connection Manager Objectentities - Entity list that use this connection managerIllegalArgumentExceptionpublic static void setConnectionManager(String id, DatabaseConnectionManager cm, ArrayList entities) throws IllegalArgumentException
id - Connection manager identifiercm - Connection Manager Objectentities - Entity list that use this connection managerIllegalArgumentExceptionpublic static DatabaseConnectionManager getDefaultConnectionManager()
public void clearConnectionManager()
public static void removeConnectionManager(Object id) throws Exception
Exceptionprotected static void _removeConnectionManager(Number id)
protected static void _removeConnectionManager(String id)
protected static int getDatabaseConnectionManagerListIndex(Object id)
public static DatabaseConnectionManager getConnectionManagerForEntity(String entity) throws IllegalArgumentException
entity - IllegalArgumentExceptionprotected static boolean isOwnerConnectionManager(Connection con, DatabaseConnectionManager dbcm)
con - dbcm - public static OntimizeConnection getOntimizeConnection(Connection con, DatabaseConnectionManager connectionManager)
con - connectionManager - public static Connection getConnection(String entity, Connection con, int id)
Checks if the specified connection belongs to the entity connection
manager. If this is true return the same connection, in other case return
a connection to the entity connection manager and relates them. To see
all related connections @see getGroupConnections(Connection)
entity - Entity namecon - Connectionid - public static List getGroupConnections(Connection con)
con - public static void disconnect(Connection con)
All connections that are related to the entry parameter except the standard one will be disconnected
con - public static void setAutoCommit(Connection con, boolean autocommit) throws Exception
This method makes one commit operation of all the connections which are
related to the entry parameter except the connections which belong to the
standard manager.
Warning: If one connection throws one exception during the commit
operation, it is possible that there are connections without realizing
the commit operation.
con - Exceptionpublic static void commit(Connection con) throws Exception
This method makes one commit operation of all the connections which are
related to the entry parameter except the connections which belong to the
standard manager.
Warning: If one connection throws one exception during the commit
operation, it is possible that there are connections without realizing
the commit operation.
con - Exceptionpublic static void rollback(Connection con) throws Exception
This method makes one rollback operation of all the connections which are related to the entry parameter except these that are in the standard manager.
con - Exceptionpublic static void setLocator(EntityReferenceLocator loc)
public static boolean configureMultiConnectionManager(String multiConnectionManagerPath)
protected static void configureDatabaseMultiConnectionManager(NodeList dbMCManagerList) throws Exception
ExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.