Class JDBCConnection
- java.lang.Object
-
- hu.icellmobilsoft.roaster.oracle.connection.JDBCConnection
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@Dependent public class JDBCConnection extends Object implements Closeable
Connection container with configuration- Author:
- balazs.joo
-
-
Constructor Summary
Constructors Constructor Description JDBCConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Destroys created ConnectionConnectiongetConnection()Creates connection, using given configurationbooleanisClosed()Check connection is closedJDBCConnectionwithConfig(ManagedDBConfig config)Set configuration
-
-
-
Method Detail
-
getConnection
public Connection getConnection() throws hu.icellmobilsoft.coffee.dto.exception.BaseException
Creates connection, using given configuration- Returns:
- JDBC connection
- Throws:
hu.icellmobilsoft.coffee.dto.exception.BaseException- exception
-
withConfig
public JDBCConnection withConfig(ManagedDBConfig config)
Set configuration- Parameters:
config- configuration- Returns:
- this
-
isClosed
public boolean isClosed()
Check connection is closed- Returns:
- true if connection is null, closed or error by checking
-
close
public void close()
Destroys created Connection- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-