JAVA開発メモ
Commons-Transaction のバックアップ(No.3)
 

[トップ|一覧|単語検索|最終更新|バックアップ|ヘルプ]


PrintWriter printWriter = new PrintWriter(System.out, true); String name = "test"; boolean debug = true; LoggerFacade log = new PrintWriterLogger(printWriter, name, debug); FileResourceManager manager = new FileResourceManager("C:\\tmp\\storeDir", "C:\\tmp\\workDir", false, log); manager.start(); String txId = manager.generatedUniqueTxId(); manager.startTransaction(txId); manager.commitTransaction(txId); manager.rollbackTransaction(txId); String resourceId = "test/test.txt"; manager.createResource(txId, resourceId); OutputStream out = manager.writeResource(txId, resourceId); PrintWriter writer = new PrintWriter(out, true); InputStream in = manager.readResource(txId, resourceId); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); System.out.println(reader.readLine()); manager.deleteResource(txId, resourceId);
トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Modified by MT22(Moriwaki Takashi)

"PukiWiki" 1.3.7 Copyright © 2001,2002,2003 PukiWiki Developers Team. License is GNU/GPL.
Based on "PukiWiki" 1.3 by sng
Powered by PHP 7.4.28

HTML convert time to 0.007 sec.