Class DriverManagerConnectionSource
- java.lang.Object
-
- org.apache.logging.log4j.core.AbstractLifeCycle
-
- org.apache.logging.log4j.core.appender.db.jdbc.AbstractConnectionSource
-
- org.apache.logging.log4j.core.appender.db.jdbc.AbstractDriverManagerConnectionSource
-
- org.apache.logging.log4j.core.appender.db.jdbc.DriverManagerConnectionSource
-
- All Implemented Interfaces:
ConnectionSource
,LifeCycle
,LifeCycle2
@Plugin(name="DriverManager", category="Core", elementType="connectionSource", printObject=true) public class DriverManagerConnectionSource extends AbstractDriverManagerConnectionSource
AConnectionSource
that uses a JDBC connection string, a user name, and a password to callDriverManager.getConnection(String, String, String)
.This plugin does not provide any connection pooling unless it is available through the connection string and driver itself. This handy to get you off the ground without having to deal with JNDI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DriverManagerConnectionSource.Builder<B extends DriverManagerConnectionSource.Builder<B>>
Builds DriverManagerConnectionSource instances.-
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
-
-
Field Summary
-
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT
-
-
Constructor Summary
Constructors Constructor Description DriverManagerConnectionSource(java.lang.String driverClassName, java.lang.String connectionString, java.lang.String actualConnectionString, char[] userName, char[] password, Property[] properties)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <B extends DriverManagerConnectionSource.Builder<B>>
BnewBuilder()
-
Methods inherited from class org.apache.logging.log4j.core.appender.db.jdbc.AbstractDriverManagerConnectionSource
getActualConnectionString, getConnection, getConnectionString, getDriverClassName, getLogger, getPassword, getProperties, getUserName, loadDriver, loadDriver, toProperties, toString, toString
-
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stop, stop
-
-
-
-
Constructor Detail
-
DriverManagerConnectionSource
public DriverManagerConnectionSource(java.lang.String driverClassName, java.lang.String connectionString, java.lang.String actualConnectionString, char[] userName, char[] password, Property[] properties)
-
-
Method Detail
-
newBuilder
@PluginBuilderFactory public static <B extends DriverManagerConnectionSource.Builder<B>> B newBuilder()
-
-