1.Store it in a variable
DataSource ds = (DataSource)ctx.getBean("dataSourceBean");
try {
Connection con =ds.getConnection();
con.setAutoCommit(false);
System.out.println("Autocommit " +con.getAutoCommit());
} catch (SQLException e) {
e.printStackTrace();
}
When you call the ds.getConnection() again , you get another connection from pool
2.Change Weblogic DataSource configuration
Auto commit transactions if not explicitly committed or rolledback