|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.dao.helper.WSJdbcHelper
public class WSJdbcHelper
WebSphere 사용시 WebSphere가 제공하는 DataSource 또는 Connection 객체를 다루기 위한 기능을 제공한다. WebSphere의 DataSource나 Connection 객체는 그것이 감싸고 있는 원래의 DataSource나 Connection 객체를 직접적으로 가져올 수 있는 방법을 제공하지 않으므로, com.ibm.websphere.rsadapter.WSCallHelper 클래스의 jdbcPass() 또는 jdbcCall() 메소드를 사용하여 간접적으로 내부 객체에 접근해야한다.
이 클래스는 WSCallHelper의 메소드들을 Reflection을 사용하여 호출하도록 기능을 제공한다. Reflection을 사용하는 이유는 직접 메소드 호출하는 방식의 코딩은 컴파일 단계에서 WebSphere가 제공하는 JAR 파일을 필요로 하기때문에 이를 피해가기 위해서이다.
| Field Summary | |
|---|---|
static int |
CALLABLE_STATEMENT
|
static int |
CONNECTION
|
static String |
CONSTRUCTOR
|
static int |
DATA_SOURCE
|
static int |
DATABASE_META_DATA
|
static int |
IGNORE
|
static int |
PREPARED_STATEMENT
|
static int |
RESULT_SET
|
static int |
STATEMENT
|
static String |
WSCALLHELPER_CLASSNAME
|
static String |
WSCONNECTION_CLASSNAME
|
static String |
WSDATASOURCE_CLASSNAME
|
| Constructor Summary | |
|---|---|
WSJdbcHelper()
|
|
| Method Summary | |
|---|---|
static boolean |
isWSConnection(Connection con)
주어진 Connection 객체가 WebSphere의 Connection 객체인지 여부를 리턴한다. |
static boolean |
isWSDataSource(DataSource ds)
주어진 DataSource 객체가 WebSphere의 DataSource 객체인지 여부를 리턴한다. |
static Object |
jdbcCall(Class<?> targetType,
Object wrapperObj,
String methodName,
Object[] args,
Class<?>[] types)
WSCallHelper 클래스의 jdbcCall() 메소드를 호출한다. |
static Object |
jdbcPass(Class<?> targetType,
String methodName,
Object[] args,
Class<?>[] types,
int[] unwrap)
WSCallHelper 클래스의 jdbcPass() 메소드를 호출한다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String WSCALLHELPER_CLASSNAME
public static final String WSCONNECTION_CLASSNAME
public static final String WSDATASOURCE_CLASSNAME
public static final int DATA_SOURCE
public static final int CONNECTION
public static final int STATEMENT
public static final int PREPARED_STATEMENT
public static final int CALLABLE_STATEMENT
public static final int RESULT_SET
public static final int DATABASE_META_DATA
public static final String CONSTRUCTOR
public static final int IGNORE
| Constructor Detail |
|---|
public WSJdbcHelper()
| Method Detail |
|---|
public static boolean isWSConnection(Connection con)
con -
public static boolean isWSDataSource(DataSource ds)
con -
public static Object jdbcPass(Class<?> targetType,
String methodName,
Object[] args,
Class<?>[] types,
int[] unwrap)
throws SQLException
targetType - methodName - args - types - unwrap -
SQLException
public static Object jdbcCall(Class<?> targetType,
Object wrapperObj,
String methodName,
Object[] args,
Class<?>[] types)
throws SQLException
targetType - wrapperObj - methodName - args - types -
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||