|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lateralnz.simpletrans.TransDataSource
public class TransDataSource
a transaction aware data source, wrapping a 'real' datasource (ensuring that all connections returned are wrapped by a TransConnection)
| Field Summary |
|---|
| Fields inherited from interface org.lateralnz.common.util.Constants |
|---|
AMPERSAND, AND, APPLICATION_X_WWW_FORM_URLENCODED, ASTERISK, AT, BACK_SLASH, CHAR_LEFT_CHEV, CHAR_RIGHT_CHEV, COLON, COMMA, CRLF, DASH, DELETE, DOLLAR, DOT, DOT_CLASS, DOT_JAVA, EIGHT, EMPTY, EQUALS, FALSE, FILE_SEPARATOR, FIVE, FORWARD_SLASH, FOUR, FULLSTOP, HASH, HAT, INSERT, LEFT_BRACE, LEFT_BRACKET, LEFT_CHEV, MAX_LEN_APPCODE, MAX_LEN_APPGROUP, MAX_LEN_MSGCODE, MAX_LEN_MSGTEXT, MINUS_ONE, N, NEWLINE, NINE, NO, NULL_STRING, OFF, ON, ONE, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_WEEK, PATH_SEPARATOR, PERCENT, PIPE, PLUS, QUESTION_MARK, QUOTE, REQUIRED, REQUIRES_NEW, RETURN, RIGHT_BRACE, RIGHT_BRACKET, RIGHT_CHEV, SELECT, SEMICOLON, SEVEN, SINGLE_QUOTE, SIX, SPACE, SQ_LEFT_BRACKET, SQ_RIGHT_BRACKET, SUPPORTS, TEXT_HTML, TEXT_PLAIN, TEXT_XML, THREE, TRUE, TWO, UNDERSCORE, UPDATE, UTF_8, Y, YES, ZERO |
| Constructor Summary | |
|---|---|
TransDataSource(java.lang.String name,
javax.sql.DataSource source)
|
|
| Method Summary | |
|---|---|
java.sql.Connection |
getConnection()
get a connection (see the next getConnection method for more detail) |
java.sql.Connection |
getConnection(java.lang.String str,
java.lang.String str1)
get a jdbc connection -- if the calling thread is in a transaction, then this connection will be wrapped by a TransConnection object, otherwise the base connection is returned NOTE: RequiresNew is -NOT- handled properly at the moment |
int |
getLoginTimeout()
|
java.io.PrintWriter |
getLogWriter()
|
javax.naming.Reference |
getReference()
reference method required so this object can be loaded into a registry |
protected static TransDataSource |
getTransDataSource(java.lang.String name)
helper method for the object factory associated with this class |
void |
setLoginTimeout(int timeout)
|
void |
setLogWriter(java.io.PrintWriter pw)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransDataSource(java.lang.String name,
javax.sql.DataSource source)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected static final TransDataSource getTransDataSource(java.lang.String name)
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException
public java.sql.Connection getConnection(java.lang.String str,
java.lang.String str1)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException
public void setLogWriter(java.io.PrintWriter pw)
throws java.sql.SQLException
setLogWriter in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.setLogWriter(java.io.PrintWriter)
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.getLogWriter()
public void setLoginTimeout(int timeout)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.setLoginTimeout(int)
public int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.DataSourcejava.sql.SQLExceptionDataSource.getLoginTimeout()public javax.naming.Reference getReference()
getReference in interface javax.naming.Referenceable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||