Skip to content
This repository
Browse code

Made string converter do round-trip serialization, added read-only op…

…timization to transaction manager

Signed-off-by: gburgett <gordon.burgett@gmail.com>
  • Loading branch information...
commit a397dc06f9e3571df690b4ae4100e8165affb53a 1 parent 7995943
Gordon authored
2  java/XFlat/src/org/xflatdb/xflat/convert/converters/StringConverters.java
@@ -115,7 +115,7 @@ public String convert(Object source) {
115 115 @Override
116 116 public java.text.DateFormat initialValue(){
117 117 //SimpleDateFormat is not thread-safe
118   - return new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
  118 + return new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");
119 119 }
120 120 };
121 121 public static final Converter<String, Date> StringToDateConverter = new Converter<String, Date>(){
6 java/XFlat/src/org/xflatdb/xflat/transaction/ThreadContextTransactionManager.java
@@ -601,12 +601,14 @@ public void revert() {
601 601 throw new IllegalTransactionStateException("Cannot rollback a completed transaction");
602 602 }
603 603
604   - doRevert();
  604 + if(!this.options.getReadOnly()){
  605 + doRevert();
  606 + }
605 607
606 608 fireEvent(TransactionEventObject.REVERTED);
607 609 }
608 610
609   - public void doRevert(){
  611 + protected void doRevert(){
610 612 ThreadContextTransactionManager.this.revert(this.boundEngines, this.id, false);
611 613 }
612 614

0 comments on commit a397dc0

Please sign in to comment.
Something went wrong with that request. Please try again.