List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 31 2007 4:50pm
Subject:Rev 204: Fixed transaction closing from Callback. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3

------------------------------------------------------------
revno: 204
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Wed 2007-10-31 16:49:20 +0000
message:
  Fixed transaction closing from Callback. 
  Added utility methods on BaseCallback.
  Fixed sizeof() in startTransaction.
modified:
  java/com/mysql/cluster/ndbj/BaseCallback.java
indbcallable.java-20070913212805-mw0t23qijtyjad85-1
  swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
=== modified file 'java/com/mysql/cluster/ndbj/BaseCallback.java'
--- a/java/com/mysql/cluster/ndbj/BaseCallback.java	2007-10-31 15:04:37 +0000
+++ b/java/com/mysql/cluster/ndbj/BaseCallback.java	2007-10-31 16:49:20 +0000
@@ -17,7 +17,9 @@
   protected final void jni_call_callback(int result, long transPtr, long create_time) {
     this.create_time = create_time;
     this.start_time = this.getMicroTime();
-    this.callback(result,new NdbTransactionImpl(transPtr,false));
+    NdbTransactionImpl theTrans = new NdbTransactionImpl(transPtr,false);
+    this.callback(result,theTrans);
+    theTrans.close();
     this.end_time = this.getMicroTime();
   };
 
@@ -37,5 +39,11 @@
 
   public final long getCallbackTime() { 
     return this.end_time - this.start_time; 
-  } 
+  }
+  public final long getCreateTime() { 
+    return this.create_time;
+  }
+  public final long getStartTime() { 
+    return this.start_time; 
+  }
 };

=== modified file 'swig/Ndb.i'
--- a/swig/Ndb.i	2007-10-31 15:27:30 +0000
+++ b/swig/Ndb.i	2007-10-31 16:49:20 +0000
@@ -175,7 +175,7 @@
 
     Ndb::Key_part_ptr keys[2];
     keys[0].ptr=(const void*)&keyData;
-    keys[0].len=sizeof(keyData);
+    keys[0].len=sizeof(short);
     keys[1].ptr=NULL;
     keys[1].len=0; 
 
@@ -188,7 +188,7 @@
 
     Ndb::Key_part_ptr keys[2];
     keys[0].ptr=(const void*)&keyData;
-    keys[0].len=sizeof(keyData);
+    keys[0].len=sizeof(int);
     keys[1].ptr=NULL;
     keys[1].len=0; 
 

Thread
Rev 204: Fixed transaction closing from Callback. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3Monty Taylor31 Oct