|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.datasource.InformixDataSource
The Informix implementation for DataSources in Excalibur. This uses the
com.informix.jdbcx.IfxConnectionPoolDataSource object. It uses
the following format for configuration (italics mark information you change):
<informix>
<pool-controller init="5" min="5" max="10"/>
<dbname>dbname</dbname>
<servername>servername</servername>
<host port="2000">host</host>
<user>user</user>
<password>password</password>
<tracing>
<jdbc> file="filename" level="level"</jdbc>
<sqli> file="filename" level="level"</sqli>
</tracing>
<informix>
Informix doesn't like the JdbcDataSource Component, so we gave it it's own. Do not use this datasource if you are planning on using your J2EE server's connection pooling.
You must have Informix's JDBC 2.2 or higher jar file, as well as the
extensions jar file (ifxjdbc.jar and ifxjdbcx.jar).
Also, this DataSource requires the Avalon Cadastre package because it uses
the MemoryContext.
The tracing settings optionally enable Informix's tracing support
within the jdbc driver. Note, for this to work, the
ifxjdbc-g.jar and ifxjdbcx-g.jar jar files are
required (the options have no effect when using the non -g jar files).
jdbc tracing enables general logging information about the driver itself. sqli tracing enables logging of native sqli messages sent between the jdbc driver and the database server.
The attribute file specifies where to write tracing information
to, and level specifies the tracing level to be used, as
documented in the Informix JDBC programmers guide.
| Field Summary |
| Fields inherited from interface org.apache.avalon.excalibur.datasource.DataSourceComponent |
ROLE |
| Constructor Summary | |
InformixDataSource()
Set up the system property for the context factory if it hasn't been done already. |
|
| Method Summary | |
void |
configure(Configuration conf)
Set up the Informix driver for direct use. |
java.sql.Connection |
getConnection()
Return an Informix Connection object |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InformixDataSource()
| Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface DataSourceComponentjava.sql.SQLException
public void configure(Configuration conf)
throws ConfigurationException
configure in interface Configurableconf - the class configurations. Must not be null.
ConfigurationException - if an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||