public class JDBCResource extends AbstractDBResourceNoBlocker
Modifier and Type | Field and Description |
---|---|
protected DataSource |
dataSource |
static String |
DESCRIPTION |
static String |
NAME |
lock, multiResourcelock
Constructor and Description |
---|
JDBCResource(JDBCResourceParameters parameters) |
Modifier and Type | Method and Description |
---|---|
void |
beginUse() |
void |
closeConnection(Connection connection) |
protected void |
connectToDB()
final implementation method to Establish connection to data base
Called from AbstractDBResourceNoBlocker.get() |
protected DataSource |
createDataSource() |
void |
endUse() |
Connection |
getJDBCConnection() |
String |
getName()
Returns the name of the
Resource . |
String |
getStatusInformation() |
protected Object |
getTheConnection()
final implementation method to get a connection to data base
Called from AbstractDBResourceNoBlocker.connect() This method is called with the connection establish |
boolean |
isConnected()
inform if connection to the data base is established
|
boolean |
isThis(ResourceParameters parameters)
Check if parameters is the same for this resource.
|
protected void |
registerJDBCDriver() |
connect, equals, get, getConnection
execute
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getParameters, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsed
public static final String NAME
public static final String DESCRIPTION
protected DataSource dataSource
public JDBCResource(JDBCResourceParameters parameters) throws InitializeException
InitializeException
public String getName() throws AccessResourceException
AbstractResource
Resource
.getName
in interface Resource
getName
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourceprotected void registerJDBCDriver() throws InitializeException
InitializeException
public Connection getJDBCConnection() throws AccessResourceException
AccessResourceException
public void closeConnection(Connection connection)
public String getStatusInformation()
protected Object getTheConnection() throws DataException
AbstractDBResourceNoBlocker
AbstractDBResourceNoBlocker.connect()
getTheConnection
in class AbstractDBResourceNoBlocker
DataException
public boolean isThis(ResourceParameters parameters) throws ResourceException
AbstractDBResourceNoBlocker
isThis
in interface ResourceProvider
isThis
in class AbstractDBResourceNoBlocker
ResourceException
AbstractResource#isThis(ResourceParameters)
public boolean isConnected()
AbstractDBResourceNoBlocker
isConnected
in class AbstractDBResourceNoBlocker
protected DataSource createDataSource()
protected void connectToDB() throws DataException
AbstractDBResourceNoBlocker
AbstractDBResourceNoBlocker.get()
connectToDB
in class AbstractDBResourceNoBlocker
DataException
public void beginUse()
public void endUse()