OBEROn SDK

com.oberon.ooql.connection
Class ConnectionManager

java.lang.Object
  extended by com.oberon.ooql.connection.ConnectionManager

public class ConnectionManager
extends java.lang.Object

Basic class for establish connection with OBEROn database or RMI/HTTP servers

Version:
5.0

Field Summary
static java.lang.String ADMUSR
          Administrator user name
static java.lang.String appName
          Application name
static java.lang.String build
          OBEROn client current build number
static java.lang.String CONFIG_FILE
          Config File Name
static java.lang.String copyright
          OBEROn copyright text
static java.lang.String credits
          OBEROn credits text
static java.lang.String PROP_APPLICATION
          "application" config property
static java.lang.String PROP_CONNECTIONS
          "connections" config property
static java.lang.String PROP_DEBUG
          "debug" config property
static java.lang.String PROP_JSON
          "json" config property
static java.lang.String PROP_MAILSERVER
          "mailserver" config property
static java.lang.String PROP_OBPWD
          "pwd" config property
static java.lang.String PROP_OBUSR
          "uid" config property
static java.lang.String PROP_SERVERURL
          "serverURL" config property
static java.lang.String PROP_SHOWSQL
          "showSQL" config property
static java.lang.String PROP_SVNURL
          "svn" config property
static java.lang.String PROP_TMPDIR
          "tmpdir" config property
static java.lang.String version
          OBEROn current version
 
Constructor Summary
ConnectionManager()
           
 
Method Summary
static void closeConnections(Application app)
          Close all OBEROn connections
static OBConnection getConnection(Framework framework)
          Get a connection from the connection POOL
static OBConnection getConnection(Framework framework, Application app)
          Get the OBEROn connection from the connection POOL
static java.lang.String getDBBuild()
          Get the OBEROn database current build number
static java.lang.String getUploadDir()
          Get the server-side upload directory
static boolean isConnected()
          Check if the application client is connected to database (directly or indirectly (RMI/HTTP))
static boolean isDBConnection()
          Check if OBEROn connection is direct to DB
static boolean isHTTPConnection()
          Check if OBEROn connection is through an HTTP server
static boolean isRMIConnection()
          Check if OBEROn connection is through an RMI server
static void loadDatabaseProperties(Configuration conf)
          Load the Database configuration Properties from the Configuration
static void loadInternalProperties(Configuration conf, Application app)
          Load Application Properties from the Configuration
static Configuration loadProperties()
          Load Application Properties from the resource Bundle
static void openConnections(Application app)
          Open direct connections with database or RMI/HTTP connections (create a connection POOL) Get the configuration parameters from the input application or from default .ini file
static void openConnections(Configuration conf, Application app)
          Open direct connections with database or RMI/HTTP connections (create a connection POOL)
static void releaseConnection(Framework framework)
          Release the framework connection after the use
static void releaseConnection(OBConnection conn, Framework framework)
          Release the OBEROn connection after the use
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appName

public static final java.lang.String appName
Application name

See Also:
Constant Field Values

version

public static final java.lang.String version
OBEROn current version

See Also:
Constant Field Values

build

public static final java.lang.String build
OBEROn client current build number

See Also:
Constant Field Values

copyright

public static final java.lang.String copyright
OBEROn copyright text

See Also:
Constant Field Values

credits

public static final java.lang.String credits
OBEROn credits text

See Also:
Constant Field Values

CONFIG_FILE

public static final java.lang.String CONFIG_FILE
Config File Name

See Also:
Constant Field Values

ADMUSR

public static final java.lang.String ADMUSR
Administrator user name

See Also:
Constant Field Values

PROP_CONNECTIONS

public static final java.lang.String PROP_CONNECTIONS
"connections" config property

See Also:
Constant Field Values

PROP_DEBUG

public static final java.lang.String PROP_DEBUG
"debug" config property

See Also:
Constant Field Values

PROP_SHOWSQL

public static final java.lang.String PROP_SHOWSQL
"showSQL" config property

See Also:
Constant Field Values

PROP_APPLICATION

public static final java.lang.String PROP_APPLICATION
"application" config property

See Also:
Constant Field Values

PROP_MAILSERVER

public static final java.lang.String PROP_MAILSERVER
"mailserver" config property

See Also:
Constant Field Values

PROP_SERVERURL

public static final java.lang.String PROP_SERVERURL
"serverURL" config property

See Also:
Constant Field Values

PROP_TMPDIR

public static final java.lang.String PROP_TMPDIR
"tmpdir" config property

See Also:
Constant Field Values

PROP_SVNURL

public static final java.lang.String PROP_SVNURL
"svn" config property

See Also:
Constant Field Values

PROP_OBUSR

public static final java.lang.String PROP_OBUSR
"uid" config property

See Also:
Constant Field Values

PROP_OBPWD

public static final java.lang.String PROP_OBPWD
"pwd" config property

See Also:
Constant Field Values

PROP_JSON

public static final java.lang.String PROP_JSON
"json" config property

See Also:
Constant Field Values
Constructor Detail

ConnectionManager

public ConnectionManager()
Method Detail

openConnections

public static void openConnections(Application app)
                            throws java.lang.Exception
Open direct connections with database or RMI/HTTP connections (create a connection POOL) Get the configuration parameters from the input application or from default .ini file

Parameters:
app - the application (can be null)
Throws:
java.lang.Exception

openConnections

public static void openConnections(Configuration conf,
                                   Application app)
                            throws java.lang.Exception
Open direct connections with database or RMI/HTTP connections (create a connection POOL)

Parameters:
conf - configuration parameters
app - the application
Throws:
java.lang.Exception

isDBConnection

public static boolean isDBConnection()
Check if OBEROn connection is direct to DB


isRMIConnection

public static boolean isRMIConnection()
Check if OBEROn connection is through an RMI server


isHTTPConnection

public static boolean isHTTPConnection()
Check if OBEROn connection is through an HTTP server


getConnection

public static OBConnection getConnection(Framework framework)
Get a connection from the connection POOL


getConnection

public static OBConnection getConnection(Framework framework,
                                         Application app)
Get the OBEROn connection from the connection POOL


releaseConnection

public static void releaseConnection(Framework framework)
Release the framework connection after the use


releaseConnection

public static void releaseConnection(OBConnection conn,
                                     Framework framework)
Release the OBEROn connection after the use


closeConnections

public static void closeConnections(Application app)
Close all OBEROn connections

Parameters:
app - the application (can be null)
Since:
4.1

isConnected

public static boolean isConnected()
Check if the application client is connected to database (directly or indirectly (RMI/HTTP))


loadProperties

public static Configuration loadProperties()
                                    throws java.lang.Exception
Load Application Properties from the resource Bundle

Throws:
java.lang.Exception

loadDatabaseProperties

public static void loadDatabaseProperties(Configuration conf)
Load the Database configuration Properties from the Configuration


loadInternalProperties

public static void loadInternalProperties(Configuration conf,
                                          Application app)
Load Application Properties from the Configuration


getDBBuild

public static java.lang.String getDBBuild()
Get the OBEROn database current build number


getUploadDir

public static java.lang.String getUploadDir()
Get the server-side upload directory


OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.