public class JDBCResourceBase extends AbstractDBResourceNoBlocker implements JDBCResource
Modifier and Type | Field and Description |
---|---|
protected javax.sql.DataSource |
dataSource |
static java.lang.String |
DESCRIPTION |
static java.lang.String |
NAME |
lock, multiResourcelock
Constructor and Description |
---|
JDBCResourceBase(JDBCResourceParametersBase parameters) |
Modifier and Type | Method and Description |
---|---|
void |
beginUse() |
void |
closeConnection(java.sql.Connection connection) |
protected void |
connectToDB()
final implementation method to Establish connection to data base
Called from AbstractDBResourceNoBlocker.get() |
protected javax.sql.DataSource |
createDataSource()
Crea el JDBC DataSource a partir de la informacion de los parametros
del recurso.
|
protected void |
debugPoolStatus(java.lang.String src) |
void |
endUse() |
java.sql.Connection |
getJDBCConnection() |
java.lang.String |
getName()
Returns the name of the
Resource . |
JDBCResourceParametersBase |
getParameters()
Returns the resource parameters.
|
java.lang.String |
getStatusInformation() |
protected java.lang.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()
Registra/Carga el driver de JDBC.
|
connect, equals, get, getConnection
execute
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsed
public static final java.lang.String NAME
public static final java.lang.String DESCRIPTION
protected javax.sql.DataSource dataSource
public JDBCResourceBase(JDBCResourceParametersBase parameters) throws InitializeException
InitializeException
protected void registerJDBCDriver() throws InitializeException
InitializeException
protected javax.sql.DataSource createDataSource()
public JDBCResourceParametersBase getParameters()
Resource
getParameters
in interface Resource
getParameters
in interface JDBCResource
getParameters
in class AbstractResource
public java.lang.String getName() throws AccessResourceException
AbstractResource
Resource
.getName
in interface Resource
getName
in interface JDBCResource
getName
in class AbstractResource
AccessResourceException
- if there is an error while accessing the resourcepublic java.sql.Connection getJDBCConnection() throws AccessResourceException
AccessResourceException
public void closeConnection(java.sql.Connection connection)
protected void debugPoolStatus(java.lang.String src)
public java.lang.String getStatusInformation()
getStatusInformation
in interface JDBCResource
protected java.lang.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 interface JDBCResource
isThis
in class AbstractDBResourceNoBlocker
ResourceException
AbstractResource#isThis(ResourceParameters)
public boolean isConnected()
AbstractDBResourceNoBlocker
isConnected
in class AbstractDBResourceNoBlocker
protected void connectToDB() throws DataException
AbstractDBResourceNoBlocker
AbstractDBResourceNoBlocker.get()
connectToDB
in class AbstractDBResourceNoBlocker
DataException
public void beginUse()
public void endUse()