|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbforms.config.DbConnection
public class DbConnection
This class represents datastructures like to following examples:
<dbconnection name = "jdbc/dbformstest" isJndi = "true" />
(in the example above dbforms asumes that the jndi-entry "jdbc/dbformstest" is correctly configured in the application-server's database configuration [i.e. date-sources.xml])
or:
<dbconnection name = "jdbc:poolman://dbformstest" isJndi = "false" class = "com.codestudio.sql.PoolMan" />
(in the example above dbforms asumes that the connectionpool-entry "dbformstest" is correctly configured in the associated connection pool properties file).
As these examples show, the configuration of datasources is beyond the scope of dbforms. That is a task of the underlying applicationserver/jsp-engine!
Constructor Summary | |
---|---|
DbConnection()
Constructor. |
Method Summary | |
---|---|
void |
addPoolProperty(String name,
String prop)
Adds a new pool property - used while parsing XML file |
void |
addProperty(String name,
String prop)
Adds a new property - used while parsing XML file |
String |
getConClass()
Gets the conClass attribute of the DbConnection object |
Connection |
getConnection()
Gets a JDBC connection object. |
Connection |
getConnection(String p_username,
String p_password)
returns a Connection |
String |
getConnectionPoolURL()
Gets the connectionPoolURL attribute of the DbConnection object |
String |
getConnectionProviderClass()
Gets the connectionProviderClass attribute of the DbConnection object |
String |
getContextDataSource()
returns the name of the parameter from context-Scope which contains a DataSource-Object |
String |
getId()
Gets the id attribute of the DbConnection object |
String |
getisJndi()
Description of the Method |
int |
getLoginTimeout()
Always throws a SQLException. |
PrintWriter |
getLogWriter()
Always throws a SQLException. |
String |
getName()
Gets the name attribute of the DbConnection object |
String |
getPassword()
Gets the password attribute of the DbConnection object |
String |
getUsername()
Gets the username attribute of the DbConnection object |
boolean |
isDefaultConnection()
Gets the defaultConnection attribute of the DbConnection object |
void |
setConClass(String conClass)
Sets the conClass attribute of the DbConnection object |
void |
setConnectionPoolURL(String url)
Sets the connectionPoolURL attribute of the DbConnection object |
void |
setConnectionProviderClass(String cpc)
Sets the connectionProviderClass attribute of the DbConnection object |
void |
setContextDataSource(String contextDataSource)
sets the name of the parameter from context-Scope which contains a DataSource-Object |
void |
setDefaultConnection(boolean defaultConnection)
Sets the defaultConnection attribute of the DbConnection object |
void |
setDriverClassName(String driverClassName)
DataSource interface |
void |
setId(String id)
Sets the id attribute of the DbConnection object |
void |
setIsJndi(String isJndi)
Sets the isJndi attribute of the DbConnection object |
void |
setIsPow2(String isPow2)
Sets the isPow2 attribute of the DbConnection object |
void |
setJdbcURL(String jdbcURL)
DOCUMENT ME! |
void |
setLoginTimeout(int seconds)
Always throws a SQLException. |
void |
setLogWriter(PrintWriter out)
Always throws a SQLException. |
void |
setName(String name)
Sets the name attribute of the DbConnection object |
void |
setPassword(String newpass)
Sets the password attribute of the DbConnection object |
void |
setUsername(String newuser)
Sets the username attribute of the DbConnection object |
String |
toString()
Gets the string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DbConnection()
Method Detail |
---|
public void setConClass(String conClass)
conClass
- The new conClass valuepublic String getConClass()
public Connection getConnection()
getConnection
in interface DataSource
public Connection getConnection(String p_username, String p_password) throws SQLException
getConnection
in interface DataSource
username
- DOCUMENT ME!password
- DOCUMENT ME!
SQLException
public void setConnectionPoolURL(String url)
url
- The new connectionPoolURL valuepublic String getConnectionPoolURL()
public void setConnectionProviderClass(String cpc)
cpc
- The new connectionProviderClass valuepublic String getConnectionProviderClass()
public void setContextDataSource(String contextDataSource)
contextDataSource
- public String getContextDataSource()
public void setDefaultConnection(boolean defaultConnection)
defaultConnection
- The new defaultConnection valuepublic boolean isDefaultConnection()
public void setDriverClassName(String driverClassName)
driverClassName
- DOCUMENT ME!public void setId(String id)
id
- The new id valuepublic String getId()
public void setIsJndi(String isJndi)
isJndi
- The new isJndi valuepublic void setIsPow2(String isPow2)
isPow2
- The new isPow2 valuepublic void setJdbcURL(String jdbcURL)
jdbcURL
- DOCUMENT ME!public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface DataSource
out
- DOCUMENT ME!
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface DataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface DataSource
seconds
- DOCUMENT ME!
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface DataSource
SQLException
public void setName(String name)
name
- The new name valuepublic String getName()
public void setPassword(String newpass)
newpass
- The new password valuepublic String getPassword()
public void setUsername(String newuser)
newuser
- The new username valuepublic String getUsername()
public void addPoolProperty(String name, String prop)
prop
- The feature to be added to the PoolProperty attributepublic void addProperty(String name, String prop)
prop
- The feature to be added to the Property attributepublic String getisJndi()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |