abstract protected E treatException(Exception e);
abstract protected Connection getConnection() throws SQLException;
abstract protected void closeConnection(Connection conn) throws SQLException;
public abstract class AppContext{
private static AppContext INSTANCE;
protected AppContext() {
INSTANCE = this;
}
...
public class JeeContext extends AppContext {
..
public class JUnitContext extends AppContext {
...