WebSphere Application Server - Express, Version 6.1   
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows, Windows Vista

             目次と検索結果のパーソナライズ化

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.



関連概念
Java DataBase Connectivity Mediator Service
参照トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 6:25:35 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rdat_sdoserialize.html