[
トップ|
一覧|
単語検索|
最終更新|
バックアップ|
ヘルプ]
- 追加された行はこの色です。
- 削除された行はこの色です。
*[[Jakarta Commons Transaction:http://jakarta.apache.org/commons/transaction/]]
#amazonkey2(jakarta)
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);
~
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.33
HTML convert time to 0.002 sec.