public class AliasConnectionProvider extends Object implements ConnectionProvider<Alias>
Constructor and Description |
---|
AliasConnectionProvider() |
Modifier and Type | Method and Description |
---|---|
protected Connection |
createConnection(Alias alias)
Creates the jdbc connection.
|
protected Connection |
createConnection(Alias alias,
Properties props)
Creates the jdbc connection.
|
ConnectionCallback |
getCallback(Properties props)
Gets the callback.
|
Connection |
getConnection(Alias alias)
Gets the connection.
|
protected Connection |
getJndiConnection(Alias alias)
Gets the database connection using jndi
|
boolean |
isJndiConnection(String url)
Checks if url implies JNDI connection.
|
void |
releaseConnection(Connection con)
Releases connection.
|
public ConnectionCallback getCallback(Properties props) throws Exception
props
- the connection propertiesException
- the exceptionprotected Connection createConnection(Alias alias, Properties props) throws Exception
alias
- the aliasException
- in case of any errorprotected Connection createConnection(Alias alias) throws Exception
alias
- the aliasException
- in case of any errorpublic Connection getConnection(Alias alias) throws Exception
ConnectionProvider
getConnection
in interface ConnectionProvider<Alias>
alias
- the ConnectionParamsException
- in case of any errorprotected Connection getJndiConnection(Alias alias) throws Exception
alias
- the aliasException
- in case of any errorpublic boolean isJndiConnection(String url)
url
- the urlpublic void releaseConnection(Connection con) throws Exception
ConnectionProvider
releaseConnection
in interface ConnectionProvider<Alias>
con
- the jdbc connectionException
- in case of any errorCopyright © 2010-2020 Toolsverse. All Rights Reserved.