PureQueryWriterPattern

IBM® Optim™ pureQuery Runtime을 사용하여 데이터베이스에 데이터를 쓰려면 이 패턴을 사용합니다. BDS(Batch Data Stream) 프레임워크는 연결 열기와 닫기의 관리 태스크를 완료합니다.

클래스 지원

PureQueryWriter 클래스는 데이터베이스 연결 열기와 닫기 및 PureQuery 데이터 인터페이스 얻기 및 일괄처리 조작을 구현합니다.

필수 특성

다음 특성은 패턴에 필요합니다.

표 1. 필수 특성. 테이블은 패턴에 필요한 각 특성의 이름과 값을 포함합니다.
특성 이름
PATTERN_IMPL_CLASS PureQueryWriterPattern 인터페이스를 구현하는 클래스
PQ_DATA_BEAN_INTERFACE PureQuery 데이터 Bean 인터페이스
ds_jndi_name 데이터베이스에 액세스하는 데이터 소스의 JNDI(Java™ Naming and Directory Interface) 이름

선택적 특성

다음 특성은 패턴에 대해 선택사항입니다.

표 2. 선택적 특성. 테이블은 패턴에 대한 선택적 각 특성의 이름, 값 및 설명을 포함합니다.
특성 이름 설명
디버그 true 또는 false(기본값은 false) 이 일괄처리 데이터 스트림에 대한 자세한 추적을 사용으로 설정합니다.
DB_SCHEMA 데이터베이스 스키마 이름
EnablePerformanceMeasurement true 또는 false(기본값은 false) GenericXDBatchStep을 사용 중인 경우, 일괄처리 데이터 스트림과 processRecord 메소드에서 소요된 전체 시간을 계산합니다.
force_connection_recycle false 체크포인트 처리 중 연결을 강제로 닫고 다시 엽니다.
Batch_interval 20 일괄처리할 조작의 수

인터페이스 정의

PureQueryWriterPattern 인터페이스 정의는 PureQueryWriterPattern 인터페이스를 지원하기 위해 구현해야 하는 메소드를 표시합니다.

public interface PureQueryWriterPattern {

	public void initialize(Properties props);
	
	/**
   * The parent class passes the record to be written, the data interface, or the data interface
   * user method in order to update the database. The application might use the data interface to
   * run the pureQuery API method for in-line style or the data interface method for annotation style.
   	 * The parent class passes the record to be written and the
	 * Data interface that may be used by the application to execute the pureQuery API method 
   * (for in-line style ) or the Data interface user method ( for annotation style ) in order 
   * to update the database.
	 * @param 
	 * @param record
	 * @return
	 */
	public void writeRecord(Data dataInterface, Object record);
}    

xJCL 예

예는 애플리케이션에서 PureQueryWriterPattern 인터페이스를 구현하는 일괄처리 데이터 스트림을 정의하는 데 사용할 수 있는 xJCL을 표시합니다.

<batch-data-streams>
<bds>
   <logical-name>outputStream</logical-name>
   <props>
 	  <prop name="PATTERN-IMPL-CLASS" value="com.ibm.MyWriterPattern"/>
          <prop name="jdbc_url" value="jdbc:derby:C:\\mysample\\CREDITREPORT"/>
           <prop name="jdbc_driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
          
           <prop name="user_id" value="myid"/>
           <prop name="pswd" value="mypwd"/>
           <prop name="debug" value="true"/>
           <prop name="DB_SCHEMA" value="PQDS"/>
 	        <prop name="PQ_DATA_BEAN_INTERFACE" value="com.ibm..MyEmployeeData"/>
   </props>
 	   <impl-class>com.ibm.websphere.batch.devframework.datastreams.patterns.PureQueryWriter</impl-class>
   </bds>
</batch-data-streams>

주제 유형을 표시하는 아이콘 참조 주제



시간소인 아이콘 마지막 업데이트 날짜: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rgrid_btchpttrn11
파일 이름:rgrid_btchpttrn11.html