Class ConnectionHelper
- java.lang.Object
-
- com.ibm.jbatch.tck.artifacts.chunkartifacts.ConnectionHelper
-
public class ConnectionHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
COUNT_ORDERS
static String
DELETE_ALL_ORDERS
static String
DELETE_INVENTORY
static String
INSERT_INVENTORY
static String
INSERT_ORDER
static String
jndiName
static String
SELECT_INVENTORY
static String
UPDATE_INVENTORY
-
Constructor Summary
Constructors Constructor Description ConnectionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement)
closes connection to DBstatic Connection
getConnection(DataSource dataSource)
static Connection
getConnection(DataSource dataSource, boolean autoCommit)
-
-
-
Field Detail
-
jndiName
public static final String jndiName
- See Also:
- Constant Field Values
-
INSERT_INVENTORY
public static final String INSERT_INVENTORY
- See Also:
- Constant Field Values
-
UPDATE_INVENTORY
public static final String UPDATE_INVENTORY
- See Also:
- Constant Field Values
-
SELECT_INVENTORY
public static final String SELECT_INVENTORY
- See Also:
- Constant Field Values
-
DELETE_INVENTORY
public static final String DELETE_INVENTORY
- See Also:
- Constant Field Values
-
DELETE_ALL_ORDERS
public static final String DELETE_ALL_ORDERS
- See Also:
- Constant Field Values
-
INSERT_ORDER
public static final String INSERT_ORDER
- See Also:
- Constant Field Values
-
COUNT_ORDERS
public static final String COUNT_ORDERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConnection
public static Connection getConnection(DataSource dataSource) throws SQLException
- Throws:
SQLException
-
getConnection
public static Connection getConnection(DataSource dataSource, boolean autoCommit) throws SQLException
- Throws:
SQLException
-
cleanupConnection
public static void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement)
closes connection to DB- Parameters:
conn
- - connection object to closers
- - result set object to closestatement
- - statement object to close
-
-