|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--org.oreodata.AbstractDataSource | +--org.oreodata.jdbcimpl.JDBCBackedRecordSet | +--org.oreodata.jdbcimpl.JDBCTransactionalDataSource
An oreo transactional data source that wraps a JDBC/SQL
database that supports transactions. The following
parameters can be set in the XML configuration file:
Parameter | Description | Default |
MAX_TRANSACTION_TIMEOUT | how long a transaction can be left idle (in seconds) before it is considered "stale" | 3600 seconds (1 hour) |
NATIVE_TRANSACTION_SUPPORT | Whether the underlying JDBC datasource natively supports transactions. If this is set to "N" then we "fake it". (Note that this is still experimental.) | "Y" |
JDBCBackedRecordSet
,
Serialized FormField Summary |
Fields inherited from class org.oreodata.jdbcimpl.JDBCBackedRecordSet |
checkConcurrentUpdate, defaultRecordType, doubleQuoteLiteral, driverClassName, jdbcURL, maxCacheSize, maxConnections, minConnections, password, pool, userID |
Fields inherited from class org.oreodata.AbstractDataSource |
defaultCharEncoding, lastLogRotation, transactionCount |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
JDBCTransactionalDataSource()
|
Method Summary | |
void |
abortTransaction(java.lang.String txnID)
cancel the transaction associated with the ID |
void |
addDataListener(DataListener dl)
Add a listener that gets notified if ever a record is inserted, updated or deleted. |
void |
commit(java.lang.String txnID)
Commit the transaction that is identified by this txnID |
void |
delete(java.lang.String type,
java.lang.Object key,
java.lang.String txnID)
delete the Record of the given type and primary key taking into account the transaction which this is part of. |
Record |
get(java.lang.String type,
java.lang.Object key,
java.lang.String txnID)
|
Transaction |
getTransaction(java.lang.String txnID)
|
void |
init(java.util.Properties props)
A method that initializes a DataSource with a set of initialization properties. |
void |
insert(Record rec,
java.lang.String txnID)
update the Record taking into account the transaction which this is part of. |
java.lang.String |
newTransaction()
|
void |
removeDataListener(DataListener dl)
Remove a listener that gets notified if ever a record is inserted, updated or deleted. |
protected void |
removeTransaction(java.lang.String txnID)
|
void |
rollback(java.lang.String txnID)
Roll back the transaction |
java.util.List |
select(RecordFilter filter,
java.lang.String txnID)
|
void |
update(Record oldRec,
Record newRec,
java.lang.String txnID)
update the Record taking into account the transaction which this is part of. |
Methods inherited from class org.oreodata.jdbcimpl.JDBCBackedRecordSet |
close, delete, delete, get, getConnection, insert, keys, select, uniqueKey, update, wipeCache |
Methods inherited from class org.oreodata.AbstractDataSource |
fireDataEvent, fireEvents, freeze, freeze, get, getName, handleEvent, keys, lookup, markStale, normalizeKey, reload, reload, select, setFireEvents, setUseXML, useXML, writeElement, writeSnapshot |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.oreodata.OreoDataSource |
close, delete, delete, get, get, getName, insert, keys, keys, lookup, reload, reload, select, select, update, wipeCache, writeElement, writeSnapshot |
Methods inherited from interface org.oreodata.DataListener |
handleEvent |
Constructor Detail |
public JDBCTransactionalDataSource() throws java.io.IOException
Method Detail |
public void init(java.util.Properties props) throws java.io.IOException
OreoDataSource
init
in interface OreoDataSource
init
in class JDBCBackedRecordSet
java.io.IOException
public void update(Record oldRec, Record newRec, java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
update
in interface TransactionalDataSource
java.io.IOException
public Record get(java.lang.String type, java.lang.Object key, java.lang.String txnID) throws java.io.IOException
get
in interface TransactionalDataSource
java.io.IOException
public void rollback(java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
rollback
in interface TransactionalDataSource
java.io.IOException
public void commit(java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
commit
in interface TransactionalDataSource
java.io.IOException
public void insert(Record rec, java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
insert
in interface TransactionalDataSource
java.io.IOException
public void delete(java.lang.String type, java.lang.Object key, java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
delete
in interface TransactionalDataSource
java.io.IOException
public java.lang.String newTransaction() throws java.io.IOException
newTransaction
in interface TransactionalDataSource
java.io.IOException
public void abortTransaction(java.lang.String txnID) throws java.io.IOException
TransactionalDataSource
abortTransaction
in interface TransactionalDataSource
java.io.IOException
protected void removeTransaction(java.lang.String txnID) throws java.io.IOException
java.io.IOException
public java.util.List select(RecordFilter filter, java.lang.String txnID) throws java.io.IOException
select
in interface TransactionalDataSource
java.io.IOException
public Transaction getTransaction(java.lang.String txnID) throws java.io.IOException
getTransaction
in interface TransactionalDataSource
java.io.IOException
public void addDataListener(DataListener dl)
OreoDataSource
addDataListener
in interface OreoDataSource
addDataListener
in class AbstractDataSource
dl
- the listenerpublic void removeDataListener(DataListener dl)
OreoDataSource
removeDataListener
in interface OreoDataSource
removeDataListener
in class AbstractDataSource
dl
- the listener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |