JDBC 중개자 직렬화

JDBC DMS에서 생성된 DataGraph는 직렬화되고 파일로 작성되거나 네트워크를 통해 전송할 수 있습니다.

다음 예제는 그래프의 직렬화 및 직렬화 해제를 설명합니다.

// This example assumes the creation of the Customer 
// metadata and the JDBC DMS.

DataObject object = mediator.getGraph();
DataGraph origGraph = object.getDataGraph();
  
FileOutputStream out = new FileOutputStream("test.datagraph");
ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(origGraph);
out.close();

FileInputStream in = new FileInputStream("test.datagraph");
ObjectInputStream oin = new ObjectInputStream(in);
DataGraph graph = (DataGraph) oin.readObject();
DataObject obj = (DataObject) graph.getRootObject();

// Now, the DataObject retrieved from the input stream 
// obj is equal to the original variable object put 
// through the output stream.

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



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