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
A
ConnectionSource
that uses a JDBC connection string, a user name, and a password to call
DriverManager.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
Modifier and TypeClassDescriptionstatic class
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
ConstructorDescriptionDriverManagerConnectionSource
(String driverClassName, String connectionString, String actualConnectionString, char[] userName, char[] password, Property[] properties) -
Method Summary
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 Details
-
DriverManagerConnectionSource
-
-
Method Details
-
newBuilder
@PluginBuilderFactory public static <B extends DriverManagerConnectionSource.Builder<B>> B newBuilder()
-