|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.batch.BatchAdapter
public class BatchAdapter
배치 프로그램을 실행시키기 위한 클래스이다. 실행할 배치 클래스는 실행시 시스템 프로퍼티를 사용하여 다음의 두가지 방식 중 하나를 사용하여 지정한다.
배치 실행 시 ServiceContext로 전달할 내용은 다음과 같은 방법으로 Java의 시스템 프로퍼티를 사용한다.
String userId = getServiceContext().getRole("userid");
배치 프로그램에서 트랜젝션 처리는 WAS에 의존하지 않고 자체적으로 제공하는 DataSource와 Transaction 기능을 사용한다.
| Field Summary | |
|---|---|
static String |
BATCH_SERVICE_CONTAINER_NAME
|
static int |
MAX_BATCH_THREAD
|
static String |
SYSPROP_NAME_CLASS
|
static String |
SYSPROP_NAME_INTERVAL
|
static String |
SYSPROP_NAME_ITERATE
|
static String |
SYSPROP_NAME_LOCKFILE
|
static String |
SYSPROP_NAME_RUNTIME
|
static String |
SYSPROP_NAME_SERVICE
|
static String |
SYSPROP_NAME_THREAD
|
static String |
SYSPROP_NAME_UNTIL
|
| Constructor Summary | |
|---|---|
BatchAdapter()
|
|
| Method Summary | |
|---|---|
protected static ValueObject |
argsToVo(String[] args)
실행 파라메터를 ValueObject로 변환한다. |
protected void |
clearServiceContext()
ServiceContext 정보를 모두 클리어 한다. |
protected BatchLogger |
getBatchLogger()
live configuration 파일에서 "live.batch.logger.class"를 Key로하여 실제 BatchLogger 클래스 명을 얻어와서 BatchLogger 객체를 생성한다. |
protected BatchLogger |
getBatchLogger(ServiceContainer svcContainer)
live configuration 파일에서 "live.batch.logger.service"를 Key로하여 실제 BatchLogger 서비스 명을 얻어와서 BatchLogger 객체를 서비스컨네이너로부터 받는다. |
static void |
main(String[] args)
|
protected static String[] |
parseArgument(String[] args)
명령 파라메터에서 BatchAdapter용 파라메터들을 처리한 후 그것들을 제외한 나머지 파라메터들을 반환한다. |
protected static void |
parseBatchProperties()
|
void |
run()
|
protected ServiceContext |
setServiceContext()
"live.batch." |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BATCH_SERVICE_CONTAINER_NAME
public static final int MAX_BATCH_THREAD
public static final String SYSPROP_NAME_ITERATE
public static final String SYSPROP_NAME_THREAD
public static final String SYSPROP_NAME_RUNTIME
public static final String SYSPROP_NAME_UNTIL
public static final String SYSPROP_NAME_LOCKFILE
public static final String SYSPROP_NAME_INTERVAL
public static final String SYSPROP_NAME_CLASS
public static final String SYSPROP_NAME_SERVICE
| Constructor Detail |
|---|
public BatchAdapter()
| Method Detail |
|---|
public static void main(String[] args)
public void run()
run in interface Runnable
protected BatchLogger getBatchLogger()
throws LiveException
LiveException
protected BatchLogger getBatchLogger(ServiceContainer svcContainer)
throws LiveException
LiveExceptionprotected void clearServiceContext()
protected ServiceContext setServiceContext()
protected static void parseBatchProperties()
throws Exception
Exception
protected static String[] parseArgument(String[] args)
throws Exception
args -
IOException
Exceptionprotected static ValueObject argsToVo(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||