List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:November 1 2007 3:08pm
Subject:Rev 230: Moved ndbj.so static loading code so that it actually works from outside of the package. in http://bazaar.launchpad.net/~ndb-connectors/ndb-c...
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 230
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Thu 2007-11-01 15:07:47 +0000
message:
  Moved ndbj.so static loading code so that it actually works from outside of the package.
modified:
  java/com/mysql/cluster/ndbj/NdbFactory.java
ndbfactory.java-20070517181935-98huwjarzuh25b30-13
  java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
=== modified file 'java/com/mysql/cluster/ndbj/NdbFactory.java'
--- a/java/com/mysql/cluster/ndbj/NdbFactory.java	2007-10-01 19:55:09 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbFactory.java	2007-11-01 15:07:47 +0000
@@ -14,6 +14,16 @@
 {
 		
 
+  static {
+    try {
+      System.loadLibrary("ndbj");
+    } catch (UnsatisfiedLinkError e) {
+      System.err.println("Native code library failed to load. \n" + e);
+      System.exit(1);
+    }
+    ndbj.ndb_init();
+  }
+
     /**
      * This method is one of the first methods typically called in a NDB/J application. 
      * <br>It is a factory method used to create the top-level
NdbClusterConnectionImpl object.

=== modified file 'java/ndbj.i'
--- a/java/ndbj.i	2007-10-31 15:04:37 +0000
+++ b/java/ndbj.i	2007-11-01 15:07:47 +0000
@@ -317,19 +317,6 @@
 %}
 
 
-%pragma(java) modulecode=%{
-  static {
-    try {
-      System.loadLibrary("ndbj");
-    } catch (UnsatisfiedLinkError e) {
-      System.err.println("Native code library failed to load. \n" + e);
-      System.exit(1);
-    }
-    ndbj.ndb_init();
-  }
-%}
-
-
 %typemap(javainterfaces) Ndb_cluster_connection "NdbClusterConnection";
 
 %include "NdbClusterConnection.i"

Thread
Rev 230: Moved ndbj.so static loading code so that it actually works from outside of the package. in http://bazaar.launchpad.net/~ndb-connectors/ndb-c...Monty Taylor1 Nov