List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 22 2009 9:08am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:2940)
View as plain text  
#At file:///home/jonas/src/telco-6.4/ based on revid:jonas@strippedmfgf

 2940 Jonas Oreland	2009-06-22 [merge]
      merge 63 to 70

    added:
      storage/ndb/ndbjtie/
      storage/ndb/ndbjtie/Makefile
      storage/ndb/ndbjtie/Makefile.defaults
      storage/ndb/ndbjtie/README.txt
      storage/ndb/ndbjtie/env.properties
      storage/ndb/ndbjtie/src/
      storage/ndb/ndbjtie/src/demo/
      storage/ndb/ndbjtie/src/demo/Makefile
      storage/ndb/ndbjtie/src/demo/demo.cpp
      storage/ndb/ndbjtie/src/demo/demo.hpp
      storage/ndb/ndbjtie/src/demo/demo_test.cpp
      storage/ndb/ndbjtie/src/demoj/
      storage/ndb/ndbjtie/src/demoj/Makefile
      storage/ndb/ndbjtie/src/demoj/demoj/
      storage/ndb/ndbjtie/src/demoj/demoj/A.java
      storage/ndb/ndbjtie/src/demoj/demoj_A.cpp
      storage/ndb/ndbjtie/src/demoj/test/
      storage/ndb/ndbjtie/src/demoj/test/DemojTest.java
      storage/ndb/ndbjtie/src/helpers.hpp
      storage/ndb/ndbjtie/src/jtie/
      storage/ndb/ndbjtie/src/jtie/Makefile
      storage/ndb/ndbjtie/src/jtie/jtie/
      storage/ndb/ndbjtie/src/jtie/jtie/Wrapper.java
      storage/ndb/ndbjtie/src/jtie/jtie_fdefs.h
      storage/ndb/ndbjtie/src/jtie/jtie_gcalls.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray_ext.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_cobject.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_cstring.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue_ext.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_def.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbybb.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval_ext.hpp
      storage/ndb/ndbjtie/src/jtie/jtie_ttrait.hpp
      storage/ndb/ndbjtie/src/myapi/
      storage/ndb/ndbjtie/src/myapi/Makefile
      storage/ndb/ndbjtie/src/myapi/myapi.cpp
      storage/ndb/ndbjtie/src/myapi/myapi.hpp
      storage/ndb/ndbjtie/src/myapi/myapi_test.cpp
      storage/ndb/ndbjtie/src/myjapi/
      storage/ndb/ndbjtie/src/myjapi/Makefile
      storage/ndb/ndbjtie/src/myjapi/myjapi/
      storage/ndb/ndbjtie/src/myjapi/myjapi/A.java
      storage/ndb/ndbjtie/src/myjapi/myjapi/B0.java
      storage/ndb/ndbjtie/src/myjapi/myjapi/B1.java
      storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapi.java
      storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapiCtypes.java
      storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapi.cpp
      storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapiCtypes.cpp
      storage/ndb/ndbjtie/src/myjapi/myjapi_classes.cpp
      storage/ndb/ndbjtie/src/myjapi/test/
      storage/ndb/ndbjtie/src/myjapi/test/MyJapiTest.java
      storage/ndb/ndbjtie/src/ndbjtie/
      storage/ndb/ndbjtie/src/ndbjtie/Makefile
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb.java
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbDictionary.java
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbError.java
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbTransaction.java
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb_cluster_connection.java
      storage/ndb/ndbjtie/src/ndbjtie/ndbjtie_classes.cpp
      storage/ndb/ndbjtie/src/ndbjtie/test/
      storage/ndb/ndbjtie/src/ndbjtie/test/NdbJtieTest.java
    modified:
      storage/ndb/src/ndbapi/Ndb.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/src/ndbapi/NdbImpl.hpp
      storage/ndb/src/ndbapi/Ndbif.cpp
      storage/ndb/src/ndbapi/ndb_internal.hpp
      storage/ndb/tools/restore/consumer_restore.cpp
=== added directory 'storage/ndb/ndbjtie'
=== added file 'storage/ndb/ndbjtie/Makefile'
--- a/storage/ndb/ndbjtie/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/Makefile	2009-06-19 04:54:13 +0000
@@ -0,0 +1,26 @@
+#------------------------------------------------------------------------------
+
+  SRC		= ./src
+
+.PHONY:	all help dep dbg opt prf clean clobber distclean
+all:	dbg
+
+help:
+	@echo "dep		-- build dependencies"
+	@echo "all		-- build all targets with default (debug) flags"
+	@echo "dbg		-- build all targets with debug flags"
+	@echo "opt		-- build all targets with optimizing flags"
+	@echo "prf		-- build all targets with profiling flags"
+	@echo "clean		-- delete temporary files"
+	@echo "clobber		-- delete all temporary files"
+	@echo "distclean	-- delete also backup files"
+
+dep dbg opt prf clean clobber distclean:
+	@cd $(SRC)/demo && $(MAKE) $(MFLAGS) $@
+	@cd $(SRC)/demoj && $(MAKE) $(MFLAGS) $@
+	@cd $(SRC)/myapi && $(MAKE) $(MFLAGS) $@
+	@cd $(SRC)/jtie && $(MAKE) $(MFLAGS) $@
+	@cd $(SRC)/myjapi && $(MAKE) $(MFLAGS) $@
+	@cd $(SRC)/ndbjtie && $(MAKE) $(MFLAGS) $@
+
+#------------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/Makefile.defaults'
--- a/storage/ndb/ndbjtie/Makefile.defaults	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/Makefile.defaults	2009-06-20 21:40:43 +0000
@@ -0,0 +1,299 @@
+#------------------------------------------------------------------------------
+
+# Default Variables Section:
+
+# to avoid problems where SHELL is inherited from the environment
+  SHELL = /bin/sh
+
+######	Target:
+  TARGET_ARCH	=
+
+######	C Preprocessor:
+#  CPP		= cpp
+  CPP		= $(CC) -E
+  CPPFLAGS	= $(DDEFINES) $(INCLUDES)
+
+# gnu ccp:
+# -M Generates make dependencies.
+# -MM Similar to -M, but ignores system header files.
+# -MD Similar to -M, but puts output in a .d file.
+# -MMD Similar to -MD, but ignores system header files.
+# -MG Treats missing header files as generated files.
+  MAKEDEPEND	= $(CPP) -MM
+#  MAKEDEPEND	= makedepend
+
+######	C Compiler:
+
+  CC	   	= gcc
+# plain cc, debug:
+#  CFLAGS	= -g -DDEBUG
+# gnu gcc, general: -pedantic -ansi -std=c89 -std=c99 -std=gnu89 -std=gnu99
+  CFLAGS.gen	= -Wall
+# gnu gcc, default:
+  CFLAGS	= $(CFLAGS.gen) -g -O
+# gnu gcc, debug:
+  CFLAGS.dbg	= $(CFLAGS.gen) -g -DDEBUG
+# gnu gcc, optimize: -funroll-all-loops -fomit-frame-pointer
+  CFLAGS.opt 	= $(CFLAGS.gen) -DNDEBUG -O3
+# gnu gcc, profile:
+  CFLAGS.prf 	= $(CFLAGS.opt) -pg
+
+#  CC	   	= cc
+# Sun cc, debug:
+#  CFLAGS	= -g -v -Xc -DDEBUG
+# Sun cc, optimize:
+#  CFLAGS	= -fast -xO4 -Xc -DNDEBUG
+
+######	C++ Compiler:
+
+  CXX  		= g++
+# gnu g++, general: -pedantic -ansi -std=c++98 -std=gnu++98
+#   -fabi-version=2 -fabi-version=1 -fabi-version=0
+#   -fno-implicit-templates -fno-implicit-inline-templates -frepo
+#   -Weffc++
+#      Unfortunately, -Weffc++ issues broad warnings that cannot be
+#      individually suppressed by -Wno-... (e.g. -Wno-non-virtual-dtor);
+#      therefore, we generally leave out -Weffc++
+#   -Wold-style-cast
+#   -Woverloaded-virtual
+#      Unfortunately, too many warnings from NDB includes
+  CXXFLAGS.gen	= -ansi -Wall -Wstrict-null-sentinel \
+		  -Wsign-promo
+# gnu g++, default:
+  CXXFLAGS	= $(CXXFLAGS.gen) -g -O
+  CXXFLAGS.dbg	= $(CXXFLAGS.gen) -g -DDEBUG
+# gnu g++, optimize: -fomit-frame-pointer
+  CXXFLAGS.opt 	= $(CXXFLAGS.gen) -O3 -DNDEBUG
+# gnu g++, profile:
+  CXXFLAGS.prf 	= $(CXXFLAGS.opt) -pg
+
+#  CXX  	= CC
+# Sun CC, debug: not used: -ptv, particularly -pta !
+#  CXXFLAGS 	= -g +d +w +p -DDEBUG
+# Sun CC, optimize:
+#  CXXFLAGS 	=  -fast -O4 -DNDEBUG
+
+######	Java Compiler:
+
+  JAVAC  	= javac
+  JAVACFLAGS  	= 
+
+  JAVAH  	= javah
+  JAVAHFLAGS  	= -jni -force
+
+  JAVA  	= java
+  JAVAFLAGS  	=
+
+######	Linker:
+#  LD		= ld
+  LD		= $(CC)
+#  LD		= $(CXX)
+# gnu ld, general: -static
+  LDFLAGS.gen	=
+# gnu ld, default:
+  LDFLAGS	= $(LDFLAGS.gen)
+# gnu ld, debug:
+  LDFLAGS.dbg	= $(LDFLAGS.gen)
+# gnu ld, optimize: -s
+  LDFLAGS.opt	= $(LDFLAGS.gen)
+# gnu ld, profile: -S
+  LDFLAGS.prf	= $(LDFLAGS.gen)
+
+# -Bdynamic, -dy, -call_shared
+# link against dynamic libraries.
+
+# -Bstatic, -dn, -non_shared, -static
+# do not link against shared libraries; can be used with -shared;
+# means that a shared library is being created but that all of the
+# library���s external references must be resolved by pulling in
+# entries from static libraries.
+
+# -shared, -Bshareable
+# create a shared library. On SunOS, the linker will automatically
+# create a shared library if the -e option is not used and there are
+# undefined symbols in the link.
+
+# can link some libraries statically and others dynamically:
+#  gcc -o some-program some-program.c -Xlinker
+#      -Bstatic -llib1 -lib2 -Xlinker -Bdynamic -llib3
+
+# to check the dynamic load library: use ldd to invoke executables, which
+# dumps their library dependencies
+#
+# by default (Linux) only /lib and /usr/lib are searched for shared libs;
+# can use -W1, -rpath option when linking or set the LD_LIBRARY_PATH
+# environment variable when running the program
+
+######	Library-Archiver:
+  AR		= ar
+  ARFLAGS	= rv
+#  ARFLAGS	= rvu
+#  RANLIB	= ranlib
+
+# r	insert the files member... into archive (with replacement)
+# u	only insert those files newer than existing members of the same names
+# v	request the verbose version of an operation
+
+# ranlib updates '__.SYMDEF' member (directory of the external symbol names)
+# not needed with GNU ar, which updates the `__.SYMDEF' member automatically
+
+#------------------------------------------------------------------------------
+
+# Default Targets Section:
+
+.PHONY:	dep depend dbg opt prf clean clobber distclean
+
+dep depend:
+	$(MAKEDEPEND) $(CPPFLAGS) $(SRCS) > .tmp
+	mv .tmp .depend
+
+# other options:
+#	for i in $(SRCS);do echo "";$(CXX) -E -MM $(CPPFLAGS) $$i;done > .tmp
+
+dbg:
+	@$(MAKE) $(MFLAGS) \
+		CFLAGS='$(CFLAGS.dbg)' \
+		CXXFLAGS='$(CXXFLAGS.dbg)' \
+		LDFLAGS='$(LDFLAGS.dbg)' \
+		all
+opt:
+	@$(MAKE) $(MFLAGS) \
+		CFLAGS='$(CFLAGS.opt)' \
+		CXXFLAGS='$(CXXFLAGS.opt)' \
+		LDFLAGS='$(LDFLAGS.opt)' \
+		all
+
+prf:
+	@$(MAKE) $(MFLAGS) \
+		CFLAGS='$(CFLAGS.prf)' \
+		CXXFLAGS='$(CXXFLAGS.prf)' \
+		LDFLAGS='$(LDFLAGS.prf)' \
+		all
+
+clean:
+	rm -rf $(CLEAN) .tmp
+
+# library-archiving removes .o files with empty .depend file,
+# so, better delete it only as part of clobber
+clobber:	clean
+	rm -rf $(CLOBBER) .depend
+
+# always need a .depend file
+distclean:	clobber
+	rm -rf $(DISTCLEAN)
+
+#------------------------------------------------------------------------------
+
+# Default Rules Section:
+
+# for Solaris make compatibility check:
+#   http://www.ibm.com/developerworks/eserver/articles/porting_linux/
+
+# good idea to clear&set the suffix list explicitly with only the ones needed
+.SUFFIXES:
+.SUFFIXES: .h .c .cc .cpp .o .a .so .dylib
+
+# use "$<" and "$@", not hardcoded names for `VPATH' to work correctly
+
+# better not use single- or double-suffix rules, for:
+#	".c.o:" == "%.o: %.c"
+#	".c"	== "% : %.c"
+# but:	".c.o: foo.h" != "%.o: %.c foo.h"
+
+######	Compile:
+  COMPILE.c	= $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+
+  COMPILE.cc	= $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+
+  COMPILE.cpp	= $(COMPILE.cc)
+
+  OUTPUT_OPTION	= -o $@
+
+  COMPILE.java	= $(JAVAC) $(JAVACFLAGS) -classpath $(CLASSPATH)
+
+  COMPILE.javah	= $(JAVAH) $(JAVAHFLAGS) -classpath $(CLASSPATH)
+
+%.o: %.c
+	$(COMPILE.c) $(OUTPUT_OPTION) $<
+
+%.o: %.cc
+	$(COMPILE.cc) $(OUTPUT_OPTION) $<
+
+%.o: %.cpp
+	$(COMPILE.cpp) $(OUTPUT_OPTION) $<
+
+%.class: %.java
+	$(COMPILE.java) $<
+
+######	Link:
+  LINK.c	= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
+
+  LINK.cc	= $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
+
+  LINK.cpp	= $(LINK.cc)
+
+  LINK.o	= $(CC) $(LDFLAGS) $(TARGET_ARCH)
+
+%: %.c
+	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+%: %.cc
+	$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+%: %.cpp
+	$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+%: %.o
+	$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+# support shared libraries:
+
+#DLL_SUFFIX=dylib
+#DLL_SUFFIX=so
+DLL_SUFFIX=$(if $(findstring Darwin,$(shell uname)),dylib,so)
+
+# XXX unify shared lib rules in makefile using DLL_FLAGS
+# however, it might be, that .so is/works the same on MacOS X
+ifeq (findstring Darwin,$(shell uname))
+DLL_FLAGS=-fPIC -dynamiclib
+else
+DLL_FLAGS=-fPIC -shared
+endif
+#
+# XXX check against compiler/linker flags descriptions above...
+# GCC man on -fPIC v -fpic:
+# to build shared libraries with -fast, specify -fPIC at compilation
+#   XXX cannot use -fast, not supported on MacOS X gcc
+# Mac OS X: -fpic is not supported, -fPIC is the default
+# SPARC, m68k, PowerPC: -fpic has size limits but faster (?) than -fPIC
+# 386: -fpic (if supported) same (?) performance as -fPIC
+#
+# XXX try:
+#xxx.dylib:
+#	libtool -dynamic -undefined dynamic_lookup -o $@ yyy.o ...
+#
+#xxx.so:
+#	$(LINK.cpp) -shared -o $@ yyy.o ... VERSION
+
+######	Library-Archive:
+
+# general form
+# lib.a: $(OBJ)
+#        $(AR) rvu $@ $<
+#        $(RANLIB) $@
+
+# gnu make has special support for lib(o) targets; this rule
+# (%): %
+#	$(AR) $(ARFLAGS) $@ $<
+# allows to specify lib targets simply as:
+# lib.a: lib.a(a.o b.o ...) lib.a(c.o)...
+#
+# !!! be careful when using parallel make execution and archives !!!
+# If multiple ar commands run at the same time on the same archive file,
+# they will not know about each other and can corrupt the file.
+# May be fixed in future.
+
+(%): %
+	$(AR) $(ARFLAGS) $@ $<
+
+#------------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/README.txt'
--- a/storage/ndb/ndbjtie/README.txt	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/README.txt	2009-06-19 04:54:13 +0000
@@ -0,0 +1,56 @@
+
+NDB JTie -- A Robust Java Wrapper for NDB API
+---------------------------------------------
+
+
+src/
+   demo, demoj		a stand-alone JNI demo
+   jtie			the JTie generic Java wrapper template library
+   myapi,  myjapi	the tests for JTie
+   ndbjtie		the NDB JTie Java wrapper and test for NDB API
+
+
+The demo/demoj (C++/Java) builds and runs independently from JTie & rest.
+
+The jtie subdir has the generic Java wrapper template lib.  (Please, keep
+in mind that this is still a prototype version 0.5, see To Do list below).
+
+The myapi/myjapi is the current test api for jtie and builds/runs
+independently from MySQL Cluster.
+
+The ndbjtie is the NDBAPI wrapper test prototype and builds against the
+NDBAPI headers; the java test program connects to a Cluster (running on the
+default ports), gets an Ndb object, closes everything again and exits.
+
+
+Quick install procedure:
+- edit env.properties for the JAVA and NDBAPI include/lib dependencies
+- run "make dep" to build the dependencies in all subprojects
+- run "make dbg" to build the (debug) binaries in all subprojects
+- in the src/* subprojects, run "make run.test" to run the local test
+
+Questions and comments appreciated.
+martin.zaun@stripped
+
+To Do:
+
+- incorporate design decisions on how to map NDBAPI
+
+- generate and adapt src/ndbjtie/ndbjtie/*.java based on API demarcated by
+  DOXYGEN/NDBJTIE... flags 
+
+- implement NDB JTie function stubs in src/ndbjtie/*.cpp
+
+- expand NDB JTie test in src/ndbjtie/test/*.java
+
+- refactorize generic template lib src/jtie for class mapping redundancies
+
+- expand generic JTie test in src/myapi, src/myjapi
+
+- rename package and directory paths to conventional/meaningful names
+
+- integrate with automake
+
+- integrate with Cluster paths, build system
+
+- 

=== added file 'storage/ndb/ndbjtie/env.properties'
--- a/storage/ndb/ndbjtie/env.properties	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/env.properties	2009-06-19 04:54:13 +0000
@@ -0,0 +1,63 @@
+# ----------------------------------------------------------------------
+

+#
+# The Include Path to the JDK's JNI Header Files
+#
+
+# Must be set & valid for building/running any of the JNI-based subprojects
+
+# MacOS X:
+JAVA_INCLUDEOPTS=-I"/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers"
+
+# Linux:
+#JAVA_INCLUDEOPTS=-I"/usr/lib/jvm/java-6-sun/include" -I"/usr/lib/jvm/java-6-sun/include/linux"
+
+# Comments:
+#
+# - make sure JAVA_INCLUDEOPTS points to the same location from where
+#   javac, javah, and java are being used for building and running
+#
+# - GCC may have its own jni.h in the compiler's standard include directories
+#   as part of the GNU Classpath project, which may get used silently if
+#   JAVA_INCLUDEOPTS is not defined or points to the wrong location
+#
+# - when using a 64-bit Java VM (e.g., JDK 6 on MacOS X), all dynamic
+#   libraries need have been build 64-bit too
+
+# ----------------------------------------------------------------------
+
+#
+# The NDB API Include and Library Paths
+#
+
+# Must be set & valid for building/running the ndbjtie subproject
+
+# MacOS X:
+NDB_INCLUDEOPTS=-I"/Users/mz/bin/mysql-cluster-gpl-6.3.20/include/mysql/storage/ndb" -I"/Users/mz/bin/mysql-cluster-gpl-6.3.20/include/mysql/storage/ndb/ndbapi"
+NDB_LIBDIR=/Users/mz/bin/mysql-cluster-gpl-6.3.20/lib/mysql
+
+# Linux:
+#NDB_INCLUDEOPTS=-I"/home/md/bin/mysql-cluster-gpl-6.3.20/include/mysql/storage/ndb" -I"/home/md/bin/mysql-cluster-gpl-6.3.20/include/mysql/storage/ndb/ndbapi"
+#NDB_LIBDIR=/home/md/bin/mysql-cluster-gpl-6.3.20/lib/mysql
+
+# Comments:
+# - get from here:
+#   http://dev.mysql.com/downloads/cluster
+
+# ----------------------------------------------------------------------
+
+#
+# The "Martin's Little Helpers" Utilities Library (NOT USED AT THIS TIME)
+#
+
+# Must be set & valid for building/running
+# - NdbapiLoad (used with either the Java or C++ Driver)
+
+# DO NOT CHANGE TO OTHER VERSION OF MLH
+#MARTINS_LITTLE_HELPERS=../../martins_little_helpers/src/utils
+
+# Comments:
+# - this "internal" version of MLH matches this CRUND version
+
+# ----------------------------------------------------------------------
+

=== added directory 'storage/ndb/ndbjtie/src'
=== added directory 'storage/ndb/ndbjtie/src/demo'
=== added file 'storage/ndb/ndbjtie/src/demo/Makefile'
--- a/storage/ndb/ndbjtie/src/demo/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demo/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,105 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+
+# preprocessing defines:
+  DDEFINES 	= 
+
+  DELIVERABLES	= libdemo.a libdemo.$(DLL_SUFFIX) demo_test
+
+  CLEAN		= core *.o *.class
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *%
+
+  SRCS		= *.cpp
+
+# currently, not needed:
+#  OBJECTS	= $(SRC:.c=.o)
+#  OBJECTS	+= $(SRC:.cc=.o)
+#  OBJECTS	+= $(SRC:.cpp=.o)
+
+  INCLUDES	= -I. -I.. $(JAVA_INCLUDEOPTS)
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+# CLOCK_GETTIME requires -lrt
+  LDLIBS	=
+#  LDLIBS	= -lrt
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+demo_test:	libdemo.a
+
+libdemo.a:	libdemo.a(demo.o)
+
+libdemo.so:	libdemo.a
+	$(LINK.cpp) \
+	-fPIC -shared \
+	$(LDLIBS) \
+	-o libdemo.so \
+	demo.o \
+	libdemo.a
+
+libdemo.dylib:	libdemo.a
+	$(LINK.cpp) \
+	-fPIC -shared -dynamiclib \
+	$(LDLIBS) \
+	-o libdemo.dylib \
+	demo.o \
+	libdemo.a
+
+#	-Wl,-rpath -Wl,. libdemo.dylib
+# demo.o hrt_stopwatch.o hrt_demo.o
+
+# undefined references to be resolved by LD_LIBRARY_PATH:
+#	libdemo.so
+# or
+#	-L. \
+#	-ldemo \
+# ldd libjnitest.so
+#       libdemo.so => not found
+
+# symbolical references with default library path:
+#
+#	-Wl,-rpath -Wl,/home/md/martins_little_helpers/src/demo \
+# ldd libjnitest.so
+#        libdemo.so => /home/md/martins_little_helpers/src/demo/libdemo.so (0xb7f8d000)
+#
+#	-Wl,-rpath -Wl,. \
+# ldd libjnitest.so
+#        libdemo.so => ./libdemo.so (0xb7edd000)
+
+# statically linked references:
+#	libdemo.a
+# ldd libjnitest.so
+#       ...
+
+dep depend:	
+
+.PHONY: run.test
+run.test:	demo_test
+	./demo_test
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added file 'storage/ndb/ndbjtie/src/demo/demo.cpp'
--- a/storage/ndb/ndbjtie/src/demo/demo.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demo/demo.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * demo.cpp
+ */
+
+#include <cstdio>
+
+#include "demo.hpp"
+#include "helpers.hpp"
+
+A * A::a = new A();
+
+double simple(double p0)
+{
+    TRACE("double simple(double)");
+    printf("    p0 = %f\n", p0);
+    return p0;
+}
+
+// ---------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/src/demo/demo.hpp'
--- a/storage/ndb/ndbjtie/src/demo/demo.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demo/demo.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * demo.hpp
+ */
+
+#ifndef _demo
+#define _demo
+
+#include <cstdio>
+
+#include "helpers.hpp"
+
+extern double simple(double p0);
+
+struct A {
+    static A * a;
+    
+    static void print(const char * p0) {
+        TRACE("void A::print(const char *)");
+        printf("    p0 = %s\n", (p0 == NULL ? "NULL" : p0));
+    };
+
+    static A * getA() {
+        TRACE("A * A::getA()");
+        printf("    A * a = %p\n", a);
+        return a;
+    };
+
+    virtual void print() const {
+        TRACE("void A::print()");
+        printf("    this = %p\n", this);
+    };
+};
+
+#endif // _demo

=== added file 'storage/ndb/ndbjtie/src/demo/demo_test.cpp'
--- a/storage/ndb/ndbjtie/src/demo/demo_test.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demo/demo_test.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * demo_test.cpp
+ */
+
+#include <iostream>
+
+#include "demo.hpp"
+#include "helpers.hpp"
+
+using std::cout;
+using std::endl;
+
+int
+main(int argc, const char* argv[])
+{
+    cout << "--> main()" << endl;
+
+    cout << endl << "calling simple(2.0) ..." << endl;
+    simple(2.0);
+
+    cout << endl << "calling A::print(NULL) ..." << endl;
+    A::print(NULL);
+
+    cout << endl << "calling A::print(\"...\") ..." << endl;
+    A::print("this is a string literal");
+
+    cout << endl << "calling A::getA() ..." << endl;
+    A * a = A::getA();
+
+    cout << endl << "calling a->print() ..." << endl;
+    a->print();
+    
+    cout << endl;
+    cout << "<-- main()" << endl;
+    return 0;
+}

=== added directory 'storage/ndb/ndbjtie/src/demoj'
=== added file 'storage/ndb/ndbjtie/src/demoj/Makefile'
--- a/storage/ndb/ndbjtie/src/demoj/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demoj/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,129 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+
+  JAVA_SRC	= .
+
+  DDEFINES 	= 
+
+  DELIVERABLES	= $(JAVA_SRC)/test/DemojTest.class \
+		libdemoj.a libdemoj.$(DLL_SUFFIX)
+
+  GENERATED_H	= demoj_A.h
+
+  CLEAN		= core *.o *.class $(JAVA_SRC)/*/*.class $(GENERATED_H)
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *% */*~
+
+  SRCS		= *.cpp
+
+  INCLUDES	= -I. -I.. -I../demo $(JAVA_INCLUDEOPTS)
+
+  CLASSPATH	= "."
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+# CLOCK_GETTIME requires -lrt
+  LDLIBS	= -L../demo -ldemo
+#  LDLIBS	= -lrt
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+dep depend:	$(GENERATED_H)
+
+demoj_A.h:	$(JAVA_SRC)/demoj/A.class
+	$(COMPILE.javah) demoj.A
+
+$(JAVA_SRC)/test/DemojTest.class:	$(JAVA_SRC)/test/DemojTest.java \
+		$(JAVA_SRC)/demoj/A.java
+	$(COMPILE.java) $<
+
+libdemoj.a:	libdemoj.a(demoj_A.o)
+
+#
+# Important for libs like $(LDLIBS) to come last!
+#
+
+libdemoj.so:	demoj_Demoj.o ../demo/libdemo.a
+	$(LINK.cpp) \
+	-fPIC -shared \
+	$(LDLIBS) \
+	-o libdemoj.so \
+	demoj_Demoj.o \
+	-Wl,-rpath -Wl,. libdemo.so
+
+#  gcc -I/usr/local/java/include -I/usr/local/java/include/genunix -fPIC -c Happy.c HappyImp.c
+#  gcc -shared -Wl,-soname,libhappy.so.1 -o libhappy.so.1.0 Happy.o HappyImp.o
+
+libdemoj.dylib:	libdemoj.a demoj_A.o ../demo/libdemo.a
+	$(LINK.cpp) \
+	-fPIC -shared -dynamiclib \
+	-o libdemoj.dylib \
+	demoj_A.o \
+	libdemoj.a \
+	../demo/libdemo.a
+
+#	$(LDLIBS)
+
+# sufficient at runtime (statically linked):
+#	../demo/libdemo.a
+
+# not sufficient at runtime (apparently dynamically linked and no path info):
+#	$(LDLIBS)
+
+# doesn't seem to have an effect
+#	-Wl,-rpath -Wl,".:../demo" \
+#	../demo/libdemo.dylib \
+
+# undefined references to be resolved by LD_LIBRARY_PATH:
+#	libdemo.so
+# or
+#	-L. \
+#	-ldemo \
+# ldd libdemoj.so
+#       libdemo.so => not found
+
+# symbolical references with default library path:
+#
+#	-Wl,-rpath -Wl,/home/md/martins_little_helpers/src/demo \
+# ldd libdemoj.so
+#        libdemo.so => /home/md/martins_little_helpers/src/demo/libdemo.so (0xb7f8d000)
+#
+#	-Wl,-rpath -Wl,. \
+# ldd libdemoj.so
+#        libdemo.so => ./libdemo.so (0xb7edd000)
+
+# statically linked references:
+#	libdemo.a
+# ldd libdemoj.so
+#       ...
+
+.PHONY: run.test
+run.test:	$(JAVA_SRC)/test/DemojTest.class
+	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea test.DemojTest
+
+#	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea -Djava.library.path=".:../demo" test.DemojTest
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added directory 'storage/ndb/ndbjtie/src/demoj/demoj'
=== added file 'storage/ndb/ndbjtie/src/demoj/demoj/A.java'
--- a/storage/ndb/ndbjtie/src/demoj/demoj/A.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demoj/demoj/A.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * A.java
+ */
+
+package demoj;
+
+// ---------------------------------------------------------------------------
+// generatable, user-API-dependent Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class A {
+
+    // the address of the C delegate object
+    // this field may me private, access from JNI is still possible
+    private /*final*/ long cdelegate;
+
+    // this c'tor may me protected, access from JNI is still possible
+    protected A(long cdelegate) {
+        this.cdelegate = cdelegate;
+        System.out.println("<-> demoj.A(" + Long.toHexString(cdelegate) + ")");
+    };
+
+    // delegates to: static double A::simple(double p0)
+    static public native double simple(double p0);
+    
+    // delegates to: static void A::print(String p0)
+    static public native void print(String p0);
+    
+    // delegates to: static A A::getA();
+    static public native A getA();
+
+    // delegates to: void A::print()
+    public native void print();
+
+    // equals semantics is defined over cdelegate value only
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!(obj instanceof A))
+            return false;
+        final A wo = (A)obj;
+        return (cdelegate == wo.cdelegate);
+    }
+    
+    // hashcode semantics is defined over cdelegate value only
+    public int hashCode() {
+        // ok to loose precision, since only a hash
+        return (int)cdelegate;
+    }
+
+    // string representation is defined over cdelegate value only
+    public String toString() {
+        return (getClass().getName() + "@" + Long.toHexString(cdelegate));
+    }
+}

=== added file 'storage/ndb/ndbjtie/src/demoj/demoj_A.cpp'
--- a/storage/ndb/ndbjtie/src/demoj/demoj_A.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demoj/demoj_A.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,211 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * demoj_A.cpp
+ */
+
+#include <jni.h>
+#include <cassert>

+#include <cstdio>
+#include "helpers.hpp"
+#include "demo.hpp"
+#include "demoj_A.h"
+
+// ---------------------------------------------------------------------------
+// generatable, application-dependent code: API JNI function stubs
+// ---------------------------------------------------------------------------
+
+// implements demoj.A method: static double simple(double p0)
+// demonstrates the simple case where no type conversions are necessary
+JNIEXPORT jdouble JNICALL
+Java_demoj_A_simple(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("jdouble Java_demoj_A_simple(JNIEnv *, jclass, jdouble)");
+    return simple(p0);
+}
+
+// implements demoj.A method: static void print(String p0)
+// demonstrates a parameter type conversion
+JNIEXPORT void JNICALL
+Java_demoj_A_print__Ljava_lang_String_2(JNIEnv * env, jclass cls, jstring p0)
+{
+    TRACE("void Java_demoj_A_print__Ljava_lang_String_2(JNIEnv *, jclass, jstring)");
+
+    // a status flag indicating any error (!= 0)
+    int s = -1;
+
+    // convert parameter p0 from Java to C
+    jstring j = p0;
+    const char * c = NULL;
+    if (j == NULL) {
+        // ok
+        s = 0;
+    } else {        
+        // get a const UTF-8 string, to be released by ReleaseStringUTFChars()
+        // ignore whether C string is pinned or a copy of Java string
+        c = env->GetStringUTFChars(j, NULL); 
+        if (c == NULL) {
+            // exception pending with VM
+            // only a very limited set of JNI functions may be called
+            // and no other parameter conversions may be attempted
+        } else {
+            // ok
+            s = 0;
+        }
+    }
+    if (s == 0) {
+
+        // convert other parameters (if there were any) from Java to C
+        // ...
+        // if (s == 0) {
+
+        // call the delegate function with converted arguments
+        A::print(c);
+
+        // ...
+        // release resources for other parameters (if there were any)
+
+        // release resources for parameter p0
+        if (c == NULL) {
+            assert(j == NULL);
+        } else {
+            assert(j);
+            // release the UTF-8 string allocated by GetStringUTFChars()
+            env->ReleaseStringUTFChars(j, c);
+        }
+    }    
+}
+
+// implements demoj.A method: static A getA();
+// demonstrates a result type conversion
+JNIEXPORT jobject JNICALL
+Java_demoj_A_getA(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_demoj_A_getA(JNIEnv *, jclass)");
+
+    // call the delegate function
+    A * c = A::getA();
+
+    // convert result from C to Java
+    jobject j = NULL;
+    if (c == NULL) {
+        // ok
+    } else {
+        // get the result class object
+        const char * jicn = "demoj/A";
+        jclass cls = env->FindClass(jicn);
+        if (cls == NULL) {
+            // exception pending
+        } else {
+            // get the method ID for the constructor
+            // XXX optimize: use field access, cache fid/cid
+            jmethodID cid = env->GetMethodID(cls, "<init>", "(J)V");
+            if (cid == NULL) {
+                // exception pending with VM
+                // only a very limited set of JNI functions may be called
+            } else {
+                // convert a pointer into a jlong via intptr_t (C99)
+                //assert (sizeof(jlong) >= sizeof(intptr_t));
+                intptr_t ip = reinterpret_cast< intptr_t >(c);
+                jlong p = ip;
+
+                // construct a Wrapper object
+                jobject jo = env->NewObject(cls, cid, p);
+                if (jo == NULL) {
+                    // exception pending with VM
+                    // only a very limited set of JNI functions may be called
+                } else {
+                    // ok
+                    j = jo;
+                }
+            }
+            env->DeleteLocalRef(cls);
+        }
+    }
+    return j;
+}
+
+// implements demoj.A method: void print()
+// demonstrates a target object type conversion for a member function call
+JNIEXPORT void JNICALL
+Java_demoj_A_print__(JNIEnv * env, jobject obj)
+{
+    TRACE("void Java_demoj_A_print__(JNIEnv *, jobject)");
+
+    // a status flag indicating any error (!= 0)
+    int s = -1;
+
+    // retrieve the C target object for member function call from Java wrapper
+    jobject j = obj;
+    A * c = NULL;
+    if (j == NULL) {
+        // raise exception
+        jclass iae = env->FindClass("java/lang/IllegalArgumentException");
+        if (iae == NULL) {
+            // exception pending with VM
+            // only a very limited set of JNI functions may be called
+            // and no other parameter conversions may be attempted
+        } else {
+            env->ThrowNew(iae,
+                          "JNI wrapper: Java object reference must not be null"
+                          " when target of a member function call"
+                          " (file: " __FILE__ ")");
+            env->DeleteLocalRef(iae);
+            // exception pending with VM
+            // only a very limited set of JNI functions may be called
+            // and no other parameter conversions may be attempted
+        }
+    } else {
+        // get the class object
+        jclass cls = env->FindClass("demoj/A");
+        if (cls == NULL) {
+            // exception pending with VM
+            // only a very limited set of JNI functions may be called
+            // and no other parameter conversions may be attempted
+        } else {
+            // get the field ID
+            // XXX optimize, cache fid
+            jfieldID fid = env->GetFieldID(cls, "cdelegate", "J");
+            if (fid == NULL) {
+                // exception pending with VM
+                // only a very limited set of JNI functions may be called
+                // and no other parameter conversions may be attempted
+            } else {
+                // get the value
+                jlong p = env->GetLongField(j, fid);
+
+                // convert a jlong back into a pointer via intptr_t (C99)
+                //assert (sizeof(jlong) <= sizeof(intptr_t));
+                intptr_t ip = p;
+                c = reinterpret_cast< A * >(ip);
+
+                // ok
+                s = 0;
+            }
+            env->DeleteLocalRef(cls);
+        }
+    }
+    
+    // call the delegate member function on target object
+    if (s == 0) {
+        assert (c);
+        c->print();
+    }
+}
+
+// ---------------------------------------------------------------------------

=== added directory 'storage/ndb/ndbjtie/src/demoj/test'
=== added file 'storage/ndb/ndbjtie/src/demoj/test/DemojTest.java'
--- a/storage/ndb/ndbjtie/src/demoj/test/DemojTest.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/demoj/test/DemojTest.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * DemojTest.java
+ */
+
+package test;
+
+import java.io.PrintWriter;
+
+import demoj.A;
+
+public class DemojTest {
+
+    static protected final PrintWriter out = new PrintWriter(System.out, true);
+    static protected final PrintWriter err = new PrintWriter(System.err, true);
+
+    /**
+     * Loads a dynamically linked system library and reports any failures.
+     */
+    static protected void loadSystemLibrary(String name) {
+        out.print("loading libary ...");
+        out.flush();
+        try {
+            System.loadLibrary(name);
+        } catch (UnsatisfiedLinkError e) {
+            String path;
+            try {
+                path = System.getProperty("java.library.path");
+            } catch (Exception ex) {
+                path = "<exception caught: " + ex.getMessage() + ">";
+            }
+            err.println("failed loading library '"
+                        + name + "'; java.library.path='" + path + "'");
+            throw e;
+        } catch (SecurityException e) {
+            err.println("failed loading library '"
+                        + name + "'; caught exception: " + e);
+            throw e;
+        }
+        out.println("          [" + name + "]");
+    }
+
+
+    static public void test() {
+        out.println("--> DemojTest.test()");
+
+        out.println("\ncalling A.simple()");
+        final double d = A.simple(2.0);
+        out.println("... d = " + d);
+        assert (d == 2.0);
+    
+        out.println("\ncalling A.print(null)...");
+        A.print(null);
+
+        out.println("\ncalling A.print(\"...\")...");
+        A.print("this is a Java ascii string literal");
+
+        out.println("\ncalling A.getA()...");
+        A a = A.getA();
+        out.println("... a = " + a);
+
+        out.println("\ncalling a.print()...");
+        a.print();
+
+        out.println();
+        out.println("<-- DemojTest.test()");
+    };
+
+    static public void main(String[] args) 
+    {
+        out.println("--> DemojTest.main()");
+
+        out.println();
+        loadSystemLibrary("demoj");
+
+        out.println();
+        test();
+
+        out.println();
+        out.println("<-- DemojTest.main()");
+    }
+}

=== added file 'storage/ndb/ndbjtie/src/helpers.hpp'
--- a/storage/ndb/ndbjtie/src/helpers.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/helpers.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * helpers.hpp
+ */
+
+#ifndef helpers_hpp
+#define helpers_hpp
+
+//#include <cstdio>
+#include <cstdlib>
+#include <iostream>
+
+//using namespace std;
+using std::cout;
+using std::endl;
+using std::flush;
+
+/************************************************************
+ * Helper Macros & Functions
+ ************************************************************/
+
+#define ABORT_ERROR(message)                                            \
+    do { cout << "!!! error in " << __FILE__ << ", line: " << __LINE__  \
+              << ", msg: " << message << "." << endl;                   \
+        exit(-1);                                                       \
+    } while (0)
+
+// an output stream for debug messages
+#if DEBUG
+#define CDBG if (0); else cout
+#else
+#define CDBG if (1); else cout
+#endif
+
+// some macros for tracing
+#define ENTER(name)                             \
+    CDBG << "--> " << name << endl;
+
+#define LEAVE(name)                             \
+    CDBG << "<-- " << name << endl;
+
+#define TRACE(name)                             \
+    Tracer _tracer_(name);
+
+// use as:
+// myfunction() {
+//   TRACE("myfunction()");
+//   ...
+// }
+class Tracer
+{
+    const char* const name;
+public:
+    Tracer(const char* name) : name(name) {
+        ENTER(name);
+    }
+
+    ~Tracer() {
+        LEAVE(name);
+    }
+};
+
+#endif // helpers_hpp

=== added directory 'storage/ndb/ndbjtie/src/jtie'
=== added file 'storage/ndb/ndbjtie/src/jtie/Makefile'
--- a/storage/ndb/ndbjtie/src/jtie/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,65 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+
+  JAVA_SRC	= .
+
+# preprocessing defines:
+  DDEFINES 	= 
+
+  DELIVERABLES	= $(JAVA_SRC)/jtie/Wrapper.class
+
+  CLEAN		= core *.o *.class dummy.cpp
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *% */*~
+
+  SRCS		= *.cpp
+
+# currently, not needed:
+#  OBJECTS	= $(SRC:.c=.o)
+#  OBJECTS	+= $(SRC:.cc=.o)
+#  OBJECTS	+= $(SRC:.cpp=.o)
+
+  INCLUDES	= -I. -I.. $(JAVA_INCLUDEOPTS)
+
+  CLASSPATH	= "."
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+# CLOCK_GETTIME requires -lrt
+  LDLIBS	=
+#  LDLIBS	= -lrt
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+$(JAVA_SRC)/jtie/Wrapper.class:	$(JAVA_SRC)/jtie/Wrapper.java
+	$(JAVAC) $(JAVACFLAGS) -classpath $(CLASSPATH) $<
+
+dummy.cpp:
+	touch $@
+
+dep depend:	dummy.cpp
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added directory 'storage/ndb/ndbjtie/src/jtie/jtie'
=== added file 'storage/ndb/ndbjtie/src/jtie/jtie/Wrapper.java'
--- a/storage/ndb/ndbjtie/src/jtie/jtie/Wrapper.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie/Wrapper.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,54 @@
+/*
+ * Wrapper.java
+ */
+
+package jtie;
+
+public class Wrapper {
+
+    // this field may me private, for access from JNI is still possible
+    // XXX should this field be final?
+    // - it may not under the hashcode() and equals() consistency requirement
+    // - it cannot if we want to nullify this field when deleting the
+    //   native delegate object through this instance
+    // - it should not, for we're likely not loosing performance in exchange
+    //   for better, fail-fast robustness
+    // - it might for simplicity; however, we can lessen the increase in
+    //   entropy by a restricted ("stable") delegate lifecycle:
+    //   - attachement happens at construction only, so detachment is a
+    //     one-time effect operation too
+    private /*final*/ long cdelegate;
+
+    // attaches this wrapper instance to the native delegate
+    protected Wrapper(long cdelegate) {
+        this.cdelegate = cdelegate;
+        System.out.println("<-> jtie.Wrapper(" + Long.toHexString(cdelegate) + ")");
+    };
+
+    // detaches this wrapper instance from its native delegate
+    protected void detach() {
+        System.out.println("<-> jtie.Wrapper.detach()");
+        cdelegate = 0L;
+    }
+
+    // equals semantics is defined over cdelegate value only
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!(obj instanceof Wrapper))
+            return false;
+        final Wrapper wo = (Wrapper)obj;
+        return (cdelegate == wo.cdelegate);
+    }
+    
+    // hashcode semantics is defined over cdelegate value only
+    public int hashCode() {
+        // ok to loose precision, since only a hash
+        return (int)cdelegate;
+    }
+
+    // string representation is defined over cdelegate value only
+    public String toString() {
+        return (getClass().getName() + "@" + Long.toHexString(cdelegate));
+    }
+}

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_fdefs.h'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_fdefs.h	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_fdefs.h	2009-06-19 04:54:13 +0000
@@ -0,0 +1,178 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+
+// ---------------------------------------------------------------------------
+// generatable, unrolled macros for parameter handling
+// ---------------------------------------------------------------------------
+
+// template formal parameter list
+#define TFPL(n) typename JP##n, typename CP##n,
+#define TFPL0
+#define TFPL1 TFPL0	TFPL(1)
+#define TFPL2 TFPL1	TFPL(2)
+#define TFPL3 TFPL2	TFPL(3)
+#define TFPL4 TFPL3	TFPL(4)
+#define TFPL5 TFPL4	TFPL(5)
+#define TFPL6 TFPL5	TFPL(6)
+#define TFPL7 TFPL6	TFPL(7)
+#define TFPL8 TFPL7	TFPL(8)
+#define TFPL9 TFPL8	TFPL(9)
+
+//tfpl0: TFPL0
+//tfpl1: TFPL1
+//tfpl3: TFPL3
+
+// C formal parameter list
+#define CFPL(n) CP##n
+#define CFPL0
+#define CFPL1 CFPL0	CFPL(1)
+#define CFPL2 CFPL1,	CFPL(2)
+#define CFPL3 CFPL2,    CFPL(3)
+#define CFPL4 CFPL3,    CFPL(4)
+#define CFPL5 CFPL4,    CFPL(5)
+#define CFPL6 CFPL5,    CFPL(6)
+#define CFPL7 CFPL6,    CFPL(7)
+#define CFPL8 CFPL7,    CFPL(8)
+#define CFPL9 CFPL8,    CFPL(9)
+
+//cfpl0: CFPL0
+//cfpl1: CFPL1
+//cfpl3: CFPL3
+
+// Java formal parameter list
+#define JFPL(n) JP##n jp##n
+#define JFPL0
+#define JFPL1 JFPL0	JFPL(1)
+#define JFPL2 JFPL1,	JFPL(2)
+#define JFPL3 JFPL2,    JFPL(3)
+#define JFPL4 JFPL3,    JFPL(4)
+#define JFPL5 JFPL4,    JFPL(5)
+#define JFPL6 JFPL5,    JFPL(6)
+#define JFPL7 JFPL6,    JFPL(7)
+#define JFPL8 JFPL7,    JFPL(8)
+#define JFPL9 JFPL8,    JFPL(9)
+
+//jfpl0: JFPL0
+//jfpl1: JFPL1
+//jfpl3: JFPL3
+
+// C actual parameter list
+#define CAPL(n) cp##n
+#define CAPL0
+#define CAPL1 CAPL0	CAPL(1)
+#define CAPL2 CAPL1,	CAPL(2)
+#define CAPL3 CAPL2,    CAPL(3)
+#define CAPL4 CAPL3,    CAPL(4)
+#define CAPL5 CAPL4,    CAPL(5)
+#define CAPL6 CAPL5,    CAPL(6)
+#define CAPL7 CAPL6,    CAPL(7)
+#define CAPL8 CAPL7,    CAPL(8)
+#define CAPL9 CAPL8,    CAPL(9)
+
+//capl0: CAPL0
+//capl1: CAPL1
+//capl3: CAPL3
+
+// argument type conversion statements
+#define ATCS(n) CP##n cp##n = jp##n;
+#define ATCS0
+#define ATCS1 ATCS0	ATCS(1)
+#define ATCS2 ATCS1	ATCS(2)
+#define ATCS3 ATCS2	ATCS(3)
+#define ATCS4 ATCS3	ATCS(4)
+#define ATCS5 ATCS4	ATCS(5)
+#define ATCS6 ATCS5	ATCS(6)
+#define ATCS7 ATCS6	ATCS(7)
+#define ATCS8 ATCS7	ATCS(8)
+#define ATCS9 ATCS8	ATCS(9)
+
+//atcs0: ATCS0
+//atcs1: ATCS1
+//atcs3: ATCS3
+
+// ---------------------------------------------------------------------------
+// the "blueprint" macro generating wrapper template function definitions
+// ---------------------------------------------------------------------------
+
+// need two levels of macro expansion
+#define TRACE0(rt, ptl) TRACE( #rt " gcall" #ptl );
+#define TRACE1(rt, ptl) TRACE0( rt, ( ptl ) )
+
+// template function definition
+#define TFD(n)                                  \
+    template< TFRT                              \
+              TFPL##n                           \
+              CFRT F( CFPL##n ) >               \
+    JFRT                                        \
+    gcall( JFPL##n ) {                          \
+        TRACE1( JFRT, JFPL##n )                 \
+        ATCS##n                                 \
+        CFRV F( CAPL##n );                      \
+        RTCS                                    \
+        JFRS                                    \
+    }
+
+// ---------------------------------------------------------------------------
+// issue wrapper template function definitions for void functions
+// ---------------------------------------------------------------------------
+
+//#define TFD3 TFD(0) TFD(1) TFD(2) TFD(3)
+
+// generate void template function definitions
+#define TFRT
+#define JFRT void
+#define CFRT void
+#define CFRV
+#define RTCS
+#define JFRS
+TFD(0)
+TFD(1)
+TFD(2)
+TFD(3)
+#undef TFRT
+#undef JFRT
+#undef CFRT
+#undef CFRV
+#undef RTCS
+#undef JFRS
+
+// ---------------------------------------------------------------------------
+// issue wrapper template function definitions for result returning functions
+// ---------------------------------------------------------------------------
+
+// generate value template function definitions
+#define TFRT typename JR, typename CR,
+#define JFRT JR
+#define CFRT CR
+#define CFRV CR cr =
+#define RTCS JR jr = cr;
+#define JFRS return jr;
+TFD(0)
+TFD(1)
+TFD(2)
+TFD(3)
+#undef TFRT
+#undef JFRT
+#undef CFRT
+#undef CFRV
+#undef RTCS
+#undef JFRS
+
+// ---------------------------------------------------------------------------
+// that's it!
+// ---------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_gcalls.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_gcalls.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_gcalls.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,856 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_gcalls.hpp
+ */
+
+#ifndef jtie_gcalls_hpp
+#define jtie_gcalls_hpp
+
+//#include <cstring>
+//#include "helpers.hpp"
+#include "jtie_ttrait.hpp"
+#include "jtie_tconv_def.hpp"
+#include "jtie_tconv_cobject.hpp"
+
+// ---------------------------------------------------------------------------
+// infrastructure code: generic wrapper function definitions
+// ---------------------------------------------------------------------------
+
+// XXX consider replacing or defaulting 'yyy::CA_t' to 'yyy::CA_t &'
+
+// XXX we must not cast to the C formal type to avoid copy constructing
+// cast< typename OT::CF_t, typename OT::CA_t >(cao)
+// cast< typename P0T::CF_t, typename P0T::CA_t >(cap0)
+// cast< typename P1T::CF_t, typename P1T::CA_t >(cap1)
+// cast< typename P2T::CF_t, typename P2T::CA_t >(cap2)
+// ...
+
+// ---------------------------------------------------------------------------
+// Non-Member Function Calls, No-Return
+// ---------------------------------------------------------------------------
+
+template< void F() >
+inline
+void
+gcall(JNIEnv * env)
+{
+    TRACE("void gcall(JNIEnv *)");
+    F();
+}
+
+template< typename P0T,
+          void F(typename P0T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename P0T::JF_t jfp0)
+{
+    TRACE("void gcall(JNIEnv *, P0T::JF_t)");
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        F(
+            (cap0)
+            );
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+}
+
+template< typename P0T,
+          typename P1T,
+          void F(typename P0T::CF_t,typename P1T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("void gcall(JNIEnv *, P0T::JF_t, P1T::JF_t)");
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+        typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+        if (s == 0) {
+            F(
+                (cap0),
+                (cap1)
+                );
+            Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+        }
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+}
+
+
+template< typename P0T,
+          typename P1T,
+          typename P2T,
+          void F(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("void gcall(JNIEnv *, P0T::JF_t, P1T::JF_t, P2T::JF_t)");
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+        typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+        if (s == 0) {
+            typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+            typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+            if (s == 0) {
+                F(
+                    (cap0),
+                    (cap1),
+                    (cap2)
+                );
+                Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+            }
+            Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+        }
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+}
+
+// ---------------------------------------------------------------------------
+// Non-Member Function Calls, Return
+// ---------------------------------------------------------------------------
+
+template< typename RT,
+          typename RT::CF_t F() >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *)");
+    typename RT::JA_t jar = 0; // init return value to error
+    typename RT::CA_t car = cast< typename RT::CA_t, typename RT::CF_t >(
+        F());
+    jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(car, env);
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename RT,
+          typename P0T,
+          typename RT::CF_t F(typename P0T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename P0T::JF_t jfp0)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, P0T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        typename RT::CA_t car = cast< typename RT::CA_t, typename RT::CF_t >(
+            F(
+                (cap0)
+                ));
+        jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(car, env);
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename RT,
+          typename P0T,
+          typename P1T,
+          typename RT::CF_t F(typename P0T::CF_t,typename P1T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, P0T::JF_t, P1T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+        typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+        if (s == 0) {
+            typename RT::CA_t car = cast< typename RT::CA_t, typename RT::CF_t >(
+                F(
+                    (cap0),
+                    (cap1)
+                    ));
+            jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(car, env);
+            Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+        }
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename RT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          typename RT::CF_t F(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, P0T::JF_t, P1T::JF_t, P2T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+        typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+        if (s == 0) {
+            typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+            typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+            if (s == 0) {
+                typename RT::CA_t car = cast< typename RT::CA_t, typename RT::CF_t >(
+                    F(
+                        (cap0),
+                        (cap1),
+                        (cap2)
+                        ));
+                jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(car, env);
+                Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+            }
+            Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+        }
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+// ---------------------------------------------------------------------------
+// Member Functions
+// ---------------------------------------------------------------------------
+
+// XXX depending upon how target object is hold (by reference or pointer):
+// pointer-to-function-member applied on object:
+//    ((cao).*F)()),
+// pointer-to-function-member applied on pointer-to-object:
+//    ((cao)->*F)()),
+
+// XXX also, check if we can drop the casting of the target object:
+//    jar = (cao.*F)();
+
+// XXX need to duplicate for const/non-const member function arguments:
+//          typename RT::CF_t (OT::CF_t::*F)() >
+//    ...
+//          typename RT::CF_t (OT::CF_t::*F)() const >
+
+// ---------------------------------------------------------------------------
+// Member Function Calls, Const, No-Return
+// ---------------------------------------------------------------------------
+
+template< typename OT,
+          void (OT::CF_t::*F)() const >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        ((cao).*F)(
+            );
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          void (OT::CF_t::*F)(typename P0T::CF_t) const >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            ((cao).*F)(
+                (cap0)
+                );
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          typename P1T,
+          void (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t) const >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P1T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                ((cao).*F)(
+                    (cap0),
+                    (cap1)
+                    );
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          void (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) const >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P2T::JF_t, P2T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+                typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+                if (s == 0) {
+                    ((cao).*F)(
+                        (cap0),
+                        (cap1),
+                        (cap2)
+                        );
+                    Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+                }
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+// ---------------------------------------------------------------------------
+// Member Function Calls, Non-Const, No-Return
+// ---------------------------------------------------------------------------
+
+template< typename OT,
+          void (OT::CF_t::*F)() >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        ((cao).*F)(
+            );
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          void (OT::CF_t::*F)(typename P0T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            ((cao).*F)(
+                (cap0)
+                );
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          typename P1T,
+          void (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P1T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                ((cao).*F)(
+                    (cap0),
+                    (cap1)
+                    );
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+template< typename OT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          void (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) >
+inline
+void
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("void gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P2T::JF_t, P2T::JF_t)");
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+                typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+                if (s == 0) {
+                    ((cao).*F)(
+                        (cap0),
+                        (cap1),
+                        (cap2)
+                        );
+                    Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+                }
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+}
+
+// ---------------------------------------------------------------------------
+// Member Function Calls, Const, Return
+// ---------------------------------------------------------------------------
+
+template< typename OT,
+          typename RT,
+          typename RT::CF_t (OT::CF_t::*F)() const >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+            cast< typename RT::CA_t, typename RT::CF_t >(
+                ((cao).*F)(
+                    )),
+            env);
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t) const >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                cast< typename RT::CA_t, typename RT::CF_t >(
+                    ((cao).*F)(
+                        (cap0)
+                        )),
+                env);
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename P1T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t) const >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P1T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                    cast< typename RT::CA_t, typename RT::CF_t >(
+                        ((cao).*F)(
+                            (cap0),
+                            (cap1)
+                            )),
+                    env);
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) const >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P2T::JF_t, P2T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+                typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+                if (s == 0) {
+                    jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                        cast< typename RT::CA_t, typename RT::CF_t >(
+                            ((cao).*F)(
+                                (cap0),
+                                (cap1),
+                                (cap2)
+                                )),
+                        env);
+                    Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+                }
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+// ---------------------------------------------------------------------------
+// Member Function Calls, Non-Const, Return
+// ---------------------------------------------------------------------------
+

+template< typename OT,
+          typename RT,
+          typename RT::CF_t (OT::CF_t::*F)() >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+            cast< typename RT::CA_t, typename RT::CF_t >(
+                //((cao).*F)(
+                ((cao).*F)(
+                    )),
+            env);
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                cast< typename RT::CA_t, typename RT::CF_t >(
+                    ((cao).*F)(
+                        (cap0)
+                        )),
+                env);
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename P1T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P1T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                    cast< typename RT::CA_t, typename RT::CF_t >(
+                        ((cao).*F)(
+                            (cap0),
+                            (cap1)
+                            )),
+                    env);
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+template< typename OT,
+          typename RT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          typename RT::CF_t (OT::CF_t::*F)(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) >
+inline
+typename RT::JF_t
+gcall(JNIEnv * env, typename OT::JF_t jfo, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("RT::JF_t gcall(JNIEnv *, OT::JF_t, P0T::JF_t, P2T::JF_t, P2T::JF_t)");
+    typename RT::JA_t jar = 0; // init return value to error
+    int s;
+    typename OT::JA_t jao = cast< typename OT::JA_t, typename OT::JF_t >(jfo);
+    typename OT::CA_t cao = Param< typename OT::JA_t, typename OT::CA_t >::convert(s, jao, env);
+    if (s == 0) {
+        typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+        typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+        if (s == 0) {
+            typename P1T::JA_t jap1 = cast< typename P1T::JA_t, typename P1T::JF_t >(jfp1);
+            typename P1T::CA_t cap1 = Param< typename P1T::JA_t, typename P1T::CA_t >::convert(s, jap1, env);
+            if (s == 0) {
+                typename P2T::JA_t jap2 = cast< typename P2T::JA_t, typename P2T::JF_t >(jfp2);
+                typename P2T::CA_t cap2 = Param< typename P2T::JA_t, typename P2T::CA_t >::convert(s, jap2, env);
+                if (s == 0) {
+                    jar = Result< typename RT::JA_t, typename RT::CA_t >::convert(
+                        cast< typename RT::CA_t, typename RT::CF_t >(
+                            ((cao).*F)(
+                                (cap0),
+                                (cap1),
+                                (cap2)
+                                )),
+                        env);
+                    Param< typename P2T::JA_t, typename P2T::CA_t >::release(cap2, jap2, env);
+                }
+                Param< typename P1T::JA_t, typename P1T::CA_t >::release(cap1, jap1, env);
+            }
+            Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        }
+        Param< typename OT::JA_t, typename OT::CA_t >::release(cao, jao, env);
+    }
+    return cast< typename RT::JF_t, typename RT::JA_t >(jar);
+}
+
+// ---------------------------------------------------------------------------
+// Constructor.Destructor Calls
+// ---------------------------------------------------------------------------
+
+template< typename P0T,
+          void F(typename P0T::CF_t) >
+inline
+void
+gdelete(JNIEnv * env, typename P0T::JF_t jfp0)
+{
+    TRACE("void gdelete(JNIEnv *, P0T::JF_t)");
+    int s;
+    typename P0T::JA_t jap0 = cast< typename P0T::JA_t, typename P0T::JF_t >(jfp0);
+    typename P0T::CA_t cap0 = Param< typename P0T::JA_t, typename P0T::CA_t >::convert(s, jap0, env);
+    if (s == 0) {
+        F(
+            (cap0)
+            );
+        Param< typename P0T::JA_t, typename P0T::CA_t >::release(cap0, jap0, env);
+        detachWrapper(jfp0, env);
+    }
+}
+
+template< typename RT,
+          typename RT::CF_t F() >
+inline
+typename RT::JF_t
+gcreate(JNIEnv * env)
+{
+    TRACE("RT::JF_t gcreate(JNIEnv *)");
+    return gcall< RT, F >(env);
+}
+
+template< typename RT,
+          typename P0T,
+          typename RT::CF_t F(typename P0T::CF_t) >
+inline
+typename RT::JF_t
+gcreate(JNIEnv * env, typename P0T::JF_t jfp0)
+{
+    TRACE("RT::JF_t gcreate(JNIEnv *, P0T::JF_t)");
+    return gcall< RT, P0T, F >(env, jfp0);
+}
+
+template< typename RT,
+          typename P0T,
+          typename P1T,
+          typename RT::CF_t F(typename P0T::CF_t,typename P1T::CF_t) >
+inline
+typename RT::JF_t
+gcreate(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1)
+{
+    TRACE("RT::JF_t gcreate(JNIEnv *, P0T::JF_t, P1T::JF_t)");
+    return gcall< RT, P0T, P1T, F >(env, jfp0, jfp1);
+}
+
+template< typename RT,
+          typename P0T,
+          typename P1T,
+          typename P2T,
+          typename RT::CF_t F(typename P0T::CF_t,typename P1T::CF_t,typename P2T::CF_t) >
+inline
+typename RT::JF_t
+gcreate(JNIEnv * env, typename P0T::JF_t jfp0, typename P1T::JF_t jfp1, typename P2T::JF_t jfp2)
+{
+    TRACE("RT::JF_t gcreate(JNIEnv *, P0T::JF_t, P1T::JF_t, P2T::JF_t)");
+    return gcall< RT, P0T, P1T, P2T, F >(env, jfp0, jfp1, jfp2);
+}
+
+// ---------------------------------------------------------------------------
+
+/*
+template< typename JP0, typename CP0,
+          typename JP1, typename CP1,
+          void F(CP0, CP1) >
+inline
+void
+gcall(JNIEnv * env, JP0 jp0, JP1 jp1)
+{
+    TRACE("void gcall(JNIEnv *, JP0, JP1)");
+    CP0 cp0;
+    if (Param< JP0, CP0 >::convert(env, cp0, jp0) == 0) {
+        CP1 cp1;
+        if (Param< JP1, CP1 >::convert(env, cp1, jp1) == 0) {
+            F(cp0, cp1);
+            Param< JP1, CP1 >::release(env, cp1, jp1);
+        }
+        Param< JP0, CP0 >::release(env, cp0, jp0);
+    }
+}
+*/
+
+#endif // jtie_gcalls_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,292 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv.hpp
+ */
+
+#ifndef jtie_tconv_hpp
+#define jtie_tconv_hpp
+
+#include <jni.h>
+#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+
+// XXX misc type mappings -- need to be adapted to new scheme
+
+// ---------------------------------------------------------------------------
+// BigInteger
+// ---------------------------------------------------------------------------
+
+/*
+// returns a value in big endian format
+template<typename C>
+C
+big_endian(C c)
+{
+    // test if big or little endian
+    C r = 1;
+    if(*(char *)&r == 0) {
+        // big endian, ok
+        return c;
+    }
+
+    // little-endian, reverse byte order (better: use optimized swap macros)
+    const size_t n = sizeof(C);
+    char *s = (char *)&c;
+    char *t = (char *)&r;
+    for (int i = n-1, j = 0; i >= 0; i--, j++)
+        t[j] = s[i];
+    return r;
+}
+
+class _j_m_BigInteger {};
+typedef _j_m_BigInteger * j_m_BigInteger;
+
+template< typename I >
+struct Result< j_m_BigInteger, I > {
+    static j_m_BigInteger
+    convert(JNIEnv * env, I const & c) {
+        TRACE("j_m_BigInteger Result.convert(JNIEnv *, I const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_m_BigInteger j = NULL;
+
+        // construct a BigInteger object from a two-complements byte array
+        const jsize n = sizeof(I);
+        jbyteArray ja = env->NewByteArray(n);
+        if (ja != NULL) {
+
+            // ensure the byte array is in the expected big-endian format
+            I cbe = big_endian(c);
+
+            // copy the two's-compliment into the byte array
+            const jbyte * b = reinterpret_cast<const jbyte *>(&cbe);
+            env->SetByteArrayRegion(ja, 0, n, b);
+            if (env->ExceptionCheck() == JNI_OK) {
+
+                // get the BigInteger class object
+                jclass sbClass = env->FindClass("java/math/BigInteger");
+                if (sbClass != NULL) {
+
+                    // get the method ID for the BigInteger(byte[]) constructor
+                    jmethodID cid = env->GetMethodID(sbClass, "<init>",
+                                                     "([B)V");
+                    if (cid != NULL) {
+
+                        // construct a BigInteger object from a byte array
+                        jobject jo = env->NewObject(sbClass, cid, ja);
+                        j = reinterpret_cast< j_m_BigInteger >(jo);
+                    }
+                    env->DeleteLocalRef(sbClass);
+                }
+            }
+            env->DeleteLocalRef(ja);
+        }
+
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+// jstring
+// ---------------------------------------------------------------------------
+
+/*
+template<>
+struct Param< jstring, const char * > {
+    static int
+    convert(JNIEnv * env, const char * & c, jstring const & j) {
+        TRACE("int Param.convert(JNIEnv *, const char * &, jstring const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get a const UTF-8 string, to be released by ReleaseStringUTFChars()
+        c = env->GetStringUTFChars(j, NULL);
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, const char * & c, jstring const & j) {
+        TRACE("void Param.release(JNIEnv *, const char * &, jstring const &)");
+        if (c == NULL) {
+            assert(j == NULL);
+            return;
+        }
+        assert(j);
+
+        // release the UTF-8 string allocated by GetStringUTFChars()
+        env->ReleaseStringUTFChars(j, c);
+    }
+};
+
+template<>
+struct Result< jstring, const char * > {
+    static jstring
+    convert(JNIEnv * env, const char * const & c) {
+        TRACE("jstring Result.convert(JNIEnv *, const char * const &)");
+        if (c == NULL)
+            return NULL;
+
+        // construct a String object from a UTF-8 C string
+        return env->NewStringUTF(c);
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+// StringBuilder
+// ---------------------------------------------------------------------------
+
+/*
+// define char* conversions to/from StringBuilder
+// this type mapping is inefficient due to multiple copying operations
+// but should serve as a more complex example
+
+// defining a new type j_l_StringBuilder as an alias and leads to conflicting
+// declaration errors when instantiating the function templates
+//typedef jobject j_l_StringBuilder;
+
+// defining *j_l_StringBuilder as a subclass of *jobject would rely on
+// type name conventions in the JNI header jni.h
+//class _j_l_StringBuilder : public _jobject {};
+//typedef _j_l_StringBuilder *j_l_StringBuilder;
+
+// so, we define j_l_StringBuilder as unrelated type and apply approriate
+// reinterpret_casts where dealing with jobject
+class _j_l_StringBuilder {};
+typedef _j_l_StringBuilder *j_l_StringBuilder;
+
+template<>
+struct Param< j_l_StringBuilder, char * > {
+    static int
+    convert(JNIEnv * env, char * & c, j_l_StringBuilder const & j) {
+        TRACE("int Param.convert(JNIEnv *, char * &, j_l_StringBuilder const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get the StringBuilder class object
+        jclass sbClass = env->FindClass("java/lang/StringBuilder");
+        if (sbClass != NULL) {
+
+            // get the method ID for the StringBuilder.toString() method
+            jmethodID mid = env->GetMethodID(sbClass, "toString",
+                                             "()Ljava/lang/String;");
+            if (mid != NULL) {
+
+                // get a String from the StringBuilder object
+                jobject jo = reinterpret_cast<jobject>(j);
+                jobject jso = env->CallObjectMethod(jo, mid);
+                if (env->ExceptionCheck() == JNI_OK) {
+
+                    // get length in bytes of String, does not throw exceptions
+                    jstring js = static_cast<jstring>(jso);
+                    const jsize n = env->GetStringUTFLength(js);
+
+                    // allocate C string to hold UTF-8 copy of String
+                    c = new char[n];
+                    if (c != NULL) {
+                        // copy String as UTF-8 into the C target string
+                        env->GetStringUTFRegion(js, 0, n, c);
+                        if (env->ExceptionCheck()) {
+                            // release the C string
+                            delete[] c;
+                            c = NULL;
+                        }
+                        assert(c[n - 1] == '\0');
+                    } else {
+                        // old C++ compilers may not raise an exception
+                        jclass oomec
+                            = env->FindClass("java/lang/OutOfMemoryError");
+                        if (oomec != NULL) {
+                            env->ThrowNew(
+                                oomec,
+                                "JNI wrapper: failed to allocate memory, "
+                                " file: " __FILE__);
+                            env->DeleteLocalRef(oomec);
+                        }
+                    }
+                    env->DeleteLocalRef(jso);
+                }
+            }
+            env->DeleteLocalRef(sbClass);
+        }
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, char * & c, j_l_StringBuilder const & j) {
+        TRACE("void Param.release(JNIEnv *, char * &, j_l_StringBuilder const &)");
+        if (c == NULL) {
+            assert(j == NULL);
+            return;
+        }
+        assert(j);
+
+        // release the C string
+        delete[] c;
+    }
+};
+
+template<>
+struct Result< j_l_StringBuilder, char * > {
+    static j_l_StringBuilder
+    convert(JNIEnv * env, char * const & c) {
+        TRACE("j_l_StringBuilder Result.convert(JNIEnv *, char * const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_l_StringBuilder j = NULL;
+        if (c == NULL)
+            return j;
+
+        // construct a String object from a UTF-8 C string
+        jstring js = env->NewStringUTF(c);
+        if (js != NULL) {
+
+            // get the StringBuilder class object
+            jclass sbClass = env->FindClass("java/lang/StringBuilder");
+            if (sbClass != NULL) {
+
+                // get the method ID for the StringBuilder(String) constructor
+                jmethodID cid = env->GetMethodID(sbClass, "<init>",
+                                                 "(Ljava/lang/String;)V");
+                if (cid != NULL) {
+
+                    // construct a StringBuilder object from a String
+                    jobject jo = env->NewObject(sbClass, cid, js);
+                    j = reinterpret_cast<j_l_StringBuilder>(jo);
+                }
+                env->DeleteLocalRef(sbClass);
+            }
+            env->DeleteLocalRef(js);
+        }
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,188 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_carray.hpp
+ */
+
+#ifndef jtie_tconv_carray_hpp
+#define jtie_tconv_carray_hpp
+
+#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+//#include "jtie_tconv_def.hpp"
+
+// ---------------------------------------------------------------------------
+// Java array <-> C array fixed-size type conversions
+// ---------------------------------------------------------------------------
+
+template< typename C, typename J >
+C *
+GetArrayElements(JNIEnv * env, J j, jboolean * isCopy);
+
+template< typename C, typename J >
+void
+ReleaseArrayElements(JNIEnv * env, J j, C * c, jint mode);
+
+// ---------------------------------------------------------------------------
+
+template<>
+inline bool *
+GetArrayElements(JNIEnv * env, jbooleanArray j, jboolean * isCopy) {
+    return reinterpret_cast< bool * >(env->GetBooleanArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jbooleanArray j, bool * c, jint mode) {
+    env->ReleaseBooleanArrayElements(j, reinterpret_cast< jboolean * >(c), mode);
+}
+
+template<>
+inline char *
+GetArrayElements(JNIEnv * env, jbyteArray j, jboolean * isCopy) {
+    return reinterpret_cast< char * >(env->GetByteArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jbyteArray j, char * c, jint mode) {
+    env->ReleaseByteArrayElements(j, reinterpret_cast< jbyte * >(c), mode);
+}
+
+template<>
+inline int8_t *
+GetArrayElements(JNIEnv * env, jbyteArray j, jboolean * isCopy) {
+    return reinterpret_cast< int8_t * >(env->GetByteArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jbyteArray j, int8_t * c, jint mode) {
+    env->ReleaseByteArrayElements(j, reinterpret_cast< jbyte * >(c), mode);
+}
+
+template<>
+inline uint8_t *
+GetArrayElements(JNIEnv * env, jbyteArray j, jboolean * isCopy) {
+    return reinterpret_cast< uint8_t * >(env->GetByteArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jbyteArray j, uint8_t * c, jint mode) {
+    env->ReleaseByteArrayElements(j, reinterpret_cast< jbyte * >(c), mode);
+}
+
+template<>
+inline int16_t *
+GetArrayElements(JNIEnv * env, jshortArray j, jboolean * isCopy) {
+    return reinterpret_cast< int16_t * >(env->GetShortArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jshortArray j, int16_t * c, jint mode) {
+    env->ReleaseShortArrayElements(j, reinterpret_cast< jshort * >(c), mode);
+}
+
+template<>
+inline uint16_t *
+GetArrayElements(JNIEnv * env, jshortArray j, jboolean * isCopy) {
+    return reinterpret_cast< uint16_t * >(env->GetShortArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jshortArray j, uint16_t * c, jint mode) {
+    env->ReleaseShortArrayElements(j, reinterpret_cast< jshort * >(c), mode);
+}
+
+template<>
+inline int32_t *
+GetArrayElements(JNIEnv * env, jintArray j, jboolean * isCopy) {
+    return reinterpret_cast< int32_t * >(env->GetIntArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jintArray j, int32_t * c, jint mode) {
+    env->ReleaseIntArrayElements(j, reinterpret_cast< jint * >(c), mode);
+}
+
+template<>
+inline uint32_t *
+GetArrayElements(JNIEnv * env, jintArray j, jboolean * isCopy) {
+    return reinterpret_cast< uint32_t * >(env->GetIntArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jintArray j, uint32_t * c, jint mode) {
+    env->ReleaseIntArrayElements(j, reinterpret_cast< jint * >(c), mode);
+}
+
+template<>
+inline int64_t *
+GetArrayElements(JNIEnv * env, jlongArray j, jboolean * isCopy) {
+    return reinterpret_cast< int64_t * >(env->GetLongArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jlongArray j, int64_t * c, jint mode) {
+    env->ReleaseLongArrayElements(j, reinterpret_cast< jlong * >(c), mode);
+}
+
+template<>
+inline uint64_t *
+GetArrayElements(JNIEnv * env, jlongArray j, jboolean * isCopy) {
+    return reinterpret_cast< uint64_t * >(env->GetLongArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jlongArray j, uint64_t * c, jint mode) {
+    env->ReleaseLongArrayElements(j, reinterpret_cast< jlong * >(c), mode);
+}
+
+template<>
+inline float *
+GetArrayElements(JNIEnv * env, jfloatArray j, jboolean * isCopy) {
+    return reinterpret_cast< float * >(env->GetFloatArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jfloatArray j, float * c, jint mode) {
+    env->ReleaseFloatArrayElements(j, reinterpret_cast< jfloat * >(c), mode);
+}
+
+template<>
+inline double *
+GetArrayElements(JNIEnv * env, jdoubleArray j, jboolean * isCopy) {
+    return reinterpret_cast< double * >(env->GetDoubleArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jdoubleArray j, double * c, jint mode) {
+    env->ReleaseDoubleArrayElements(j, reinterpret_cast< jdouble * >(c), mode);
+}
+
+#endif // jtie_tconv_carray_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray_ext.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray_ext.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_carray_ext.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_carray_ext.hpp
+ */
+
+#ifndef jtie_tconv_carray_ext_hpp
+#define jtie_tconv_carray_ext_hpp
+
+#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+//#include "jtie_tconv_def.hpp"
+#include "jtie_tconv_carray.hpp"
+
+// ---------------------------------------------------------------------------
+// platform-dependent Java array <-> C array conversions
+// ---------------------------------------------------------------------------
+
+template<>
+inline signed long *
+GetArrayElements(JNIEnv * env, jintArray j, jboolean * isCopy) {
+    return reinterpret_cast< signed long * >(env->GetIntArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jintArray j, signed long * c, jint mode) {
+    env->ReleaseIntArrayElements(j, reinterpret_cast< jint * >(c), mode);
+}
+
+template<>
+inline unsigned long *
+GetArrayElements(JNIEnv * env, jintArray j, jboolean * isCopy) {
+    return reinterpret_cast< unsigned long * >(env->GetIntArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jintArray j, unsigned long * c, jint mode) {
+    env->ReleaseIntArrayElements(j, reinterpret_cast< jint * >(c), mode);
+}
+
+template<>
+inline long double *
+GetArrayElements(JNIEnv * env, jintArray j, jboolean * isCopy) {
+    return reinterpret_cast< long double * >(env->GetIntArrayElements(j, isCopy));
+}
+
+template<>
+inline void
+ReleaseArrayElements(JNIEnv * env, jintArray j, long double * c, jint mode) {
+    env->ReleaseIntArrayElements(j, reinterpret_cast< jint * >(c), mode);
+}
+
+#endif // jtie_tconv_carray_ext_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_cobject.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cobject.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cobject.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,281 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_cobject.hpp
+ */
+
+#ifndef jtie_tconv_cobject_hpp
+#define jtie_tconv_cobject_hpp
+
+#include <stdint.h>
+#include <cstdio>
+#include <cassert>
+#include <jni.h>
+//#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+
+// ---------------------------------------------------------------------------
+// Java object <-> C object type conversions
+// ---------------------------------------------------------------------------
+
+/*
+// partial specialization not allowed for function templates...
+
+// a function template for simple type adjustments by casts
+template< typename T >
+inline T &
+cast< T, T * >(T * t) {
+    TRACE("T & cast(T *)");
+    return *t; // type conversions supported by C++
+}
+
+// this doesn't match A& <- A* either:
+
+// a function template for simple type adjustments by casts
+template< typename T, typename S >
+inline T &
+cast(S * s) {
+    TRACE("T & cast(S *)");
+    return *s; // type conversions supported by C++
+}
+*/
+
+inline void
+detachWrapper(jobject jo, JNIEnv * env) {
+    // XXX OPTIMIZE: use field access instead of method call
+    // XXX optimize, cache mid
+    // get the class object
+    jclass cls = env->FindClass("jtie/Wrapper");
+    if (cls == NULL) {
+        // exception pending
+    } else {
+        // get the method ID
+        jmethodID mid = env->GetMethodID(cls, "detach", "()V");
+        if (mid == NULL) {
+            // exception pending
+        } else {
+            env->CallVoidMethod(jo, mid);
+            if (env->ExceptionCheck() != JNI_OK) {
+                // exception pending
+            } else {
+                // ok
+            }
+        }
+        env->DeleteLocalRef(cls);
+    }
+}
+
+template< typename C >
+struct Param< jobject, C & > {
+    static C &
+    convert(cstatus & s, jobject j, JNIEnv * env) {
+        TRACE("C & Param.convert(cstatus &, jobject, JNIEnv *)");
+        s = -1; // init to error
+        C * c = NULL;
+
+        if (j == NULL) {
+            // raise exception
+            jclass iae = env->FindClass("java/lang/IllegalArgumentException");
+            if (iae == NULL) {
+                // exception pending
+            } else {
+                env->ThrowNew(iae,
+                              "JNI wrapper: Java argument must not be null"
+                              " when mapped to a C reference"
+                              " (file: " __FILE__ ")");
+                env->DeleteLocalRef(iae);
+                // exception pending
+            }
+        } else {
+            // sets status
+            c = Param< jobject, C * >::convert(s, j, env);
+        }
+
+        return *c;
+    };
+
+    static void
+    release(C & c, jobject j, JNIEnv * env) {
+        TRACE("void Param.release(C &, jobject, JNIEnv *)");
+        Param< jobject, C * >::release(&c, j, env);
+    };
+};
+
+template< typename C >
+struct Param< jobject, C * > {
+    static C *
+    convert(cstatus & s, jobject j, JNIEnv * env) {
+        TRACE("C * Param.convert(cstatus &, jobject, JNIEnv *)");        
+        s = -1; // init to error
+        C * c = NULL;
+
+        if (j == NULL) {
+            // ok
+            s = 0;
+        } else {
+            // XXX OPTIMIZE: use field access instead of method call
+            // XXX optimize, cache fid
+            // get the class object
+            jclass cls = env->FindClass("jtie/Wrapper");
+            if (cls == NULL) {
+                // exception pending
+            } else {
+                // get the field ID
+                jfieldID fid = env->GetFieldID(cls, "cdelegate", "J");
+                if (fid == NULL) {
+                    // exception pending
+                } else {
+                    // get the value
+                    jlong p = env->GetLongField(j, fid);
+                    // i/o problems with gcc 4.4.0 printing a number
+                    //cout << "p = " << p << endl;
+                    //printf("    c = %lx\n", (unsigned long)p);
+
+                    // convert a jlong back into a pointer via intptr_t (C99)
+                    //assert (sizeof(jlong) <= sizeof(intptr_t));
+                    intptr_t ip = p;
+                    c = reinterpret_cast< C * >(ip);
+                    //printf("    c = %p\n", c);
+
+                    // ok
+                    s = 0;
+                }
+                env->DeleteLocalRef(cls);
+            }
+        }
+        return c;
+    };
+
+    static void
+    release(C * c, jobject j, JNIEnv * env) {
+        TRACE("void Param.release(C *, jobject, JNIEnv *)");
+        // i/o problems with gcc 4.4.0 printing a number
+        //cout << "c = " << (int)c << endl;
+        //printf("    c = %lx\n", (unsigned long)c);
+    };
+};
+
+template< typename J , typename C >
+struct Result< J *, C & > {
+    static J *
+    convert(C & c, JNIEnv * env) {
+        TRACE("J * Result.convert(JNIEnv *, C &)");        
+        J * j = NULL; // init to error
+        C * p = &c;
+
+        if (p == NULL) {
+            // raise exception
+            jclass ae = env->FindClass("java/lang/AssertionError");
+            if (ae == NULL) {
+                // exception pending
+            } else {
+                env->ThrowNew(ae,
+                              "JNI wrapper: returned C reference must not be"
+                              " null (for instance, did a memory allocation"
+                              " fail without raising an exception, as can"
+                              " happen with older C++ compilers?)"
+                              " (file: " __FILE__ ")");
+                env->DeleteLocalRef(ae);
+                // exception pending
+            }
+        } else {
+            // ok
+            j = Result< J *, C * >::convert(p, env);
+            assert(j != NULL);
+        }
+        return j;
+    }
+};
+
+// cannot partially specialize on jobject, for we need the classname
+template< typename J, typename C >
+struct Result< J *, C * > { // XXX specialization v inheritance
+    
+    static J *
+    convert(C * c, JNIEnv * env) {
+        TRACE("J * Result.convert(JNIEnv *, C *)");
+        J * j = NULL;
+
+        if (c == NULL) {
+            // ok
+        } else {
+            // get the result class object
+            const char * jicn = J::java_internal_class_name;
+            //cout << "jicn = '" << jicn << "'" << endl;
+            jclass cls = env->FindClass(jicn);

+            if (cls == NULL) {
+                // exception pending
+            } else {
+                // get the method ID for the constructor
+                //jmethodID cid = env->GetMethodID(cls, "<init>", "()V");
+                jmethodID cid = env->GetMethodID(cls, "<init>", "(J)V");
+                if (cid == NULL) {
+                    // exception pending
+                } else {
+                    // convert a pointer into a jlong via intptr_t (C99)
+                    //assert (sizeof(jlong) >= sizeof(intptr_t));
+                    //printf("    p = %p\n", c);
+                    intptr_t ip = reinterpret_cast< intptr_t >(c);
+                    jlong p = ip;
+
+                    // construct a Wrapper object
+                    jobject jo = env->NewObject(cls, cid, p);
+                    if (jo == NULL) {
+                        // exception pending
+                    } else {
+                        // ok
+                        j = cast< J *, jobject >(jo);
+                    }
+/*
+                    // get the field ID
+                    jfieldID fid = env->GetFieldID(cls, "cdelegate", "J");
+                    if (fid == NULL) {
+                        // exception pending
+                        env->DeleteLocalRef(jo);
+                    } else {
+                        // ok
+
+                        // convert a pointer into a jlong via intptr_t (C99)
+                        //assert (sizeof(jlong) >= sizeof(intptr_t));
+                        //printf("    p = %p\n", c);
+                        intptr_t ip = reinterpret_cast< intptr_t >(c);
+                        jlong p = ip;
+                        // i/o problems with gcc 4.4.0 printing number
+                        //cout << "p = " << p << endl;
+                        printf("    p = %lx\n", (unsigned long)p);
+
+                        // set the field's value
+                        env->SetLongField(jo, fid, p);
+                        if (env->ExceptionCheck() != JNI_OK) {
+                            env->DeleteLocalRef(jo);
+                        } else {
+                            j = cast< J *, jobject >(jo);
+                        }
+                    }
+*/
+                }
+                env->DeleteLocalRef(cls);
+            }
+        }
+        return j;
+    }
+};
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_cobject_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_cstring.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cstring.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cstring.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,232 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_cstring.hpp
+ */
+
+#ifndef jtie_tconv_cstring_hpp
+#define jtie_tconv_cstring_hpp
+
+#include <cassert>
+#include <jni.h>
+#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+#include "jtie_ttrait.hpp"
+
+// ---------------------------------------------------------------------------
+// jstring - const char * type mapping
+// ---------------------------------------------------------------------------
+
+typedef ttrait< jstring, const char * > ttrait_cstring;
+
+// ---------------------------------------------------------------------------
+// jstring - const char * conversions
+// ---------------------------------------------------------------------------
+
+template<>
+struct Param< jstring, const char * > {
+    static const char *
+    convert(cstatus & s, jstring j, JNIEnv * env) {
+        TRACE("const char * Param.convert(cstatus &, jstring, JNIEnv *)");
+        s = -1; // init to error
+        const char * c = NULL;
+        
+        // return a C string from a Java String
+        if (j == NULL) {
+            // ok
+            s = 0;
+        } else {        
+            // get a const UTF-8 string, to be released by ReleaseStringUTFChars()
+            // ignore whether C string is pinned or a copy of Java string
+            c = env->GetStringUTFChars(j, NULL); 
+            if (c == NULL) {
+                // exception pending
+            } else {
+                // ok
+                s = 0;
+            }
+        }
+        return c;
+    }
+    
+
+    static void
+    release(const char * c, jstring j, JNIEnv * env) {
+        TRACE("void Param.release(const char *, jstring, JNIEnv *)"); 
+        if (c == NULL) {
+            assert(j == NULL);
+        } else {
+            assert(j);
+            // release the UTF-8 string allocated by GetStringUTFChars()
+            env->ReleaseStringUTFChars(j, c);
+        }
+    }
+};
+
+template<>
+struct Result< jstring, const char * > {
+    static jstring
+    convert(const char * c, JNIEnv * env) {
+        TRACE("jstring Result.convert(const char *, JNIEnv *)");
+        if (c == NULL)
+            return NULL;
+
+        // construct a String object from a UTF-8 C string
+        return env->NewStringUTF(c);
+    }
+};
+
+
+// ---------------------------------------------------------------------------
+// StringBuilder
+// ---------------------------------------------------------------------------
+
+/*
+// define char* conversions to/from StringBuilder
+// this type mapping is inefficient due to multiple copying operations
+// but should serve as a more complex example
+
+// defining a new type j_l_StringBuilder as an alias and leads to conflicting
+// declaration errors when instantiating the function templates
+//typedef jobject j_l_StringBuilder;
+
+// defining *j_l_StringBuilder as a subclass of *jobject would rely on
+// type name conventions in the JNI header jni.h
+//class _j_l_StringBuilder : public _jobject {};
+//typedef _j_l_StringBuilder *j_l_StringBuilder;
+
+// so, we define j_l_StringBuilder as unrelated type and apply approriate
+// reinterpret_casts where dealing with jobject
+class _j_l_StringBuilder {};
+typedef _j_l_StringBuilder *j_l_StringBuilder;
+
+template<>
+struct Param< j_l_StringBuilder, char * > {
+    static int
+    convert(JNIEnv * env, char * & c, j_l_StringBuilder const & j) {
+        TRACE("int Param.convert(JNIEnv *, char * &, j_l_StringBuilder const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get the StringBuilder class object
+        jclass sbClass = env->FindClass("java/lang/StringBuilder");
+        if (sbClass != NULL) {
+
+            // get the method ID for the StringBuilder.toString() method
+            jmethodID mid = env->GetMethodID(sbClass, "toString",
+                                             "()Ljava/lang/String;");
+            if (mid != NULL) {
+
+                // get a String from the StringBuilder object
+                jobject jo = reinterpret_cast<jobject>(j);
+                jobject jso = env->CallObjectMethod(jo, mid);
+                if (env->ExceptionCheck() == JNI_OK) {
+
+                    // get length in bytes of String, does not throw exceptions
+                    jstring js = static_cast<jstring>(jso);
+                    const jsize n = env->GetStringUTFLength(js);
+
+                    // allocate C string to hold UTF-8 copy of String
+                    c = new char[n];
+                    if (c != NULL) {
+                        // copy String as UTF-8 into the C target string
+                        env->GetStringUTFRegion(js, 0, n, c);
+                        if (env->ExceptionCheck()) {
+                            // release the C string
+                            delete[] c;
+                            c = NULL;
+                        }
+                        assert(c[n - 1] == '\0');
+                    } else {
+                        // old C++ compilers may not raise an exception
+                        jclass oomec
+                            = env->FindClass("java/lang/OutOfMemoryError");
+                        if (oomec != NULL) {
+                            env->ThrowNew(
+                                oomec,
+                                "JNI wrapper: failed to allocate memory, "
+                                " file: " __FILE__);
+                            env->DeleteLocalRef(oomec);
+                        }
+                    }
+                    env->DeleteLocalRef(jso);
+                }
+            }
+            env->DeleteLocalRef(sbClass);
+        }
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, char * & c, j_l_StringBuilder const & j) {
+        TRACE("void Param.release(JNIEnv *, char * &, j_l_StringBuilder const &)");
+        if (c == NULL) {
+            assert(j == NULL);
+            return;
+        }
+        assert(j);
+
+        // release the C string
+        delete[] c;
+    }
+};
+
+template<>
+struct Result< j_l_StringBuilder, char * > {
+    static j_l_StringBuilder
+    convert(JNIEnv * env, char * const & c) {
+        TRACE("j_l_StringBuilder Result.convert(JNIEnv *, char * const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_l_StringBuilder j = NULL;
+        if (c == NULL)
+            return j;
+
+        // construct a String object from a UTF-8 C string
+        jstring js = env->NewStringUTF(c);
+        if (js != NULL) {
+
+            // get the StringBuilder class object
+            jclass sbClass = env->FindClass("java/lang/StringBuilder");
+            if (sbClass != NULL) {
+
+                // get the method ID for the StringBuilder(String) constructor
+                jmethodID cid = env->GetMethodID(sbClass, "<init>",
+                                                 "(Ljava/lang/String;)V");
+                if (cid != NULL) {
+
+                    // construct a StringBuilder object from a String
+                    jobject jo = env->NewObject(sbClass, cid, js);
+                    j = reinterpret_cast<j_l_StringBuilder>(jo);
+                }
+                env->DeleteLocalRef(sbClass);
+            }
+            env->DeleteLocalRef(js);
+        }
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------

+
+#endif // jtie_tconv_cstring_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,197 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_cvalue.hpp
+ */
+
+#ifndef jtie_tconv_cvalue_hpp
+#define jtie_tconv_cvalue_hpp
+
+#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+#include "jtie_ttrait.hpp"
+
+// ---------------------------------------------------------------------------
+// fixed-size number type mappings
+// ---------------------------------------------------------------------------
+
+// convenience type aliases for basic number type mappings
+
+typedef ttrait< jbyte, char > ttrait_char;
+typedef ttrait< jbyte, int8_t > ttrait_int8;
+typedef ttrait< jbyte, uint8_t > ttrait_uint8;
+typedef ttrait< jshort, int16_t > ttrait_int16;
+typedef ttrait< jshort, uint16_t > ttrait_uint16;
+typedef ttrait< jint, int32_t > ttrait_int32;
+typedef ttrait< jint, uint32_t > ttrait_uint32;
+typedef ttrait< jlong, int64_t > ttrait_int64;
+typedef ttrait< jlong, uint64_t > ttrait_uint64;
+typedef ttrait< jfloat, float > ttrait_float;
+typedef ttrait< jdouble, double > ttrait_double;
+
+typedef ttrait< jbyte, const char > ttrait_cchar;
+typedef ttrait< jbyte, const int8_t > ttrait_cint8;
+typedef ttrait< jbyte, const uint8_t > ttrait_cuint8;
+typedef ttrait< jshort, const int16_t > ttrait_cint16;
+typedef ttrait< jshort, const uint16_t > ttrait_cuint16;
+typedef ttrait< jint, const int32_t > ttrait_cint32;
+typedef ttrait< jint, const uint32_t > ttrait_cuint32;
+typedef ttrait< jlong, const int64_t > ttrait_cint64;
+typedef ttrait< jlong, const uint64_t > ttrait_cuint64;
+typedef ttrait< jfloat, const float > ttrait_cfloat;
+typedef ttrait< jdouble, const double > ttrait_cdouble;
+
+// convenience type aliases for boolean number type mappings
+typedef ttrait< jboolean, bool > ttrait_bool;
+typedef ttrait< jboolean, const bool > ttrait_cbool;
+
+// ---------------------------------------------------------------------------
+// Java value <-> C value conversions
+// ---------------------------------------------------------------------------
+
+template< typename J, typename C >
+struct ParamBasicT {
+    static C
+    convert(cstatus & s, J j, JNIEnv * env) {
+        TRACE("C ParamBasicT.convert(cstatus &, J, JNIEnv *)");
+        s = 0;
+        return j;
+    }
+
+    static void
+    release(C c, J j, JNIEnv * env) {
+        TRACE("void ParamBasicT.release(C, J, JNIEnv *)");
+    }
+};
+
+template< typename J, typename C >
+struct ResultBasicT {
+    static J
+    convert(C c, JNIEnv * env) {
+        TRACE("J ResultBasicT.convert(C, JNIEnv *)");
+        return c;
+    }
+};
+
+// ---------------------------------------------------------------------------
+// fixed-size number type conversions
+// ---------------------------------------------------------------------------
+
+template<> struct Param< jbyte, char > : ParamBasicT< jbyte, char > {};
+template<> struct Param< jbyte, int8_t > : ParamBasicT< jbyte, int8_t > {};
+template<> struct Param< jbyte, uint8_t > : ParamBasicT< jbyte, uint8_t > {};
+template<> struct Param< jshort, int16_t > : ParamBasicT< jshort, int16_t > {};
+template<> struct Param< jshort, uint16_t > : ParamBasicT< jshort, uint16_t > {};
+template<> struct Param< jint, int32_t > : ParamBasicT< jint, int32_t > {};
+template<> struct Param< jint, uint32_t > : ParamBasicT< jint, uint32_t > {};
+template<> struct Param< jlong, int64_t > : ParamBasicT< jlong, int64_t > {};
+template<> struct Param< jlong, uint64_t > : ParamBasicT< jlong, uint64_t > {};
+template<> struct Param< jfloat, float > : ParamBasicT< jfloat, float > {};
+template<> struct Param< jdouble, double > : ParamBasicT< jdouble, double > {};
+
+template<> struct Result< jbyte, char > : ResultBasicT< jbyte, char > {};
+template<> struct Result< jbyte, int8_t > : ResultBasicT< jbyte, int8_t > {};
+template<> struct Result< jbyte, uint8_t > : ResultBasicT< jbyte, uint8_t > {};
+template<> struct Result< jshort, int16_t > : ResultBasicT< jshort, int16_t > {};
+template<> struct Result< jshort, uint16_t > : ResultBasicT< jshort, uint16_t > {};
+template<> struct Result< jint, int32_t > : ResultBasicT< jint, int32_t > {};
+template<> struct Result< jint, uint32_t > : ResultBasicT< jint, uint32_t > {};
+template<> struct Result< jlong, int64_t > : ResultBasicT< jlong, int64_t > {};
+template<> struct Result< jlong, uint64_t > : ResultBasicT< jlong, uint64_t > {};
+template<> struct Result< jfloat, float > : ResultBasicT< jfloat, float > {};
+template<> struct Result< jdouble, double > : ResultBasicT< jdouble, double > {};
+
+template<> struct Param< jbyte, const char > : ParamBasicT< jbyte, const char > {};
+template<> struct Param< jbyte, const int8_t > : ParamBasicT< jbyte, const int8_t > {};
+template<> struct Param< jbyte, const uint8_t > : ParamBasicT< jbyte, const uint8_t > {};
+template<> struct Param< jshort, const int16_t > : ParamBasicT< jshort, const int16_t > {};
+template<> struct Param< jshort, const uint16_t > : ParamBasicT< jshort, const uint16_t > {};
+template<> struct Param< jint, const int32_t > : ParamBasicT< jint, const int32_t > {};
+template<> struct Param< jint, const uint32_t > : ParamBasicT< jint, const uint32_t > {};
+template<> struct Param< jlong, const int64_t > : ParamBasicT< jlong, const int64_t > {};
+template<> struct Param< jlong, const uint64_t > : ParamBasicT< jlong, const uint64_t > {};
+template<> struct Param< jfloat, const float > : ParamBasicT< jfloat, const float > {};
+template<> struct Param< jdouble, const double > : ParamBasicT< jdouble, const double > {};
+
+template<> struct Result< jbyte, const char > : ResultBasicT< jbyte, const char > {};
+template<> struct Result< jbyte, const int8_t > : ResultBasicT< jbyte, const int8_t > {};
+template<> struct Result< jbyte, const uint8_t > : ResultBasicT< jbyte, const uint8_t > {};
+template<> struct Result< jshort, const int16_t > : ResultBasicT< jshort, const int16_t > {};
+template<> struct Result< jshort, const uint16_t > : ResultBasicT< jshort, const uint16_t > {};
+template<> struct Result< jint, const int32_t > : ResultBasicT< jint, const int32_t > {};
+template<> struct Result< jint, const uint32_t > : ResultBasicT< jint, const uint32_t > {};
+template<> struct Result< jlong, const int64_t > : ResultBasicT< jlong, const int64_t > {};
+template<> struct Result< jlong, const uint64_t > : ResultBasicT< jlong, const uint64_t > {};
+template<> struct Result< jfloat, const float > : ResultBasicT< jfloat, const float > {};
+template<> struct Result< jdouble, const double > : ResultBasicT< jdouble, const double > {};
+
+// ---------------------------------------------------------------------------
+// jboolean
+// ---------------------------------------------------------------------------
+
+template<>
+struct Param< jboolean, bool > {
+    static bool
+    convert(cstatus & s, jboolean j, JNIEnv * env) {
+        TRACE("bool Param.convert(cstatus &, jboolean, JNIEnv *)");
+        s = 0;
+        return (j == JNI_TRUE); // J/C++ may have differ
+    }
+
+    static void
+    release(bool c, jboolean j, JNIEnv * env) {
+        TRACE("void Param.release(bool, jboolean, JNIEnv *)");
+    }
+};
+
+template<>
+struct Result< jboolean, bool > {
+    static jboolean
+    convert(bool c, JNIEnv * env) {
+        TRACE("jboolean Result.convert(bool, JNIEnv *)");
+        return (c ? JNI_TRUE : JNI_FALSE); // J/C++ may have differ
+    }
+};
+
+template<>
+struct Param< jboolean, const bool > {
+    static const bool
+    convert(cstatus & s, jboolean j, JNIEnv * env) {
+        TRACE("const bool Param.convert(cstatus &, jboolean, JNIEnv *)");
+        s = 0;
+        return (j == JNI_TRUE); // J/C++ may have differ
+    }
+
+    static void
+    release(const bool c, jboolean j, JNIEnv * env) {
+        TRACE("void Param.release(const bool, jboolean, JNIEnv *)");
+    }
+};
+
+template<>
+struct Result< jboolean, const bool > {
+    static jboolean
+    convert(const bool c, JNIEnv * env) {
+        TRACE("jboolean Result.convert(const bool, JNIEnv *)");
+        return (c ? JNI_TRUE : JNI_FALSE); // J/C++ may have differ
+    }
+};
+
+#endif // jtie_tconv_cvalue_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue_ext.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue_ext.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_cvalue_ext.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_cvalue_ext.hpp
+ */
+
+#ifndef jtie_tconv_cvalue_ext_hpp
+#define jtie_tconv_cvalue_ext_hpp
+
+//#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+//#include "jtie_tconv_def.hpp"
+#include "jtie_tconv_cvalue.hpp"
+#include "jtie_ttrait.hpp"
+
+// ---------------------------------------------------------------------------
+// platform-dependent number type mappings
+// ---------------------------------------------------------------------------
+
+// convenience type aliases for basic number type mappings
+
+typedef ttrait< jint, signed int > ttrait_int;
+typedef ttrait< jint, unsigned int > ttrait_uint;
+typedef ttrait< jint, signed long > ttrait_long;
+typedef ttrait< jint, unsigned long > ttrait_ulong;
+typedef ttrait< jdouble, long double > ttrait_ldouble;
+
+typedef ttrait< jint, const signed int > ttrait_cint;
+typedef ttrait< jint, const unsigned int > ttrait_cuint;
+typedef ttrait< jint, const signed long > ttrait_clong;
+typedef ttrait< jint, const unsigned long > ttrait_culong;
+typedef ttrait< jdouble, const long double > ttrait_cldouble;
+
+// ---------------------------------------------------------------------------

+// platform-dependent Java value <-> C value conversions
+// ---------------------------------------------------------------------------
+
+template<> struct Param< jint, signed long > : ParamBasicT< jint, signed long > {};
+template<> struct Param< jint, unsigned long > : ParamBasicT< jint, unsigned long > {};
+template<> struct Param< jdouble, long double > : ParamBasicT< jdouble, long double > {};
+
+template<> struct Result< jint, signed long > : ResultBasicT< jint, signed long > {};
+template<> struct Result< jint, unsigned long > : ResultBasicT< jint, unsigned long > {};
+template<> struct Result< jdouble, long double > : ResultBasicT< jdouble, long double > {};
+
+template<> struct Param< jint, const signed long > : ParamBasicT< jint, const signed long > {};
+template<> struct Param< jint, const unsigned long > : ParamBasicT< jint, const unsigned long > {};
+template<> struct Param< jdouble, const long double > : ParamBasicT< jdouble, const long double > {};
+
+template<> struct Result< jint, const signed long > : ResultBasicT< jint, const signed long > {};
+template<> struct Result< jint, const unsigned long > : ResultBasicT< jint, const unsigned long > {};
+template<> struct Result< jdouble, const long double > : ResultBasicT< jdouble, const long double > {};
+
+#endif // jtie_tconv_cvalue_ext_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_def.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_def.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_def.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,142 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_def.hpp
+ */
+
+#ifndef jtie_tconv_def_hpp
+#define jtie_tconv_def_hpp
+
+//#include <jni.h>
+//#include <cstring>
+//#include "helpers.hpp"
+
+// ---------------------------------------------------------------------------
+// formal <-> actual parameter/result type casts
+// ---------------------------------------------------------------------------
+
+// a function template for simple type adjustments by casts
+template< typename T, typename S >
+inline T
+cast(S s) {
+    TRACE("T cast(S)");
+    return s; // type conversions supported by C++
+}
+
+// ---------------------------------------------------------------------------
+// Java <-> C type conversions
+// ---------------------------------------------------------------------------
+
+// benefits of using a class template over loose function templates:
+// - separates J->C from C->J conversion
+// - explicitely expresses convert/release asymmetry for J->C and C->J
+// - may allow defining/enforcing uniform converter interface
+// - may allow combining with inheritance
+// - function templates don't seem to allow for partial specialization
+
+// default conversion semantics:
+// - may not want (unsafe) default conversions
+// - cannot specify initializer (= 0) for static member function
+// - can declare but not define methods => undefined symbols
+
+// passing the classname to Result.convert:
+// - unfortunately, string literals cannot be used as template arguments
+//   template< typename J, typename C, char * JCN = "" >
+//   must be integral constant with external linkage
+
+typedef int cstatus;
+
+/**
+ * A class template with functions for parameter type conversion.
+ */
+template< typename J, typename C >
+struct Param {
+    /**
+     * Returns the C data type value for a Java data value.
+     *
+     * Writes a converion status to the output parameter 's':
+     * 0:
+     *     - no JNI exception is pending (!env->ExceptionCheck())
+     *     - other convert() and the C delegate function may be called
+     *     - the corresponding release() function must be called
+     *   otherwise:
+     *     - a JNI exception is pending (env->ExceptionCheck())
+     *     - no other convert() or the C delegate function must be called
+     *     - the corresponding release() function must not be called
+     */
+    static C
+    convert(cstatus & s, J j, JNIEnv * env);
+/*
+    {
+        TRACE("C Param.convert(cstatus &, J, JNIEnv *)");
+        s = 0;
+        return j; // all conversions by C++
+    }
+*/
+
+    /**
+     * Releases any resources allocated by a previous convert() call.
+     *
+     * May only call JNI functions that are safe for pending exception:
+     * - ExceptionOccurred
+     * - ExceptionDescribe
+     * - ExceptionClear
+     * - ExceptionCheck
+     * - ReleaseStringChars
+     * - ReleaseStringUTFchars
+     * - ReleaseStringCritical
+     * - Release<Type>ArrayElements
+     * - ReleasePrimitiveArrayCritical
+     * - DeleteLocalRef
+     * - DeleteGlobalRef
+     * - DeleteWeakGlobalRef
+     * - MonitorExit
+     */
+    static void
+    release(C c, J j, JNIEnv * env);
+/*
+    {
+        TRACE("void Param.release(C, J, JNIEnv *)");
+    }
+*/
+};
+
+/**
+ * A class template with functions for result type conversion.
+ */
+template< typename J, typename C >
+struct Result {
+    /**
+     * Returns the Java data type value for a C data value.
+     *
+     * Any errors must be signaled by creating a Java exception with the VM
+     * (env->ExceptionCheck()).
+     */
+    static J
+    convert(C c, JNIEnv * env);
+/*
+    {
+        TRACE("J Result.convert(C, JNIEnv *)");
+        return c; // all conversions by C++
+    }
+*/
+};
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_def_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbybb.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbybb.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbybb.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,500 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_refbybb.hpp
+ */
+
+#ifndef jtie_tconv_refbybb_hpp
+#define jtie_tconv_refbybb_hpp
+
+#include <jni.h>
+#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+
+// ---------------------------------------------------------------------------
+// infrastructure code: Java ByteBuffer <-> C & type conversions
+// ---------------------------------------------------------------------------
+
+/*
+template< int n = 0 >
+struct _j_n_ByteBuffer {
+    static inline const int capacity = n;
+};
+typedef _j_n_ByteBuffer<> * j_n_ByteBuffer;
+*/
+
+class _j_n_ByteBuffer {};
+typedef _j_n_ByteBuffer * j_n_ByteBuffer;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, j_n_ByteBuffer >(j_n_ByteBuffer s) {
+    TRACE("jobject cast(j_n_ByteBuffer)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline j_n_ByteBuffer
+cast< j_n_ByteBuffer, jobject >(jobject s) {
+    TRACE("j_n_ByteBuffer cast(jobject)");
+    return reinterpret_cast< j_n_ByteBuffer >(s);
+}
+
+// ---------------------------------------------------------------------------
+
+inline cstatus
+ensureNonNullBuffer(jobject jo, JNIEnv * env) {
+    // init return value to error
+    cstatus s = -1;
+    
+    if (jo == NULL) {
+        // raise exception
+        jclass iae = env->FindClass("java/lang/IllegalArgumentException");
+        if (iae == NULL) {
+            // exception pending
+        } else {
+            env->ThrowNew(iae,
+                          "JNI wrapper: java.nio.ByteBuffer cannot be null"
+                          " when mapped to an object reference type"
+                          " (file: " __FILE__ ")");
+            env->DeleteLocalRef(iae);
+        }
+    } else {
+        // ok
+        s = 0;
+    }
+    return s;
+}
+
+inline cstatus
+ensureMutableBuffer(jobject jo, JNIEnv * env) {
+    // init return value to error
+    cstatus s = -1;
+    
+    // get the ByteBuffer class object
+    jclass sbClass = env->FindClass("java/nio/ByteBuffer");
+    if (sbClass == NULL) {
+        // exception pending
+    } else {
+        // get the method ID for the ByteBuffer.isReadOnlyBuffer() method
+        jmethodID mid = env->GetMethodID(sbClass, "isReadOnly", "()Z");
+        if (mid == NULL) {
+            // exception pending
+        } else {
+            // error if the ByteBuffer is read-only
+            jboolean ro = env->CallBooleanMethod(jo, mid);
+            if (env->ExceptionCheck() != JNI_OK) {
+                // exception pending
+            } else {
+                if (ro) {
+                    // raise exception
+                    jclass robe
+                        = env->FindClass("java/nio/ReadOnlyBufferException");
+                    if (robe == NULL) {
+                        // exception pending
+                    } else {
+                        env->ThrowNew(
+                            robe,
+                            "JNI wrapper: java.nio.ByteBuffer cannot be"
+                            " read-only when mapped to a non-const object"
+                            " reference type (file: " __FILE__ ")");
+                        env->DeleteLocalRef(robe);
+                    }
+                } else {
+                    // ok
+                    s = 0;
+                }
+            }
+        }
+        env->DeleteLocalRef(sbClass);
+    }
+    return s;
+}
+
+template< typename C >
+struct Param< j_n_ByteBuffer, C & > {
+
+    static C &
+    convert(cstatus & s, j_n_ByteBuffer j, JNIEnv * env) {
+        TRACE("C & Param.convert(cstatus &, j_n_ByteBuffer, JNIEnv *)");
+
+        // init return value and status to error
+        C * c = NULL;
+
+        jobject jo = cast< jobject, j_n_ByteBuffer >(j);
+        if (ensureNonNullBuffer(jo, env) != 0) {
+            // exception pending
+        } else {
+            if (ensureMutableBuffer(jo, env) != 0) {
+                // exception pending
+            } else {
+                // get the internal buffer address of direct ByteBuffer
+                void * cb = env->GetDirectBufferAddress(jo);
+                c = static_cast<C *>(cb);
+            }
+        }
+        s = (c == NULL);
+        return *c;
+    }
+
+    static void
+    release(C & c, j_n_ByteBuffer j, JNIEnv * env) {
+        TRACE("void Param.release(C &, j_n_ByteBuffer, JNIEnv *)");
+    }
+};
+
+template< typename C >
+struct Param< j_n_ByteBuffer, const C & > {
+
+    static const C &
+    convert(cstatus & s, j_n_ByteBuffer j, JNIEnv * env) {
+        TRACE("const C & Param.convert(cstatus &, j_n_ByteBuffer, JNIEnv *)");
+
+        // init return value and status to error
+        const C * c = NULL;
+
+        jobject jo = cast< jobject, j_n_ByteBuffer >(j);
+        if (ensureNonNullBuffer(jo, env) != 0) {
+            // exception pending
+        } else {
+            // get the internal buffer address of direct ByteBuffer
+            void * cb = env->GetDirectBufferAddress(jo);
+            c = static_cast<C *>(cb);
+        }
+        s = (c == NULL);
+        return *c;
+    }
+
+    static void
+    release(const C & c, j_n_ByteBuffer j, JNIEnv * env) {
+        TRACE("void Param.release(const C &, j_n_ByteBuffer, JNIEnv *)");
+    }
+};
+
+template< typename C >
+inline jobject 
+wrapReferenceAsByteBuffer(C & c, JNIEnv * env) {
+    // construct a direct java.nio.ByteBuffer wrapping the source
+    void * mc = static_cast< void * >(&c);
+    jlong cap = sizeof(C);
+    jobject jo = env->NewDirectByteBuffer(mc, cap);
+    return jo;
+}
+
+template< typename C >
+struct Result< j_n_ByteBuffer, C & > {
+    static j_n_ByteBuffer
+    convert(C & c, JNIEnv * env) {
+        TRACE("j_n_ByteBuffer Result.convert(C &, JNIEnv *)");
+
+        // init return value to error
+        j_n_ByteBuffer j = NULL;
+
+        jobject jo = wrapReferenceAsByteBuffer(c, env);
+        if (jo == NULL) {
+            // exception pending
+        } else {
+            j = cast< j_n_ByteBuffer, jobject >(jo);
+        }
+        return j;
+    }
+};
+
+inline jobject
+wrapByteBufferAsReadOnly(jobject jo, JNIEnv * env) {
+    // init return value to error
+    jobject j = NULL;
+    
+    // get the ByteBuffer class object
+    jclass sbClass = env->FindClass("java/nio/ByteBuffer");
+    if (sbClass == NULL) {
+        // exception pending
+    } else {
+        // get the method ID of ByteBuffer.asReadOnlyBuffer()
+        jmethodID mid = env->GetMethodID(sbClass, "asReadOnlyBuffer",
+                                         "()Ljava/nio/ByteBuffer;");
+        if (mid == NULL) {
+            // exception pending
+        } else {
+            // get a read-only copy from the ByteBuffer object
+            j = env->CallObjectMethod(jo, mid);
+        }
+        env->DeleteLocalRef(sbClass);
+    }
+    return j;
+}
+
+template< typename C >
+struct Result< j_n_ByteBuffer, const C & > {
+    static j_n_ByteBuffer
+    convert(const C & c, JNIEnv * env) {
+        TRACE("j_n_ByteBuffer Result.convert(const C &, JNIEnv *)");
+
+        // init return value to error
+        j_n_ByteBuffer j = NULL;
+
+        // ok to temporarily strip const, wrapping as read-only buffer
+        C & mc = const_cast< C & >(c);
+        jobject jo = wrapReferenceAsByteBuffer(mc, env);
+        if (jo == NULL) {
+            // exception pending
+        } else {
+            jobject jro = wrapByteBufferAsReadOnly(jo, env);
+            if (jro == NULL) {
+                // exception pending
+            } else {
+                j = cast< j_n_ByteBuffer, jobject >(jro);
+            }
+            env->DeleteLocalRef(jo);
+        }
+        return j;
+    }
+};
+
+// ---------------------------------------------------------------------------
+
+/*
+template<>
+struct Param< j_n_ByteBuffer, char * > {
+    static int
+    convert(JNIEnv * env, char * & c, j_n_ByteBuffer const & j) {
+        TRACE("int Param.convert(JNIEnv *, char * &, j_n_ByteBuffer const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get the ByteBuffer class object
+        jclass sbClass = env->FindClass("java/nio/ByteBuffer");
+        if (sbClass != NULL) {
+
+            // get the method ID for the ByteBuffer.asReadOnlyBuffer() method
+            jmethodID mid = env->GetMethodID(sbClass, "isReadOnly", "()Z");
+            if (mid != NULL) {
+
+                // error if the ByteBuffer is read-only
+                jobject jo = reinterpret_cast< jobject >(j);
+                jboolean ro = env->CallBooleanMethod(jo, mid);
+                if (!ro) {
+                    // get the internal buffer address of direct ByteBuffer
+                    void * cb = env->GetDirectBufferAddress(jo);
+                    c = static_cast<char *>(cb);
+                } else {
+                    jclass robe
+                        = env->FindClass("java/nio/ReadOnlyBufferException");
+                    if (robe != NULL) {
+                        env->ThrowNew(
+                            robe,
+                            "JNI wrapper: cannot retrieve a non-const buffer "
+                            "address from a read-only java.nio.ByteBuffer, "
+                            " file: " __FILE__);
+                        env->DeleteLocalRef(robe);
+                    }
+                }
+            }
+            env->DeleteLocalRef(sbClass);
+        }
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, char * & c, j_n_ByteBuffer const & j) {
+        TRACE("void Param.release(JNIEnv *, char * &, j_n_ByteBuffer const &)");
+    }
+};
+
+template<>
+struct Result< j_n_ByteBuffer, char * > {
+    static j_n_ByteBuffer
+    convert(JNIEnv * env, char * const & c) {
+        TRACE("j_n_ByteBuffer Result.convert(JNIEnv *, char * const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_n_ByteBuffer j = NULL;
+        if (c == NULL)
+            return j;
+
+        // construct a direct java.nio.ByteBuffer wrapping the source
+        // XXX how large to choose capacity?
+        //jlong cap = (1<<31) - 1;
+        // XXX SECURITY HOLE!!!
+        jlong cap = 0;
+        //jlong cap = j->capacity;
+        jobject jo = env->NewDirectByteBuffer(c, cap);
+        j = reinterpret_cast< j_n_ByteBuffer >(jo);
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+
+/*
+template<>
+struct Param< j_n_ByteBuffer, void * > {
+    static int
+    convert(JNIEnv * env, void * & c, j_n_ByteBuffer const & j) {
+        TRACE("int Param.convert(JNIEnv *, void * &, j_n_ByteBuffer const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get the ByteBuffer class object
+        jclass sbClass = env->FindClass("java/nio/ByteBuffer");
+        if (sbClass != NULL) {
+
+            // get the method ID for the ByteBuffer.isReadOnlyBuffer() method
+            jmethodID mid = env->GetMethodID(sbClass, "isReadOnly", "()Z");
+            if (mid != NULL) {
+
+                // error if the ByteBuffer is read-only
+                jobject jo = reinterpret_cast< jobject >(j);
+                jboolean ro = env->CallBooleanMethod(jo, mid);
+                if (!ro) {
+                    // get the internal buffer address of direct ByteBuffer
+                    void * cb = env->GetDirectBufferAddress(jo);
+                    c = static_cast<void *>(cb);
+                } else {
+                    jclass robe
+                        = env->FindClass("java/nio/ReadOnlyBufferException");
+                    if (robe != NULL) {
+                        env->ThrowNew(
+                            robe,
+                            "JNI wrapper: cannot retrieve a non-const buffer "
+                            "address from a read-only java.nio.ByteBuffer, "
+                            " file: " __FILE__);
+                        env->DeleteLocalRef(robe);
+                    }
+                }
+            }
+            env->DeleteLocalRef(sbClass);
+        }
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, void * & c, j_n_ByteBuffer const & j) {
+        TRACE("void Param.release(JNIEnv *, void * &, j_n_ByteBuffer const &)");
+    }
+};
+
+template<>
+struct Result< j_n_ByteBuffer, void * > {
+    static j_n_ByteBuffer
+    convert(JNIEnv * env, void * const & c) {
+        TRACE("j_n_ByteBuffer Result.convert(JNIEnv *, void * const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_n_ByteBuffer j = NULL;
+        if (c == NULL)
+            return j;
+
+        // construct a direct java.nio.ByteBuffer wrapping the source
+        // XXX how large to choose capacity?
+        //jlong cap = (1<<31) - 1;
+        // XXX SECURITY HOLE!!!
+        jlong cap = 0;
+        jobject jo = env->NewDirectByteBuffer(c, cap);
+        j = reinterpret_cast< j_n_ByteBuffer >(jo);
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+
+/*
+template<>
+struct Param< j_n_ByteBuffer, const void * > {
+    static int
+    convert(JNIEnv * env, const void * & c, j_n_ByteBuffer const & j) {
+        TRACE("int Param.convert(JNIEnv *, const void * &, j_n_ByteBuffer const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;

+
+        // get the internal buffer address of the direct java.nio.ByteBuffer
+        jobject jo = reinterpret_cast< jobject >(j);
+        void * cb = env->GetDirectBufferAddress(jo);
+        c = static_cast<const void *>(cb);
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, const void * & c, j_n_ByteBuffer const & j) {
+        TRACE("void Param.release(JNIEnv *, const void * &, j_n_ByteBuffer const &)");
+    }
+};
+
+template<>
+struct Result< j_n_ByteBuffer, const void * > {
+    static j_n_ByteBuffer
+    convert(JNIEnv * env, const void * const & c) {
+        TRACE("j_n_ByteBuffer Result.convert(JNIEnv *, const void * const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        j_n_ByteBuffer j = NULL;
+        if (c == NULL)
+            return j;
+
+        // ok to remove constness here since wrapping with a read-only buffer
+        void * mc = const_cast<void *>(c);
+
+        // construct a direct java.nio.ByteBuffer wrapping the source
+        // XXX how large to choose capacity?
+        //jlong cap = (1<<31) - 1;
+        // XXX SECURITY HOLE!!!
+        jlong cap = 0;
+        jobject jo = env->NewDirectByteBuffer(mc, cap);
+        if (jo != NULL) {
+
+            // get the ByteBuffer class object
+            jclass sbClass = env->FindClass("java/nio/ByteBuffer");
+            if (sbClass != NULL) {
+
+                // get the method ID of ByteBuffer.asReadOnlyBuffer()
+                jmethodID mid = env->GetMethodID(sbClass, "asReadOnlyBuffer",
+                                                 "()Ljava/nio/ByteBuffer;");
+                if (mid != NULL) {
+                    // get a read-only copy from the ByteBuffer object
+                    jobject jro = env->CallObjectMethod(jo, mid);
+                    j = reinterpret_cast< j_n_ByteBuffer >(jro);
+                }
+                env->DeleteLocalRef(sbClass);
+            }
+            env->DeleteLocalRef(jo);
+        }
+
+        return j;
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_refbybb_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,340 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_refbyval.hpp
+ */
+
+#ifndef jtie_tconv_refbyval_hpp
+#define jtie_tconv_refbyval_hpp
+
+#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+#include "jtie_tconv_def.hpp"
+#include "jtie_tconv_carray.hpp"
+
+// ---------------------------------------------------------------------------
+// infrastructure code: Java value copy <-> const C & type conversions
+// ---------------------------------------------------------------------------
+
+/*
+// TOO NARROW, NOT TAKING INTO ACCOUNT SUPPORTED NON_IDENTITY CONVERSIONS:
+
+// add a generic mapping between const references and value copies
+template< typename C >
+struct Result< C, const C & > {
+    static C
+    convert(const C & c, JNIEnv * env) {
+        TRACE("C Result.convert(C, JNIEnv *)");
+        return c;
+    }
+};
+
+// add a generic mapping between const references and value copies
+template< typename C >
+struct Param< C, const C & > {
+    static const C &
+    convert(cstatus & s, C j, JNIEnv * env) {
+        TRACE("const C & Param.convert(cstatus &, C, JNIEnv *)");
+        s = 0;
+        return j;
+    }
+
+    static void
+    release(const C & c, C j, JNIEnv * env) {
+        TRACE("void Param.release(const C &, C, JNIEnv *)");
+    }
+};
+*/
+
+// TOO BROAD, RESULTING IN AMBIGUITIES FOR NON-PROIMITIVE TYPES:
+
+// for all defined Param< J, C > mappings, add a generic mapping between
+// const references and value copies
+
+template< typename J, typename C >
+struct Param< J, const C & > : Param< J, C > {};
+
+template< typename J, typename C >
+struct Result< J, const C & > : Result< J, C > {};
+
+// for all defined Param< J, C > mappings, add a generic mapping between
+// const references and 1-element arrays serving as value holders
+
+//template< typename J, typename C >
+//struct Param< J, const C & > : Param< J, C > {};
+
+template< typename J, typename C >
+struct Result< J, C & > : Result< J, C > {};
+
+// ---------------------------------------------------------------------------
+// jarray
+// ---------------------------------------------------------------------------
+
+inline cstatus
+ensureNonNullArray(jarray ja, JNIEnv * env) {
+    // init return value to error
+    cstatus s = -1;
+    
+    if (ja == NULL) {
+        // raise exception
+        jclass iae = env->FindClass("java/lang/IllegalArgumentException");
+        if (iae == NULL) {
+            // exception pending
+        } else {
+            env->ThrowNew(iae,
+                          "JNI wrapper: Java array cannot be null"
+                          " when mapped to an object reference type"
+                          " (file: " __FILE__ ")");
+            env->DeleteLocalRef(iae);
+        }
+    } else {
+        // ok
+        s = 0;
+    }
+    return s;
+}
+
+inline cstatus
+ensureSingleElementArray(jarray ja, JNIEnv * env) {
+    // init return value to error
+    cstatus s = -1;
+
+    jsize n = env->GetArrayLength(ja);
+    if (n != 1) {
+        // raise exception
+        jclass iae = env->FindClass("java/lang/IllegalArgumentException");
+        if (iae == NULL) {
+            // exception pending
+        } else {
+            env->ThrowNew(iae,
+                          "JNI wrapper: Java array must have a single element"
+                          " when mapped to an object reference type"
+                          " (file: " __FILE__ ")");
+            env->DeleteLocalRef(iae);
+        }
+    } else {
+        // ok
+        s = 0;
+    }
+    return s;
+}
+
+template< typename J, typename C >
+struct ParamValueHolder {
+
+    inline static C &
+    convert(cstatus & s, J j, JNIEnv * env) {
+        TRACE("C & ParamValueHolder.convert(cstatus &, J, JNIEnv *)");
+
+        // init return value and status to error
+        s = -1;
+        C * c = NULL;
+
+        // return value of single element
+        if (ensureNonNullArray(j, env) != 0) {
+            // exception pending
+        } else {
+            if (ensureSingleElementArray(j, env) != 0) {
+                // exception pending
+            } else {
+                // get a C array, to be released by ReleaseIntArrayElements()
+                // ignore whether C array is pinned or a copy of Java array
+                c = GetArrayElements< C, J >(env, j, NULL);
+                if (c == NULL) {
+                    // exception pending
+                } else {
+                    // ok
+                    s = 0;
+                }
+            }
+        }
+        return *c;
+    }
+
+    inline static void
+    release(C & c, J j, JNIEnv * env) {
+        TRACE("void ParamValueHolder.release(C &, J, JNIEnv *)");
+
+        // release the C array allocated by GetIntArrayElements()
+        // if C array was a copy, copy back any changes to Java array
+        ReleaseArrayElements< C, J >(env, j, &c, 0);
+    }
+};
+
+// ---------------------------------------------------------------------------
+
+template<>
+struct Param< jbooleanArray, bool & > : ParamValueHolder< jbooleanArray, bool > {};
+
+template<>
+struct Param< jbyteArray, char & > : ParamValueHolder< jbyteArray, char > {};
+
+template<>
+struct Param< jbyteArray, int8_t & > : ParamValueHolder< jbyteArray, int8_t > {};
+
+template<>
+struct Param< jbyteArray, uint8_t & > : ParamValueHolder< jbyteArray, uint8_t > {};
+
+template<>
+struct Param< jshortArray, int16_t & > : ParamValueHolder< jshortArray, int16_t > {};
+
+template<>
+struct Param< jshortArray, uint16_t & > : ParamValueHolder< jshortArray, uint16_t > {};
+
+template<>
+struct Param< jintArray, int32_t & > : ParamValueHolder< jintArray, int32_t > {};
+
+template<>
+struct Param< jintArray, uint32_t & > : ParamValueHolder< jintArray, uint32_t > {};
+
+template<>
+struct Param< jlongArray, int64_t & > : ParamValueHolder< jlongArray, int64_t > {};
+
+template<>
+struct Param< jlongArray, uint64_t & > : ParamValueHolder< jlongArray, uint64_t > {};
+
+template<>
+struct Param< jfloatArray, float & > : ParamValueHolder< jfloatArray, float > {};
+
+template<>
+struct Param< jdoubleArray, double & > : ParamValueHolder< jdoubleArray, double > {};
+
+// ---------------------------------------------------------------------------
+// jarray
+// ---------------------------------------------------------------------------
+
+/*
+template< typename I >
+struct Param< jintArray, I > {
+    static int
+    convert(JNIEnv * env, I & c, jintArray const & j) {
+        TRACE("int Param.convert(JNIEnv *, I &, jintArray const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        c = NULL;
+        if (j == NULL)
+            return 0;
+
+        // get a C array, to be released by ReleaseIntArrayElements()
+        // ignore whether C array is pinned or a copy of Java array
+        jint * cj = env->GetIntArrayElements(j, NULL);
+        c = reinterpret_cast< I >(cj);
+
+        return (c == NULL);
+    }
+
+    static void
+    release(JNIEnv * env, I & c, jintArray const & j) {
+        TRACE("void Param.release(JNIEnv *, I &, jintArray const &)");
+    }
+};
+
+template<>
+struct Param< jintArray, const signed int * > {
+    static int
+    convert(JNIEnv * env, const signed int * & c, jintArray const & j) {
+        TRACE("int Param.convert(JNIEnv *, const signed int * &, jintArray const &)");
+        return convert(env, c, j);
+    }
+
+    static void
+    release(JNIEnv * env, const signed int * & c, jintArray const & j) {
+        TRACE("void Param.release(JNIEnv *, const signed int * &, jintArray const &)");
+        if (c == NULL) {
+            assert(j == NULL);
+            return;
+        }
+        assert(j);
+
+        // release the C array allocated by GetIntArrayElements()
+        // if C array was a copy, discard any changes since contracted as const
+        signed int * mc = const_cast<signed int *>(c);
+        jint * cj = reinterpret_cast<jint *>(mc);
+        env->ReleaseIntArrayElements(j, cj, JNI_ABORT); // safe to call
+    }
+};
+
+template<>
+struct Param< jintArray, signed int * > {
+    static int
+    convert(JNIEnv * env, signed int * & c, jintArray const & j) {
+        TRACE("int Param.convert(JNIEnv *, signed int * &, jintArray const &)");
+        return convert(env, c, j);
+    }
+
+    static void
+    release(JNIEnv * env, signed int * & c, jintArray const & j) {
+        TRACE("void Param.release(JNIEnv *, signed int * &, jintArray const &)");
+        if (c == NULL) {
+            assert(j == NULL);
+            return;
+        }
+        assert(j);
+
+        // release the C array allocated by GetIntArrayElements()
+        // if C array was a copy, copy back any changes to Java array
+        jint * cj = reinterpret_cast<jint *>(c);
+        env->ReleaseIntArrayElements(j, cj, 0); // safe to call
+    }
+};
+
+template< typename I >
+struct Result< jintArray, I > {
+    static jintArray
+    convert(JNIEnv * env, I const & c) {
+        TRACE("jintArray Result.convert(JNIEnv *, I const &)");
+
+        // init target, even in case of errors (better: use exceptions)
+        jintArray j = NULL;
+        if (c == NULL)
+            return j;
+
+        // construct a Java array object from a C array
+        // XXX how large to choose size?
+        const jsize n = 0;
+        j = env->NewIntArray(n);
+        if (j != NULL) {
+
+            // fill Java array from C array, release target in case of errors
+            const jint * cj = reinterpret_cast<const jint *>(c);
+            env->SetIntArrayRegion(j, 0, n, cj);
+            if (env->ExceptionCheck()) {
+                env->DeleteLocalRef(j);
+                j = 0;
+            }
+        }
+        return j;
+    }
+};
+*/
+
+/*
+template<>
+struct Result< jintArray, const signed int * > {
+    static jintArray
+    convert(JNIEnv * env, const signed int * const & c) {
+        TRACE("jintArray Result.convert(JNIEnv *, const signed int * const &)");
+        return convert(env, c);
+    }
+};
+*/
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_refbyval_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval_ext.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval_ext.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_tconv_refbyval_ext.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_tconv_refbyval_ext.hpp
+ */
+
+#ifndef jtie_tconv_refbyval_ext_hpp
+#define jtie_tconv_refbyval_ext_hpp
+
+#include <stdint.h>
+#include <jni.h>
+//#include "helpers.hpp"
+//#include "jtie_tconv_def.hpp"
+#include "jtie_tconv_refbyval.hpp"
+
+// ---------------------------------------------------------------------------
+// infrastructure code: platform-dependent Java value copy <-> const C & type conversions
+// ---------------------------------------------------------------------------
+
+template<>
+struct Param< jintArray, signed long & > : ParamValueHolder< jintArray, signed long > {};
+
+template<>
+struct Param< jintArray, unsigned long & > : ParamValueHolder< jintArray, unsigned long > {};
+
+template<>
+struct Param< jintArray, long double & > : ParamValueHolder< jintArray, long double > {};
+
+// ---------------------------------------------------------------------------
+
+#endif // jtie_tconv_refbyval_ext_hpp

=== added file 'storage/ndb/ndbjtie/src/jtie/jtie_ttrait.hpp'
--- a/storage/ndb/ndbjtie/src/jtie/jtie_ttrait.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/jtie/jtie_ttrait.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * jtie_ttrait.hpp
+ */
+
+#ifndef jtie_ttrait_hpp
+#define jtie_ttrait_hpp
+
+//#include <cstring>
+//#include "helpers.hpp"
+//#include "jtie_tconv.hpp"
+
+// ---------------------------------------------------------------------------
+// infrastructure code: Java <-> C type conversion ttrait
+// ---------------------------------------------------------------------------
+
+template< typename JFT, typename CFT,
+          typename JAT = JFT, typename CAT = CFT >
+struct ttrait
+{
+    typedef JFT JF_t; // Java formal paramater/result type
+    typedef JAT JA_t; // Java actual paramater/result type
+    typedef CAT CA_t; // C formal paramater/result type
+    typedef CFT CF_t; // C actual paramater/result type
+};
+
+/*
+template< typename CFT,
+          typename CAT >
+struct ttrait< jobject, CFT, j_n_ByteBuffer, CAT >
+{
+    typedef JFT JF_t; // Java formal paramater/result type
+    typedef JAT JA_t; // Java actual paramater/result type
+    typedef CAT CA_t; // C formal paramater/result type
+    typedef CFT CF_t; // C actual paramater/result type
+};
+*/
+
+ /*
+// specialization for const C formal parameter/result types
+template< typename JFT, typename CFT >
+struct ttrait< JFT, const CFT >
+{
+    typedef JFT JF_t;
+    typedef JFT JA_t;
+    typedef CFT CA_t;       // strip const from the actual type
+    typedef const CFT CF_t; // keep const in formal type
+};
+ */
+
+/*
+template<>
+struct ttrait< jobject, const signed int, j_n_ByteBuffer, signed int >
+{
+    typedef jint JF_t; // Java formal paramater/result type
+    typedef jint JA_t; // Java actual paramater/result type
+    typedef CAT CA_t; // C formal paramater/result type
+    typedef CFT CF_t; // C actual paramater/result type
+};
+*/
+
+#endif // jtie_ttrait_hpp

=== added directory 'storage/ndb/ndbjtie/src/myapi'
=== added file 'storage/ndb/ndbjtie/src/myapi/Makefile'
--- a/storage/ndb/ndbjtie/src/myapi/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myapi/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,105 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+
+# preprocessing defines:
+  DDEFINES 	= 
+
+  DELIVERABLES	= libmyapi.a libmyapi.$(DLL_SUFFIX) myapi_test
+
+  CLEAN		= core *.o *.class
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *%
+
+  SRCS		= *.cpp
+
+# currently, not needed:
+#  OBJECTS	= $(SRC:.c=.o)
+#  OBJECTS	+= $(SRC:.cc=.o)
+#  OBJECTS	+= $(SRC:.cpp=.o)
+
+  INCLUDES	= -I. -I.. $(JAVA_INCLUDEOPTS)
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+# CLOCK_GETTIME requires -lrt
+  LDLIBS	=
+#  LDLIBS	= -lrt
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+myapi_test:	libmyapi.a
+
+libmyapi.a:	libmyapi.a(myapi.o)
+
+libmyapi.so:	libmyapi.a
+	$(LINK.cpp) \
+	-fPIC -shared \
+	$(LDLIBS) \
+	-o libmyapi.so \
+	myapi.o \
+	libmyapi.a
+
+libmyapi.dylib:	libmyapi.a
+	$(LINK.cpp) \
+	-fPIC -shared -dynamiclib \
+	$(LDLIBS) \
+	-o libmyapi.dylib \
+	myapi.o \
+	libmyapi.a
+
+#	-Wl,-rpath -Wl,. libmyapi.dylib
+# myapi.o hrt_stopwatch.o hrt_myapi.o
+
+# undefined references to be resolved by LD_LIBRARY_PATH:
+#	libmyapi.so
+# or
+#	-L. \
+#	-lmyapi \
+# ldd libjnitest.so
+#       libmyapi.so => not found
+
+# symbolical references with default library path:
+#
+#	-Wl,-rpath -Wl,/home/md/martins_little_helpers/src/myapi \
+# ldd libjnitest.so
+#        libmyapi.so => /home/md/martins_little_helpers/src/myapi/libmyapi.so (0xb7f8d000)
+#
+#	-Wl,-rpath -Wl,. \
+# ldd libjnitest.so
+#        libmyapi.so => ./libmyapi.so (0xb7edd000)
+
+# statically linked references:
+#	libmyapi.a
+# ldd libjnitest.so
+#       ...
+
+dep depend:	
+
+.PHONY: run.test
+run.test:	myapi_test
+	./myapi_test
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added file 'storage/ndb/ndbjtie/src/myapi/myapi.cpp'
--- a/storage/ndb/ndbjtie/src/myapi/myapi.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myapi/myapi.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,1564 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myapi.cpp
+ */
+
+#include <cstdio>
+#include <cstring>
+
+#include "myapi.hpp"
+#include "helpers.hpp"
+
+void f0()
+{
+    TRACE("void f0()");
+}
+
+// ---------------------------------------------------------------------------
+
+A * A::a = new A();
+
+// ---------------------------------------------------------------------------
+
+const void * s010();
+
+const char * s012()
+{
+    TRACE("const char * s012()");
+    static const char * _s012 = "abc";
+    return _s012;
+}
+
+void * s030();
+
+char * s032()
+{
+    TRACE("char * s032()");
+    static char _s032[5] = { 's', '0', '3', '2', '\0' };
+    return _s032;
+}
+
+void s110(const void * p0);
+
+void s112(const char * p0)
+{
+    TRACE("void f112(const char *)");
+    static const char * _f112 = "abc";
+    if (strcmp(p0, _f112) != 0) ABORT_ERROR("void f112(const char *)");
+}
+
+void s130(void * p0);
+
+void s132(char * p0);
+
+// ---------------------------------------------------------------------------
+
+const bool f11(const bool p0)
+{
+    TRACE("const bool f11(const bool)");
+    return p0;
+}
+
+const char f12(const char p0)
+{
+    TRACE("const char f12(const char)");
+    return p0;
+}
+
+const signed char f13(const signed char p0)
+{
+    TRACE("const signed char f13(const signed char)");
+    return p0;
+}
+
+const unsigned char f14(const unsigned char p0)
+{
+    TRACE("const unsigned char f14(const unsigned char)");
+    return p0;
+}
+
+const signed short f15(const signed short p0)
+{
+    TRACE("const signed short f15(const signed short)");
+    return p0;
+}
+
+const unsigned short f16(const unsigned short p0)
+{
+    TRACE("const unsigned short f16(const unsigned short)");
+    return p0;
+}
+
+const signed int f17(const signed int p0)
+{
+    TRACE("const signed int f17(const signed int)");
+    return p0;
+}
+
+const unsigned int f18(const unsigned int p0)
+{
+    TRACE("const unsigned int f18(const unsigned int)");
+    return p0;
+}
+
+const signed long f19(const signed long p0)
+{
+    TRACE("const signed long f19(const signed long)");
+    return p0;
+}
+
+const unsigned long f20(const unsigned long p0)
+{
+    TRACE("const unsigned long f20(const unsigned long)");
+    return p0;
+}
+
+const signed long long f21(const signed long long p0)
+{
+    TRACE("const signed long long f21(const signed long long)");
+    return p0;
+}
+
+const unsigned long long f22(const unsigned long long p0)
+{
+    TRACE("const unsigned long long f22(const unsigned long long)");
+    return p0;
+}
+
+const float f23(const float p0)
+{
+    TRACE("const float f23(const float)");
+    return p0;
+}
+
+const double f24(const double p0)
+{
+    TRACE("const double f24(const double)");
+    return p0;
+}
+
+const long double f25(const long double p0)
+{
+    TRACE("const long double f25(const long double)");
+    return p0;
+}
+
+bool f31(bool p0)
+{
+    TRACE("bool f31(bool)");
+    return p0;
+}
+
+char f32(char p0)
+{
+    TRACE("char f32(char)");
+    return p0;
+}
+
+signed char f33(signed char p0)
+{
+    TRACE("signed char f33(signed char)");
+    return p0;
+}
+
+unsigned char f34(unsigned char p0)
+{
+    TRACE("unsigned char f34(unsigned char)");
+    return p0;
+}
+
+signed short f35(signed short p0)
+{
+    TRACE("signed short f35(signed short)");
+    return p0;
+}
+
+unsigned short f36(unsigned short p0)
+{
+    TRACE("unsigned short f36(unsigned short)");
+    return p0;
+}
+
+signed int f37(signed int p0)
+{
+    TRACE("signed int f37(signed int)");
+    return p0;
+}
+
+unsigned int f38(unsigned int p0)
+{
+    TRACE("unsigned int f38(unsigned int)");
+    return p0;
+}
+
+signed long f39(signed long p0)
+{
+    TRACE("signed long f39(signed long)");
+    return p0;
+}
+
+unsigned long f40(unsigned long p0)
+{
+    TRACE("unsigned long f40(unsigned long)");
+    return p0;
+}
+
+signed long long f41(signed long long p0)
+{
+    TRACE("signed long long f41(signed long long)");
+    return p0;
+}
+
+unsigned long long f42(unsigned long long p0)
+{
+    TRACE("unsigned long long f42(unsigned long long)");
+    return p0;
+}
+
+float f43(float p0)
+{
+    TRACE("float f43(float)");
+    return p0;
+}
+
+double f44(double p0)
+{
+    TRACE("double f44(double)");
+    return p0;
+}
+
+long double f45(long double p0)
+{
+    TRACE("long double f45(long double)");
+    return p0;
+}
+
+// ---------------------------------------------------------------------------
+
+const bool f011()
+{
+    TRACE("const bool f011()");
+    static bool _f011 = 0;
+    _f011 = !_f011;
+    return _f011;
+}
+
+const char f012()
+{
+    TRACE("const char f012()");
+    static char _f012 = 0;
+    _f012++;
+    return _f012;
+}
+
+const signed char f013()
+{
+    TRACE("const signed char f013()");
+    static signed char _f013 = 0;
+    _f013++;
+    return _f013;
+}
+
+const unsigned char f014()
+{
+    TRACE("const unsigned char f014()");
+    static unsigned char _f014 = 0;
+    _f014++;
+    return _f014;
+}
+
+const signed short f015()
+{
+    TRACE("const signed short f015()");
+    static signed short _f015 = 0;
+    _f015++;
+    return _f015;
+}
+
+const unsigned short f016()
+{
+    TRACE("const unsigned short f016()");
+    static unsigned short _f016 = 0;
+    _f016++;
+    return _f016;
+}
+
+const signed int f017()
+{
+    TRACE("const signed int f017()");
+    static signed int _f017 = 0;
+    _f017++;
+    return _f017;
+}
+
+const unsigned int f018()
+{
+    TRACE("const unsigned int f018()");
+    static unsigned int _f018 = 0;
+    _f018++;
+    return _f018;
+}
+
+const signed long long f021()
+{
+    TRACE("const signed long long f021()");
+    static signed long long _f021 = 0;
+    _f021++;
+    return _f021;
+}
+
+const unsigned long long f022()
+{
+    TRACE("const unsigned long long f022()");
+    static unsigned long long _f022 = 0;
+    _f022++;
+    return _f022;
+}
+
+const float f023()
+{
+    TRACE("const float f023()");
+    static float _f023 = 0;
+    _f023++;
+    return _f023;
+}
+
+const double f024()
+{
+    TRACE("const double f024()");
+    static double _f024 = 0;
+    _f024++;
+    return _f024;
+}
+
+const long double f025()
+{
+    TRACE("const long double f025()");
+    static long double _f025 = 0;
+    _f025++;
+    return _f025;
+}
+
+bool f031()
+{
+    TRACE("bool f031()");
+    static bool _f031 = 0;
+    _f031 = !_f031;
+    return _f031;
+}
+
+char f032()
+{
+    TRACE("char f032()");
+    static char _f032 = 0;
+    _f032++;
+    return _f032;
+}
+
+signed char f033()
+{
+    TRACE("signed char f033()");
+    static signed char _f033 = 0;
+    _f033++;
+    return _f033;
+}
+
+unsigned char f034()
+{
+    TRACE("unsigned char f034()");
+    static unsigned char _f034 = 0;
+    _f034++;
+    return _f034;
+}
+
+signed short f035()
+{
+    TRACE("signed short f035()");
+    static signed short _f035 = 0;
+    _f035++;
+    return _f035;
+}
+
+unsigned short f036()
+{
+    TRACE("unsigned short f036()");
+    static unsigned short _f036 = 0;
+    _f036++;
+    return _f036;
+}
+
+signed int f037()
+{
+    TRACE("signed int f037()");
+    static signed int _f037 = 0;
+    _f037++;
+    return _f037;
+}
+
+unsigned int f038()
+{
+    TRACE("unsigned int f038()");
+    static unsigned int _f038 = 0;
+    _f038++;
+    return _f038;
+}
+
+signed long long f041()
+{
+    TRACE("signed long long f041()");
+    static signed long long _f041 = 0;
+    _f041++;
+    return _f041;
+}
+
+unsigned long long f042()
+{
+    TRACE("unsigned long long f042()");
+    static unsigned long long _f042 = 0;
+    _f042++;
+    return _f042;
+}
+
+float f043()
+{
+    TRACE("float f043()");
+    static float _f043 = 0;
+    _f043++;
+    return _f043;
+}
+
+double f044()
+{
+    TRACE("double f044()");
+    static double _f044 = 0;
+    _f044++;
+    return _f044;
+}
+
+long double f045()
+{
+    TRACE("long double f045()");
+    static long double _f045 = 0;
+    _f045++;
+    return _f045;
+}
+
+// ---------------------------------------------------------------------------
+
+void f111(const bool p0)
+{
+    TRACE("void f111(const bool)");
+    static bool _f111 = 0;
+    _f111 = !_f111;
+    if (p0 != _f111) ABORT_ERROR("void f111(const bool)");
+}
+
+void f112(const char p0)
+{
+    TRACE("void f112(const char)");
+    static char _f112 = 0;
+    _f112++;
+    if (p0 != _f112) ABORT_ERROR("void f112(const char)");
+}
+
+void f113(const signed char p0)
+{
+    TRACE("void f113(const signed char)");
+    static signed char _f113 = 0;
+    _f113++;
+    if (p0 != _f113) ABORT_ERROR("void f113(const signed char)");
+}
+
+void f114(const unsigned char p0)
+{
+    TRACE("void f114(const unsigned char)");
+    static unsigned char _f114 = 0;
+    _f114++;
+    if (p0 != _f114) ABORT_ERROR("void f114(const unsigned char)");
+}
+
+void f115(const signed short p0)
+{
+    TRACE("void f115(const signed short)");
+    static signed short _f115 = 0;
+    _f115++;
+    if (p0 != _f115) ABORT_ERROR("void f115(const signed short)");
+}
+
+void f116(const unsigned short p0)
+{
+    TRACE("void f116(const unsigned short)");
+    static unsigned short _f116 = 0;
+    _f116++;
+    if (p0 != _f116) ABORT_ERROR("void f116(const unsigned short)");
+}
+
+void f117(const signed int p0)
+{
+    TRACE("void f117(const signed int)");
+    static signed int _f117 = 0;
+    _f117++;
+    if (p0 != _f117) ABORT_ERROR("void f117(const signed int)");
+}
+
+void f118(const unsigned int p0)
+{
+    TRACE("void f118(const unsigned int)");
+    static unsigned int _f118 = 0;
+    _f118++;
+    if (p0 != _f118) ABORT_ERROR("void f118(const unsigned int)");
+}
+
+void f121(const signed long long p0)
+{
+    TRACE("void f121(const signed long long)");
+    static signed long long _f121 = 0;
+    _f121++;
+    if (p0 != _f121) ABORT_ERROR("void f121(const signed long long)");
+}
+
+void f122(const unsigned long long p0)
+{
+    TRACE("void f122(const unsigned long long)");
+    static unsigned long long _f122 = 0;
+    _f122++;
+    if (p0 != _f122) ABORT_ERROR("void f122(const unsigned long long)");
+}
+
+void f123(const float p0)
+{
+    TRACE("void f123(const float)");
+    static float _f123 = 0;
+    _f123++;
+    if (p0 != _f123) ABORT_ERROR("void f123(const float)");
+}
+
+void f124(const double p0)
+{
+    TRACE("void f124(const double)");
+    static double _f124 = 0;
+    _f124++;
+    if (p0 != _f124) ABORT_ERROR("void f124(const double)");
+}
+
+void f125(const long double p0)
+{
+    TRACE("void f125(const long double)");
+    static long double _f125 = 0;
+    _f125++;
+    if (p0 != _f125) ABORT_ERROR("void f125(const long double)");
+}
+
+void f131(bool p0)
+{
+    TRACE("void f131(bool)");
+    static bool _f131 = 0;
+    _f131 = !_f131;
+    if (p0 != _f131) ABORT_ERROR("void f131(bool)");
+}
+
+void f132(char p0)
+{
+    TRACE("void f132(char)");
+    static char _f132 = 0;
+    _f132++;
+    if (p0 != _f132) ABORT_ERROR("void f132(char)");
+}
+
+void f133(signed char p0)
+{
+    TRACE("void f133(signed char)");
+    static signed char _f133 = 0;
+    _f133++;
+    if (p0 != _f133) ABORT_ERROR("void f133(signed char)");
+}
+
+void f134(unsigned char p0)
+{
+    TRACE("void f134(unsigned char)");
+    static unsigned char _f134 = 0;
+    _f134++;
+    if (p0 != _f134) ABORT_ERROR("void f134(unsigned char)");
+}
+
+void f135(signed short p0)
+{
+    TRACE("void f135(signed short)");
+    static signed short _f135 = 0;
+    _f135++;
+    if (p0 != _f135) ABORT_ERROR("void f135(signed short)");
+}
+
+void f136(unsigned short p0)
+{
+    TRACE("void f136(unsigned short)");
+    static unsigned short _f136 = 0;
+    _f136++;
+    if (p0 != _f136) ABORT_ERROR("void f136(unsigned short)");
+}
+
+void f137(signed int p0)
+{
+    TRACE("void f137(signed int)");
+    static signed int _f137 = 0;
+    _f137++;
+    if (p0 != _f137) ABORT_ERROR("void f137(signed int)");
+}
+
+void f138(unsigned int p0)
+{
+    TRACE("void f138(unsigned int)");
+    static unsigned int _f138 = 0;
+    _f138++;
+    if (p0 != _f138) ABORT_ERROR("void f138(unsigned int)");
+}
+
+void f141(signed long long p0)
+{
+    TRACE("void f141(signed long long)");
+    static signed long long _f141 = 0;
+    _f141++;
+    if (p0 != _f141) ABORT_ERROR("void f141(signed long long)");
+}
+
+void f142(unsigned long long p0)
+{
+    TRACE("void f142(unsigned long long)");
+    static unsigned long long _f142 = 0;
+    _f142++;
+    if (p0 != _f142) ABORT_ERROR("void f142(unsigned long long)");
+}
+
+void f143(float p0)
+{
+    TRACE("void f143(float)");
+    static float _f143 = 0;
+    _f143++;
+    if (p0 != _f143) ABORT_ERROR("void f143(float)");
+}
+
+void f144(double p0)
+{
+    TRACE("void f144(double)");
+    static double _f144 = 0;
+    _f144++;
+    if (p0 != _f144) ABORT_ERROR("void f144(double)");
+}
+
+void f145(long double p0)
+{
+    TRACE("void f145(long double)");
+    static long double _f145 = 0;
+    _f145++;
+    if (p0 != _f145) ABORT_ERROR("void f145(long double)");
+}
+
+// ---------------------------------------------------------------------------
+
+const bool & f211()
+{
+    TRACE("const bool & f211()");
+    static bool _f211 = 0;
+    _f211 = !_f211;
+    return _f211;
+}
+
+const char & f212()
+{
+    TRACE("const char & f212()");
+    static char _f212 = 0;
+    _f212++;
+    return _f212;
+}
+
+const signed char & f213()
+{
+    TRACE("const signed char & f213()");
+    static signed char _f213 = 0;
+    _f213++;
+    return _f213;
+}
+
+const unsigned char & f214()
+{
+    TRACE("const unsigned char & f214()");
+    static unsigned char _f214 = 0;
+    _f214++;
+    return _f214;
+}
+
+const signed short & f215()
+{
+    TRACE("const signed short & f215()");
+    static signed short _f215 = 0;
+    _f215++;
+    return _f215;
+}
+
+const unsigned short & f216()
+{
+    TRACE("const unsigned short & f216()");
+    static unsigned short _f216 = 0;
+    _f216++;
+    return _f216;
+}
+
+const signed int & f217()
+{
+    TRACE("const signed int & f217()");
+    static signed int _f217 = 0;
+    _f217++;
+    return _f217;
+}
+
+const unsigned int & f218()
+{
+    TRACE("const unsigned int & f218()");
+    static unsigned int _f218 = 0;
+    _f218++;
+    return _f218;
+}
+
+const signed long long & f221()
+{
+    TRACE("const signed long long & f221()");
+    static signed long long _f221 = 0;
+    _f221++;
+    return _f221;
+}
+
+const unsigned long long & f222()
+{
+    TRACE("const unsigned long long & f222()");
+    static unsigned long long _f222 = 0;
+    _f222++;
+    return _f222;
+}
+
+const float & f223()
+{
+    TRACE("const & float f223()");
+    static float _f223 = 0;
+    _f223++;
+    return _f223;
+}
+
+const double & f224()
+{
+    TRACE("const double & f224()");
+    static double _f224 = 0;
+    _f224++;
+    return _f224;
+}
+
+const long double & f225()
+{
+    TRACE("const long double & f225()");
+    static long double _f225 = 0;
+    _f225++;
+    return _f225;
+}
+
+bool & f231()
+{
+    TRACE("bool & f231()");
+    static bool _f231 = 0;
+    _f231 = !_f231;
+    return _f231;
+}
+
+char & f232()
+{
+    TRACE("char & f232()");
+    static char _f232 = 0;
+    _f232++;
+    return _f232;
+}
+
+signed char & f233()
+{
+    TRACE("signed char & f233()");
+    static signed char _f233 = 0;
+    _f233++;
+    return _f233;
+}
+
+unsigned char & f234()
+{
+    TRACE("unsigned char & f234()");
+    static unsigned char _f234 = 0;
+    _f234++;
+    return _f234;
+}
+
+signed short & f235()
+{
+    TRACE("signed short & f235()");
+    static signed short _f235 = 0;
+    _f235++;
+    return _f235;
+}
+
+unsigned short & f236()
+{
+    TRACE("unsigned short & f236()");
+    static unsigned short _f236 = 0;
+    _f236++;
+    return _f236;
+}
+
+signed int & f237()
+{
+    TRACE("signed int & f237()");
+    static signed int _f237 = 0;
+    _f237++;
+    return _f237;
+}
+
+unsigned int & f238()
+{
+    TRACE("unsigned int & f238()");
+    static unsigned int _f238 = 0;
+    _f238++;
+    return _f238;
+}
+
+signed long long & f241()
+{
+    TRACE("signed long long & f241()");
+    static signed long long _f241 = 0;
+    _f241++;
+    return _f241;
+}
+
+unsigned long long & f242()
+{
+    TRACE("unsigned long long & f242()");
+    static unsigned long long _f242 = 0;
+    _f242++;
+    return _f242;
+}
+
+float & f243()
+{
+    TRACE("float & f243()");
+    static float _f243 = 0;
+    _f243++;
+    return _f243;
+}
+
+double & f244()
+{
+    TRACE("double & f244()");
+    static double _f244 = 0;
+    _f244++;
+    return _f244;
+}
+
+long double & f245()
+{
+    TRACE("long double & f245()");
+    static long double _f245 = 0;
+    _f245++;
+    return _f245;
+}
+
+// ---------------------------------------------------------------------------
+
+void f311(const bool & p0)
+{
+    TRACE("void f311(const bool &)");
+    static bool _f311 = 0;
+    _f311 = !_f311;
+    if (p0 != _f311) ABORT_ERROR("void f311(const bool &)");
+}
+
+void f312(const char & p0)
+{
+    TRACE("void f312(const char &)");
+    static char _f312 = 0;
+    _f312++;
+    if (p0 != _f312) ABORT_ERROR("void f312(const char &)");
+}
+
+void f313(const signed char & p0)
+{
+    TRACE("void f313(const signed char &)");
+    static signed char _f313 = 0;
+    _f313++;
+    if (p0 != _f313) ABORT_ERROR("void f313(const signed char &)");
+}
+
+void f314(const unsigned char & p0)
+{
+    TRACE("void f314(const unsigned char &)");
+    static unsigned char _f314 = 0;
+    _f314++;
+    if (p0 != _f314) ABORT_ERROR("void f314(const unsigned char &)");
+}
+
+void f315(const signed short & p0)
+{
+    TRACE("void f315(const signed short &)");
+    static signed short _f315 = 0;
+    _f315++;
+    if (p0 != _f315) ABORT_ERROR("void f315(const signed short &)");
+}
+
+void f316(const unsigned short & p0)
+{
+    TRACE("void f316(const unsigned short &)");
+    static unsigned short _f316 = 0;
+    _f316++;
+    if (p0 != _f316) ABORT_ERROR("void f316(const unsigned short &)");
+}
+
+void f317(const signed int & p0)
+{
+    TRACE("void f317(const signed int &)");
+    static signed int _f317 = 0;
+    _f317++;
+    if (p0 != _f317) ABORT_ERROR("void f317(const signed int &)");
+}
+
+void f318(const unsigned int & p0)
+{
+    TRACE("void f318(const unsigned int &)");
+    static unsigned int _f318 = 0;
+    _f318++;
+    if (p0 != _f318) ABORT_ERROR("void f318(const unsigned int &)");
+}
+
+void f321(const signed long long & p0)
+{
+    TRACE("void f321(const signed long long &)");
+    static signed long long _f321 = 0;
+    _f321++;
+    if (p0 != _f321) ABORT_ERROR("void f321(const signed long long &)");
+}
+
+void f322(const unsigned long long & p0)
+{
+    TRACE("void f322(const unsigned long long &)");
+    static unsigned long long _f322 = 0;
+    _f322++;
+    if (p0 != _f322) ABORT_ERROR("void f322(const unsigned long long &)");
+}
+
+void f323(const float & p0)
+{
+    TRACE("void f323(const float &)");
+    static float _f323 = 0;
+    _f323++;
+    if (p0 != _f323) ABORT_ERROR("void f323(const float &)");
+}
+
+void f324(const double & p0)
+{
+    TRACE("void f324(const double &)");
+    static double _f324 = 0;
+    _f324++;
+    if (p0 != _f324) ABORT_ERROR("void f324(const double &)");
+}
+
+void f325(const long double & p0)
+{
+    TRACE("void f325(const long double &)");
+    static long double _f325 = 0;
+    _f325++;
+    if (p0 != _f325) ABORT_ERROR("void f325(const long double &)");
+}
+
+void f331(bool & p0)
+{
+    TRACE("void f331(bool &)");
+    static bool _f331 = 0;
+    _f331 = !_f331;
+    if (p0 != _f331) ABORT_ERROR("void f331(bool &)");
+    p0 = !p0;
+    _f331 = !_f331;
+}
+
+void f332(char & p0)
+{
+    TRACE("void f332(char &)");
+    static char _f332 = 0;
+    _f332++;
+    if (p0 != _f332) ABORT_ERROR("void f332(char &)");
+    p0++;
+    _f332++;
+}
+
+void f333(signed char & p0)
+{
+    TRACE("void f333(signed char &)");
+    static signed char _f333 = 0;
+    _f333++;
+    if (p0 != _f333) ABORT_ERROR("void f333(signed char &)");
+    p0++;
+    _f333++;
+}
+
+void f334(unsigned char & p0)
+{
+    TRACE("void f334(unsigned char &)");
+    static unsigned char _f334 = 0;
+    _f334++;
+    if (p0 != _f334) ABORT_ERROR("void f334(unsigned char &)");
+    p0++;
+    _f334++;
+}
+
+void f335(signed short & p0)
+{
+    TRACE("void f335(signed short &)");
+    static signed short _f335 = 0;
+    _f335++;
+    if (p0 != _f335) ABORT_ERROR("void f335(signed short &)");
+    p0++;
+    _f335++;
+}
+
+void f336(unsigned short & p0)
+{
+    TRACE("void f336(unsigned short &)");
+    static unsigned short _f336 = 0;
+    _f336++;
+    if (p0 != _f336) ABORT_ERROR("void f336(unsigned short &)");
+    p0++;
+    _f336++;
+}
+
+void f337(signed int & p0)
+{
+    TRACE("void f337(signed int &)");
+    static signed int _f337 = 0;
+    _f337++;
+    if (p0 != _f337) ABORT_ERROR("void f337(signed int &)");
+    p0++;
+    _f337++;
+}
+
+void f338(unsigned int & p0)
+{
+    TRACE("void f338(unsigned int &)");
+    static unsigned int _f338 = 0;
+    _f338++;
+    if (p0 != _f338) ABORT_ERROR("void f338(unsigned int &)");
+    p0++;
+    _f338++;
+}
+
+void f341(signed long long & p0)
+{
+    TRACE("void f341(signed long long &)");
+    static signed long long _f341 = 0;
+    _f341++;
+    if (p0 != _f341) ABORT_ERROR("void f341(signed long long &)");
+    p0++;
+    _f341++;
+}
+
+void f342(unsigned long long & p0)
+{
+    TRACE("void f342(unsigned long long &)");
+    static unsigned long long _f342 = 0;
+    _f342++;
+    if (p0 != _f342) ABORT_ERROR("void f342(unsigned long long &)");
+    p0++;
+    _f342++;
+}
+
+void f343(float & p0)
+{
+    TRACE("void f343(float &)");
+    static float _f343 = 0;
+    _f343++;
+    if (p0 != _f343) ABORT_ERROR("void f343(float &)");
+    p0++;
+    _f343++;
+}
+
+void f344(double & p0)
+{
+    TRACE("void f344(double &)");
+    static double _f344 = 0;
+    _f344++;
+    if (p0 != _f344) ABORT_ERROR("void f344(double &)");
+    p0++;
+    _f344++;
+}
+
+void f345(long double & p0)
+{
+    TRACE("void f345(long double &)");
+    static long double _f345 = 0;
+    _f345++;
+    if (p0 != _f345) ABORT_ERROR("void f345(long double &)");
+    p0++;
+    _f345++;
+}
+
+// ---------------------------------------------------------------------------
+
+const bool * f411()
+{
+    TRACE("const bool * f411()");
+    static bool _f411 = 0;
+    _f411 = !_f411;
+    return &_f411;
+}
+
+const char * f412()
+{
+    TRACE("const char * f412()");
+    static char _f412 = 0;
+    _f412++;
+    return &_f412;
+}
+
+const signed char * f413()
+{
+    TRACE("const signed char * f413()");
+    static signed char _f413 = 0;
+    _f413++;
+    return &_f413;
+}
+
+const unsigned char * f414()
+{
+    TRACE("const unsigned char * f414()");
+    static unsigned char _f414 = 0;
+    _f414++;
+    return &_f414;
+}
+
+const signed short * f415()
+{
+    TRACE("const signed short * f415()");
+    static signed short _f415 = 0;
+    _f415++;
+    return &_f415;
+}
+
+const unsigned short * f416()
+{
+    TRACE("const unsigned short * f416()");
+    static unsigned short _f416 = 0;
+    _f416++;
+    return &_f416;
+}
+
+const signed int * f417()
+{
+    TRACE("const signed int * f417()");
+    static signed int _f417 = 0;
+    _f417++;
+    return &_f417;
+}
+
+const unsigned int * f418()
+{
+    TRACE("const unsigned int * f418()");
+    static unsigned int _f418 = 0;
+    _f418++;
+    return &_f418;
+}
+
+const signed long long * f421()
+{
+    TRACE("const signed long long * f421()");
+    static signed long long _f421 = 0;
+    _f421++;
+    return &_f421;
+}
+
+const unsigned long long * f422()
+{
+    TRACE("const unsigned long long * f422()");
+    static unsigned long long _f422 = 0;
+    _f422++;
+    return &_f422;
+}
+
+const float * f423()
+{
+    TRACE("const * float f423()");
+    static float _f423 = 0;
+    _f423++;
+    return &_f423;
+}
+
+const double * f424()
+{
+    TRACE("const double * f424()");
+    static double _f424 = 0;
+    _f424++;
+    return &_f424;
+}
+
+const long double * f425()
+{
+    TRACE("const long double * f425()");
+    static long double _f425 = 0;
+    _f425++;
+    return &_f425;
+}
+
+bool * f431()
+{
+    TRACE("bool * f431()");
+    static bool _f431 = 0;
+    _f431 = !_f431;
+    return &_f431;
+}
+
+char * f432()
+{
+    TRACE("char * f432()");
+    static char _f432 = 0;
+    _f432++;
+    return &_f432;
+}
+
+signed char * f433()
+{
+    TRACE("signed char * f433()");
+    static signed char _f433 = 0;
+    _f433++;
+    return &_f433;
+}
+
+unsigned char * f434()
+{
+    TRACE("unsigned char * f434()");
+    static unsigned char _f434 = 0;
+    _f434++;
+    return &_f434;
+}
+
+signed short * f435()
+{
+    TRACE("signed short * f435()");
+    static signed short _f435 = 0;
+    _f435++;
+    return &_f435;
+}
+
+unsigned short * f436()
+{
+    TRACE("unsigned short * f436()");
+    static unsigned short _f436 = 0;
+    _f436++;
+    return &_f436;
+}
+
+signed int * f437()
+{
+    TRACE("signed int * f437()");
+    static signed int _f437 = 0;
+    _f437++;
+    return &_f437;
+}
+
+unsigned int * f438()
+{
+    TRACE("unsigned int * f438()");
+    static unsigned int _f438 = 0;
+    _f438++;
+    return &_f438;
+}
+
+signed long long * f441()
+{
+    TRACE("signed long long * f441()");
+    static signed long long _f441 = 0;
+    _f441++;
+    return &_f441;
+}
+
+unsigned long long * f442()
+{
+    TRACE("unsigned long long * f442()");
+    static unsigned long long _f442 = 0;
+    _f442++;
+    return &_f442;
+}
+
+float * f443()
+{
+    TRACE("float * f443()");
+    static float _f443 = 0;
+    _f443++;
+    return &_f443;
+}
+
+double * f444()
+{
+    TRACE("double * f444()");
+    static double _f444 = 0;
+    _f444++;
+    return &_f444;
+}
+
+long double * f445()
+{
+    TRACE("long double * f445()");
+    static long double _f445 = 0;
+    _f445++;
+    return &_f445;
+}
+
+// ---------------------------------------------------------------------------
+
+void f511(const bool * p0)
+{
+    TRACE("void f511(const bool *)");
+    static bool _f511 = 0;
+    _f511 = !_f511;
+    if (*p0 != _f511) ABORT_ERROR("void f511(const bool *)");
+}
+
+void f512(const char * p0)
+{
+    TRACE("void f512(const char *)");
+    static char _f512 = 0;
+    _f512++;
+    if (*p0 != _f512) ABORT_ERROR("void f512(const char *)");
+}
+
+void f513(const signed char * p0)
+{
+    TRACE("void f513(const signed char *)");
+    static signed char _f513 = 0;
+    _f513++;
+    if (*p0 != _f513) ABORT_ERROR("void f513(const signed char *)");
+}
+
+void f514(const unsigned char * p0)
+{
+    TRACE("void f514(const unsigned char *)");
+    static unsigned char _f514 = 0;
+    _f514++;
+    if (*p0 != _f514) ABORT_ERROR("void f514(const unsigned char *)");
+}
+
+void f515(const signed short * p0)
+{
+    TRACE("void f515(const signed short *)");
+    static signed short _f515 = 0;
+    _f515++;
+    if (*p0 != _f515) ABORT_ERROR("void f515(const signed short *)");
+}
+
+void f516(const unsigned short * p0)
+{
+    TRACE("void f516(const unsigned short *)");
+    static unsigned short _f516 = 0;
+    _f516++;
+    if (*p0 != _f516) ABORT_ERROR("void f516(const unsigned short *)");
+}
+
+void f517(const signed int * p0)
+{
+    TRACE("void f517(const signed int *)");
+    static signed int _f517 = 0;
+    _f517++;
+    if (*p0 != _f517) ABORT_ERROR("void f517(const signed int *)");
+}
+
+void f518(const unsigned int * p0)
+{
+    TRACE("void f518(const unsigned int *)");
+    static unsigned int _f518 = 0;
+    _f518++;
+    if (*p0 != _f518) ABORT_ERROR("void f518(const unsigned int *)");
+}
+
+void f521(const signed long long * p0)
+{
+    TRACE("void f521(const signed long long *)");
+    static signed long long _f521 = 0;
+    _f521++;
+    if (*p0 != _f521) ABORT_ERROR("void f521(const signed long long *)");
+}
+
+void f522(const unsigned long long * p0)
+{
+    TRACE("void f522(const unsigned long long *)");
+    static unsigned long long _f522 = 0;
+    _f522++;
+    if (*p0 != _f522) ABORT_ERROR("void f522(const unsigned long long *)");
+}
+
+void f523(const float * p0)
+{
+    TRACE("void f523(const float *)");
+    static float _f523 = 0;
+    _f523++;
+    if (*p0 != _f523) ABORT_ERROR("void f523(const float *)");
+}
+
+void f524(const double * p0)
+{
+    TRACE("void f524(const double *)");
+    static double _f524 = 0;
+    _f524++;
+    if (*p0 != _f524) ABORT_ERROR("void f524(const double *)");
+}
+
+void f525(const long double * p0)
+{
+    TRACE("void f525(const long double *)");
+    static long double _f525 = 0;
+    _f525++;
+    if (*p0 != _f525) ABORT_ERROR("void f525(const long double *)");
+}
+
+void f531(bool * p0)
+{
+    TRACE("void f531(bool *)");
+    static bool _f531 = 0;
+    _f531 = !_f531;
+    if (*p0 != _f531) ABORT_ERROR("void f531(bool *)");
+    *p0 = !*p0;
+    _f531 = !_f531;
+}
+
+void f532(char * p0)
+{
+    TRACE("void f532(char *)");
+    static char _f532 = 0;
+    _f532++;
+    if (*p0 != _f532) ABORT_ERROR("void f532(char *)");
+    (*p0)++;
+    _f532++;
+}
+
+void f533(signed char * p0)
+{
+    TRACE("void f533(signed char *)");
+    static signed char _f533 = 0;
+    _f533++;
+    if (*p0 != _f533) ABORT_ERROR("void f533(signed char *)");
+    (*p0)++;
+    _f533++;
+}
+
+void f534(unsigned char * p0)
+{
+    TRACE("void f534(unsigned char *)");
+    static unsigned char _f534 = 0;
+    _f534++;
+    if (*p0 != _f534) ABORT_ERROR("void f534(unsigned char *)");
+    (*p0)++;
+    _f534++;
+}
+
+void f535(signed short * p0)
+{
+    TRACE("void f535(signed short *)");
+    static signed short _f535 = 0;
+    _f535++;
+    if (*p0 != _f535) ABORT_ERROR("void f535(signed short *)");
+    (*p0)++;
+    _f535++;
+}
+
+void f536(unsigned short * p0)
+{
+    TRACE("void f536(unsigned short *)");
+    static unsigned short _f536 = 0;
+    _f536++;
+    if (*p0 != _f536) ABORT_ERROR("void f536(unsigned short *)");
+    (*p0)++;
+    _f536++;
+}
+
+void f537(signed int * p0)
+{
+    TRACE("void f537(signed int *)");
+    static signed int _f537 = 0;
+    _f537++;
+    if (*p0 != _f537) ABORT_ERROR("void f537(signed int *)");
+    (*p0)++;
+    _f537++;
+}
+
+void f538(unsigned int * p0)
+{
+    TRACE("void f538(unsigned int *)");
+    static unsigned int _f538 = 0;
+    _f538++;
+    if (*p0 != _f538) ABORT_ERROR("void f538(unsigned int *)");
+    (*p0)++;
+    _f538++;
+}
+
+void f541(signed long long * p0)
+{
+    TRACE("void f541(signed long long *)");
+    static signed long long _f541 = 0;
+    _f541++;
+    if (*p0 != _f541) ABORT_ERROR("void f541(signed long long *)");
+    (*p0)++;
+    _f541++;
+}
+
+void f542(unsigned long long * p0)
+{
+    TRACE("void f542(unsigned long long *)");
+    static unsigned long long _f542 = 0;
+    _f542++;
+    if (*p0 != _f542) ABORT_ERROR("void f542(unsigned long long *)");
+    (*p0)++;
+    _f542++;
+}
+
+void f543(float * p0)
+{
+    TRACE("void f543(float *)");
+    static float _f543 = 0;
+    _f543++;
+    if (*p0 != _f543) ABORT_ERROR("void f543(float *)");
+    (*p0)++;
+    _f543++;
+}
+
+void f544(double * p0)
+{
+    TRACE("void f544(double *)");
+    static double _f544 = 0;
+    _f544++;
+    if (*p0 != _f544) ABORT_ERROR("void f544(double *)");
+    (*p0)++;
+    _f544++;
+}
+
+void f545(long double * p0)
+{
+    TRACE("void f545(long double *)");
+    static long double _f545 = 0;
+    _f545++;
+    if (*p0 != _f545) ABORT_ERROR("void f545(long double *)");
+    (*p0)++;
+    _f545++;
+}
+
+// ---------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/src/myapi/myapi.hpp'
--- a/storage/ndb/ndbjtie/src/myapi/myapi.hpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myapi/myapi.hpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,553 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myapi.hpp
+ */
+
+#ifndef _myapi
+#define _myapi
+
+#include <stdint.h>
+#include <cstdio>
+
+#include "helpers.hpp"
+
+// reference returns
+//extern [const] int& f0(); -> ByteBuffer
+//extern [const] int* f0(); -> ByteBuffer, but no way of knowing size
+//extern [const] char* f0(); -> ByteBuffer, but no way of knowing size
+//extern const char* f0(); -> String, assuming 0-terminated and copy-semantics
+
+extern void f0();
+
+extern const void * s010();
+extern const char * s012();
+extern void * s030();
+extern char * s032();
+extern void s110(const void * p0);
+extern void s112(const char * p0);
+extern void s130(void * p0);
+extern void s132(char * p0);
+
+extern const bool f11(const bool p0);
+extern const char f12(const char p0);
+extern const signed char f13(const signed char p0);
+extern const unsigned char f14(const unsigned char p0);
+extern const signed short f15(const signed short p0);
+extern const unsigned short f16(const unsigned short p0);
+extern const signed int f17(const signed int p0);
+extern const unsigned int f18(const unsigned int p0);
+extern const signed long f19(const signed long p0);
+extern const unsigned long f20(const unsigned long p0);
+extern const signed long long f21(const signed long long p0);
+extern const unsigned long long f22(const unsigned long long p0);
+extern const float f23(const float p0);
+extern const double f24(const double p0);
+extern const long double f25(const long double p0);
+
+extern bool f31(bool p0);
+extern char f32(char p0);
+extern signed char f33(signed char p0);
+extern unsigned char f34(unsigned char p0);
+extern signed short f35(signed short p0);
+extern unsigned short f36(unsigned short p0);
+extern signed int f37(signed int p0);
+extern unsigned int f38(unsigned int p0);
+extern signed long f39(signed long p0);
+extern unsigned long f40(unsigned long p0);
+extern signed long long f41(signed long long p0);
+extern unsigned long long f42(unsigned long long p0);
+extern float f43(float p0);
+extern double f44(double p0);
+extern long double f45(long double p0);
+
+extern const bool f011();
+extern const char f012();
+extern const int8_t f013();
+extern const uint8_t f014();
+extern const int16_t f015();
+extern const uint16_t f016();
+extern const int32_t f017();
+extern const uint32_t f018();
+extern const int64_t f021();
+extern const uint64_t f022();
+extern const float f023();
+extern const double f024();
+
+extern bool f031();
+extern char f032();
+extern int8_t f033();
+extern uint8_t f034();
+extern int16_t f035();
+extern uint16_t f036();
+extern int32_t f037();
+extern uint32_t f038();
+extern int64_t f041();
+extern uint64_t f042();
+extern float f043();
+extern double f044();
+
+extern void f111(const bool);
+extern void f112(const char);
+extern void f113(const int8_t);
+extern void f114(const uint8_t);
+extern void f115(const int16_t);
+extern void f116(const uint16_t);
+extern void f117(const int32_t);
+extern void f118(const uint32_t);
+extern void f121(const int64_t);
+extern void f122(const uint64_t);
+extern void f123(const float);
+extern void f124(const double);
+
+extern void f131(bool);
+extern void f132(char);
+extern void f133(int8_t);
+extern void f134(uint8_t);
+extern void f135(int16_t);
+extern void f136(uint16_t);
+extern void f137(int32_t);
+extern void f138(uint32_t);
+extern void f141(int64_t);
+extern void f142(uint64_t);
+extern void f143(float);
+extern void f144(double);
+
+extern const bool & f211();
+extern const char & f212();
+extern const int8_t & f213();
+extern const uint8_t & f214();
+extern const int16_t & f215();
+extern const uint16_t & f216();
+extern const int32_t & f217();
+extern const uint32_t & f218();
+extern const int64_t & f221();
+extern const uint64_t & f222();
+extern const float & f223();
+extern const double & f224();
+
+extern bool & f231();
+extern char & f232();
+extern int8_t & f233();
+extern uint8_t & f234();
+extern int16_t & f235();
+extern uint16_t & f236();
+extern int32_t & f237();
+extern uint32_t & f238();
+extern int64_t & f241();
+extern uint64_t & f242();
+extern float & f243();
+extern double & f244();
+
+extern void f311(const bool &);
+extern void f312(const char &);
+extern void f313(const int8_t &);
+extern void f314(const uint8_t &);
+extern void f315(const int16_t &);
+extern void f316(const uint16_t &);
+extern void f317(const int32_t &);
+extern void f318(const uint32_t &);
+extern void f321(const int64_t &);
+extern void f322(const uint64_t &);
+extern void f323(const float &);
+extern void f324(const double &);
+
+extern void f331(bool &);
+extern void f332(char &);
+extern void f333(int8_t &);
+extern void f334(uint8_t &);
+extern void f335(int16_t &);
+extern void f336(uint16_t &);
+extern void f337(int32_t &);
+extern void f338(uint32_t &);
+extern void f341(int64_t &);
+extern void f342(uint64_t &);
+extern void f343(float &);
+extern void f344(double &);
+
+extern const bool * f411();
+extern const char * f412();
+extern const int8_t * f413();
+extern const uint8_t * f414();
+extern const int16_t * f415();
+extern const uint16_t * f416();
+extern const int32_t * f417();
+extern const uint32_t * f418();
+extern const int64_t * f421();
+extern const uint64_t * f422();
+extern const float * f423();
+extern const double * f424();
+
+extern bool * f431();
+extern char * f432();
+extern int8_t * f433();
+extern uint8_t * f434();
+extern int16_t * f435();
+extern uint16_t * f436();
+extern int32_t * f437();
+extern uint32_t * f438();
+extern int64_t * f441();
+extern uint64_t * f442();
+extern float * f443();
+extern double * f444();
+
+extern void f511(const bool *);
+extern void f512(const char *);
+extern void f513(const int8_t *);
+extern void f514(const uint8_t *);
+extern void f515(const int16_t *);
+extern void f516(const uint16_t *);
+extern void f517(const int32_t *);
+extern void f518(const uint32_t *);
+extern void f521(const int64_t *);
+extern void f522(const uint64_t *);
+extern void f523(const float *);
+extern void f524(const double *);
+
+extern void f531(bool *);
+extern void f532(char *);
+extern void f533(int8_t *);
+extern void f534(uint8_t *);
+extern void f535(int16_t *);
+extern void f536(uint16_t *);
+extern void f537(int32_t *);
+extern void f538(uint32_t *);
+extern void f541(int64_t *);
+extern void f542(uint64_t *);
+extern void f543(float *);
+extern void f544(double *);
+
+struct B0 {
+    B0() {
+        TRACE("B0()");
+    };
+
+    B0(const B0 & b0) {
+        TRACE("B0(const B0 &)");
+        ABORT_ERROR("!USE OF COPY CONSTRUCTOR!");
+    };
+
+    virtual ~B0() {
+    };
+
+    B0 & operator=(const B0 & p) {
+        TRACE("B0 & operator=(const B0 &)");
+        ABORT_ERROR("!USE OF ASSIGNMENT OPERATOR!");
+        return *this;
+    }
+
+    static int32_t f0s() {
+        TRACE("int32_t B0::f0s()");
+        return 20;
+    };
+
+    int32_t f0n() const {
+        TRACE("int32_t B0::f0n()");
+        return 21;
+    };
+
+    virtual int32_t f0v() const {
+        TRACE("int32_t B0::f0v()");
+        return 22;
+    };
+
+};
+
+struct B1 : public B0 {
+    B1() {
+        TRACE("B1()");
+    };
+
+    B1(const B1 & b1) {
+        TRACE("B1(const B1 &)");
+        ABORT_ERROR("!USE OF COPY CONSTRUCTOR!");
+    };
+
+    virtual ~B1() {
+    };
+
+    B1 & operator=(const B1 & p) {
+        TRACE("B1 & operator=(const B1 &)");
+        ABORT_ERROR("!USE OF ASSIGNMENT OPERATOR!");
+        return *this;
+    }
+
+    static int32_t f0s() {
+        TRACE("int32_t B1::f0s()");
+        return 30;
+    };
+
+    int32_t f0n() const {
+        TRACE("int32_t B1::f0n()");
+        return 31;
+    };
+
+    virtual int32_t f0v() const {
+        TRACE("int32_t B1::f0v()");
+        return 32;
+    };
+};
+
+struct A {
+    static A * a;
+    
+    A() {
+        TRACE("A()");
+    };
+    
+    A(const A & a) {
+        TRACE("A(const A &)");
+        ABORT_ERROR("!USE OF COPY CONSTRUCTOR!");
+    };
+
+    virtual ~A() {
+        TRACE("~A()");
+    };
+
+    A & operator=(const A & p) {
+        TRACE("A & operator=(const A &)");
+        ABORT_ERROR("!USE OF ASSIGNMENT OPERATOR!");
+        return *this;
+    }
+
+    static A * return_ptr() {
+        TRACE("A * A::return_ptr()");
+        return a;
+    };
+
+    static A * return_null_ptr() {
+        TRACE("A * A::return_null_ptr()");
+        return NULL;
+    };
+
+    static A & return_ref() {
+        TRACE("A & A::return_ref()");
+        return *a;
+    };
+
+    static A & return_null_ref() {
+        TRACE("A & A::return_null_ref()");
+        return *((A *)NULL);
+    };
+
+    static void take_ptr(A * a) {
+        TRACE("void A::take_ptr(A * a)");
+        if (a != A::a) ABORT_ERROR("void A::take_ptr(A * a)");
+    };
+
+    static void take_null_ptr(A * a) {
+        TRACE("void A::take_null_ptr(A * a)");
+        if (a != NULL) ABORT_ERROR("void A::take_null_ptr(A * a)");
+    };
+
+    static void take_ref(A & a) {
+        TRACE("void A::take_ref(A & a)");
+        if (&a != A::a) ABORT_ERROR("void A::take_ref(A & a)");
+    };
+
+    static void take_null_ref(A & a) {
+        TRACE("void A::take_null_ref(A & a)");
+        if (&a != NULL) ABORT_ERROR("void A::take_null_ref(A & a)");
+    };
+
+    static void print(A * p0) {
+        TRACE("void A::print(A *)");
+        printf("    p0 = %lx\n", (unsigned long)p0);
+    };
+
+    // XXX also test non-const methods, references...
+
+    B0 * getB0() const {
+        TRACE("B0 A::getB0()");
+        return new B0();
+    };
+
+    B1 * getB1() const {
+        TRACE("B1 A::getB1()");
+        return new B1();
+    };
+
+    static int32_t f0s() {
+        TRACE("int32_t A::f0s()");
+        return 10;
+    };
+
+    int32_t f0n() const {
+        TRACE("int32_t A::f0n()");
+        return 11;
+    };
+
+    virtual int32_t f0v() const {
+        TRACE("int32_t A::f0v()");
+        return 12;
+    };
+
+    // ----------------------------------------------------------------------
+
+    void g0c() const {
+        TRACE("void A::g0c()");
+    };
+
+    void g1c(int8_t p0) const {
+        TRACE("void A::g1c(int8_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+    };
+
+    void g2c(int8_t p0, int16_t p1) const {
+        TRACE("void A::g2c(int8_t, int16_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+    };
+
+    void g3c(int8_t p0, int16_t p1, int32_t p2) const {
+        TRACE("void A::g3c(int8_t, int16_t, int32_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        if (p2 != 3) ABORT_ERROR("wrong arg value");
+    };
+
+    void g0() {
+        TRACE("void A::g0()");
+    };
+
+    void g1(int8_t p0) {
+        TRACE("void A::g1(int8_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+    };
+
+    void g2(int8_t p0, int16_t p1) {
+        TRACE("void A::g2(int8_t, int16_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+    };
+
+    void g3(int8_t p0, int16_t p1, int32_t p2) {
+        TRACE("void A::g3(int8_t, int16_t, int32_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        if (p2 != 3) ABORT_ERROR("wrong arg value");
+    };
+
+    // ----------------------------------------------------------------------
+
+    int32_t g0rc() const {
+        TRACE("int32_t A::g0rc()");
+        return 0;
+    };
+
+    int32_t g1rc(int8_t p0) const {
+        TRACE("int32_t A::g1rc(int8_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        return p0;
+    };
+
+    int32_t g2rc(int8_t p0, int16_t p1) const {
+        TRACE("int32_t A::g2rc(int8_t, int16_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        return p0 + p1;
+    };
+
+    int32_t g3rc(int8_t p0, int16_t p1, int32_t p2) const {
+        TRACE("int32_t A::g3rc(int8_t, int16_t, int32_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        if (p2 != 3) ABORT_ERROR("wrong arg value");
+        return p0 + p1 + p2;
+    };
+
+    int32_t g0r() {
+        TRACE("int32_t A::g0r()");
+        return 0;
+    };
+
+    int32_t g1r(int8_t p0) {
+        TRACE("int32_t A::g1r(int8_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        return p0;
+    };
+
+    int32_t g2r(int8_t p0, int16_t p1) {
+        TRACE("int32_t A::g2r(int8_t, int16_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        return p0 + p1;
+    };
+
+    int32_t g3r(int8_t p0, int16_t p1, int32_t p2) {
+        TRACE("int32_t A::g3r(int8_t, int16_t, int32_t)");
+        if (p0 != 1) ABORT_ERROR("wrong arg value");
+        if (p1 != 2) ABORT_ERROR("wrong arg value");
+        if (p2 != 3) ABORT_ERROR("wrong arg value");
+        return p0 + p1 + p2;
+    };
+};
+
+// ----------------------------------------------------------------------
+
+inline void h0() {
+    TRACE("void h0()");
+};
+
+inline void h1(int8_t p0) {
+    TRACE("void h1(int8_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+};
+
+inline void h2(int8_t p0, int16_t p1) {
+    TRACE("void h2(int8_t, int16_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+    if (p1 != 2) ABORT_ERROR("wrong arg value");
+};
+
+inline void h3(int8_t p0, int16_t p1, int32_t p2) {
+    TRACE("void h3(int8_t, int16_t, int32_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+    if (p1 != 2) ABORT_ERROR("wrong arg value");
+    if (p2 != 3) ABORT_ERROR("wrong arg value");
+};
+
+inline int32_t h0r() {
+    TRACE("int32_t h0r()");
+    return 0;
+};
+
+inline int32_t h1r(int8_t p0) {
+    TRACE("int32_t h1r(int8_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+    return p0;
+};
+
+inline int32_t h2r(int8_t p0, int16_t p1) {
+    TRACE("int32_t h2r(int8_t, int16_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+    if (p1 != 2) ABORT_ERROR("wrong arg value");
+    return p0 + p1;
+};
+
+inline int32_t h3r(int8_t p0, int16_t p1, int32_t p2) {
+    TRACE("int32_t h3r(int8_t, int16_t, int32_t)");
+    if (p0 != 1) ABORT_ERROR("wrong arg value");
+    if (p1 != 2) ABORT_ERROR("wrong arg value");
+    if (p2 != 3) ABORT_ERROR("wrong arg value");
+    return  p0 + p1 + p2;
+};
+
+//    printf("p0=%d, p1=%d, p2=%d", p0, p1, p2);
+
+#endif // _myapi

=== added file 'storage/ndb/ndbjtie/src/myapi/myapi_test.cpp'
--- a/storage/ndb/ndbjtie/src/myapi/myapi_test.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myapi/myapi_test.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,373 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myapi_test.cpp
+ */
+
+#include <iostream>
+#include <cassert>
+#include <cstring>
+
+#include "myapi.hpp"
+#include "helpers.hpp"
+
+using std::cout;
+using std::endl;
+//using std::string;
+//using std::stringbuf;
+
+/*
+template< typename T, T F() >
+void
+call(T v) 
+{
+    T r = F();
+    //cout << "r = " << (int)r << ", v = " << (int)v << endl;
+    assert(r == v);
+}
+
+// primitive types, value, out
+void
+test0()
+{
+    cout << "testing basic functions: f1xx(f0xx()) ..." << endl;
+    
+    f010();
+    call< const bool, f11 >(true);
+    call< const bool, f11 >(false);
+    call< bool, f31 >(true);
+    call< bool, f31 >(false);
+    for (int i = 1; i < 3; i++) {
+        call< const char, f12 >(i);
+    }
+}
+*/
+
+void
+test0()
+{
+    cout << endl << "testing basic function: f0() ..." << endl;
+
+    f0();
+}
+
+// primitive types, by value in, out
+void
+test1()
+{
+    cout << endl << "testing primitive type functions: fxx(0) ..." << endl;
+
+    f11(0);
+    f12(0);
+    f13(0);
+    f14(0);
+    f15(0);
+    f16(0);
+    f17(0);
+    f18(0);
+    f19(0);
+    f20(0);
+    f21(0);
+    f22(0);
+    f23(0);
+    f24(0);
+    f25(0);
+
+    f31(0);
+    f32(0);
+    f33(0);
+    f34(0);
+    f35(0);
+    f36(0);
+    f37(0);
+    f38(0);
+    f39(0);
+    f40(0);
+    f41(0);
+    f42(0);
+    f43(0);
+    f44(0);
+    f45(0);
+}
+
+void
+test2()
+{
+    cout << endl << "testing basic functions: f1xx(f0xx()) ..." << endl;
+
+    for (int i = 0; i < 2; i++) {
+        f111(f011());
+        f112(f012());
+        f113(f013());
+        f114(f014());
+        f115(f015());
+        f116(f016());
+        f117(f017());
+        f118(f018());
+        f121(f021());
+        f122(f022());
+        f123(f023());
+        f124(f024());
+
+        f131(f031());
+        f132(f032());
+        f133(f033());
+        f134(f034());
+        f135(f035());
+        f136(f036());
+        f137(f037());
+        f138(f038());
+        f141(f041());
+        f142(f042());
+        f143(f043());
+        f144(f044());
+    }
+}
+
+void
+test3()
+{
+    cout << endl << "testing basic functions: f3xx(f2xx()) ..." << endl;
+
+    for (int i = 0; i < 2; i++) {
+        f311(f211());
+        f312(f212());
+        f313(f213());
+        f314(f214());
+        f315(f215());
+        f316(f216());
+        f317(f217());
+        f318(f218());
+        f321(f221());
+        f322(f222());
+        f323(f223());
+        f324(f224());
+
+        f331(f231());
+        f332(f232());
+        f333(f233());
+        f334(f234());
+        f335(f235());
+        f336(f236());
+        f337(f237());
+        f338(f238());
+        f341(f241());
+        f342(f242());
+        f343(f243());
+        f344(f244());
+    }
+}
+
+void
+test4()
+{
+    cout << endl << "testing basic functions: f5xx(f4xx()) ..." << endl;
+
+    for (int i = 0; i < 2; i++) {
+        f511(f411());
+        f512(f412());
+        f513(f413());
+        f514(f414());
+        f515(f415());
+        f516(f416());
+        f517(f417());
+        f518(f418());
+        f521(f421());
+        f522(f422());
+        f523(f423());
+        f524(f424());
+
+        f531(f431());
+        f532(f432());
+        f533(f433());
+        f534(f434());
+        f535(f435());
+        f536(f436());
+        f537(f437());
+        f538(f438());
+        f541(f441());
+        f542(f442());
+        f543(f443());
+        f544(f444());
+    }
+}
+
+void
+test5()
+{
+    cout << endl << "testing instance wrappers: ..." << endl;
+    int n;
+    
+    cout << endl << "calling A..." << endl;
+    A * a = new A();
+    n = A::f0s();
+    cout << "... A::f0s() = " << n << endl;
+    assert (n == 10);
+    n = a->f0s();
+    cout << "... a->f0s() = " << n << endl;
+    assert (n == 10);
+    n = a->f0n();
+    cout << "... a->f0n() = " << n << endl;
+    assert (n == 11);
+    n = a->f0v();
+    cout << "... a->f0v() = " << n << endl;
+    assert (n == 12);
+
+    cout << endl << "A::take_ptr(A::return_ptr())..." << endl;
+    A::take_ptr(A::return_ptr());
+
+    cout << endl << "A::take_null_ptr(A::return_null_ptr())..." << endl;
+    A::take_null_ptr(A::return_null_ptr());
+
+    cout << endl << "A::take_ref(A::return_ref())..." << endl;
+    A::take_ref(A::return_ref());
+
+    cout << endl << "A::take_null_ref(A::return_null_ref())..." << endl;
+    A::take_null_ref(A::return_null_ref());
+
+    cout << endl << "A::print(A *)..." << endl;
+    A::print(a);
+    
+    cout << endl << "calling B0..." << endl;
+    B0 & b0b0 = *a->getB0();
+    n = B0::f0s();    
+    cout << "... B0::f0s() = " << n << endl;
+    assert (n == 20);
+    n = b0b0.f0s();    
+    cout << "... b0b0.f0s() = " << n << endl;
+    assert (n == 20);
+    n = b0b0.f0n();
+    cout << "... b0b0.f0n() = " << n << endl;
+    assert (n == 21);
+    n = b0b0.f0v();
+    cout << "... b0b0.f0v() = " << n << endl;
+    assert (n == 22);
+    
+    cout << endl << "calling B1..." << endl;
+    B0 & b0b1 = *a->getB1();
+    n = B1::f0s();    
+    cout << "... B1::f0s() = " << n << endl;
+    assert (n == 30);
+    n = b0b1.f0s();    
+    cout << "... b0b1.f0s() = " << n << endl;
+    assert (n == 20);
+    n = b0b1.f0n();
+    cout << "... b0b1.f0n() = " << n << endl;
+    assert (n == 21);
+    n = b0b1.f0v();
+    cout << "... b0b1.f0v() = " << n << endl;
+    assert (n == 32);
+};
+
+void
+test6()
+{
+    cout << endl << "testing string/byte array functions: sxxx(sxxx) ..." << endl;
+
+    s112(s012());
+}
+
+void
+test7()
+{
+    cout << endl << "testing n-ary array functions: g(), h() ..." << endl;
+    int32_t n;
+
+    cout << endl << "creating A..." << endl;
+    A * a = new A();
+    const A * ac = a;
+
+    h0();
+
+    h1(1);
+
+    h2(1, 2);
+
+    h3(1, 2, 3);
+
+    n = h0r();
+    assert(n == 0);
+    
+    n = h1r(1);
+    assert(n == 1);
+    
+    n = h2r(1, 2);
+    assert(n == 3);
+    
+    n = h3r(1, 2, 3);
+    assert(n == 6);
+    
+    ac->g0c();
+
+    ac->g1c(1);
+
+    ac->g2c(1, 2);
+
+    ac->g3c(1, 2, 3);
+
+    a->g0();
+
+    a->g1(1);
+
+    a->g2(1, 2);
+
+    a->g3(1, 2, 3);
+
+    n = ac->g0rc();
+    assert(n == 0);
+    
+    n = ac->g1rc(1);
+    assert(n == 1);
+    
+    n = ac->g2rc(1, 2);
+    assert(n == 3);
+    
+    n = ac->g3rc(1, 2, 3);
+    assert(n == 6);
+    
+    n = a->g0r();
+    assert(n == 0);
+    
+    n = a->g1r(1);
+    assert(n == 1);
+    
+    n = a->g2r(1, 2);
+    assert(n == 3);
+    
+    n = a->g3r(1, 2, 3);
+    assert(n == 6);
+}
+
+int
+main(int argc, const char* argv[])
+{
+    cout << "--> main()" << endl;
+
+    test0();
+    test1();
+    test2();
+    test3();
+    test4();
+    test5();
+    test6();
+    test7();
+
+    cout << endl;
+    cout << "<-- main()" << endl;
+    return 0;
+}

=== added directory 'storage/ndb/ndbjtie/src/myjapi'
=== added file 'storage/ndb/ndbjtie/src/myjapi/Makefile'
--- a/storage/ndb/ndbjtie/src/myjapi/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,154 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+

+  JAVA_SRC	= .
+
+# preprocessing defines:
+  DDEFINES 	= 
+
+  DELIVERABLES	= $(JAVA_SRC)/test/MyJapiTest.class \
+		libmyjapi.a libmyjapi.$(DLL_SUFFIX)
+
+  GENERATED_H	= myjapi_MyJapi.h myjapi_MyJapiCtypes.h \
+		myjapi_A.h myjapi_B0.h myjapi_B1.h
+
+  CLEAN		= core *.o *.class $(JAVA_SRC)/*/*.class $(GENERATED_H)
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *% */*~
+
+  SRCS		= *.cpp
+
+# currently, not needed:
+#  OBJECTS	= $(SRC:.c=.o)
+#  OBJECTS	+= $(SRC:.cc=.o)
+#  OBJECTS	+= $(SRC:.cpp=.o)
+
+  INCLUDES	= -I. -I.. -I../myapi -I../jtie $(JAVA_INCLUDEOPTS)
+
+  CLASSPATH	= ".:../jtie"
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+# CLOCK_GETTIME requires -lrt
+  LDLIBS	= -L../myapi -lmyapi
+#  LDLIBS	= -lrt
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+dep depend:	$(GENERATED_H)
+
+myjapi_MyJapi.h:	$(JAVA_SRC)/myjapi/MyJapi.class
+	$(COMPILE.javah) myjapi.MyJapi
+
+myjapi_MyJapiCtypes.h:	$(JAVA_SRC)/myjapi/MyJapiCtypes.class
+	$(COMPILE.javah) myjapi.MyJapiCtypes
+
+myjapi_A.h:	$(JAVA_SRC)/myjapi/A.class
+	$(COMPILE.javah) myjapi.A
+
+myjapi_B0.h:	$(JAVA_SRC)/myjapi/B0.class
+	$(COMPILE.javah) myjapi.B0
+
+myjapi_B1.h:	$(JAVA_SRC)/myjapi/B1.class
+	$(COMPILE.javah) myjapi.B1
+
+$(JAVA_SRC)/test/MyJapiTest.class:	$(JAVA_SRC)/test/MyJapiTest.java \
+		$(JAVA_SRC)/myjapi/MyJapi.java \
+		$(JAVA_SRC)/myjapi/MyJapiCtypes.java \
+		$(JAVA_SRC)/myjapi/A.java \
+		$(JAVA_SRC)/myjapi/B0.java \
+		$(JAVA_SRC)/myjapi/B1.java
+	$(COMPILE.java) $<
+
+libmyjapi.a:	libmyjapi.a(myjapi_MyJapi.o myjapi_MyJapiCtypes.o myjapi_classes.o)
+
+#
+# Important for libs like $(LDLIBS) to come last!
+#
+
+libmyjapi.so:	myjapi_MyJapi.o ../myapi/libmyapi.a
+	$(LINK.cpp) \
+	-fPIC -shared \
+	$(LDLIBS) \
+	-o libmyjapi.so \
+	myjapi_MyJapi.o \
+	-Wl,-rpath -Wl,. libmyapi.so
+
+#  gcc -I/usr/local/java/include -I/usr/local/java/include/genunix -fPIC -c Happy.c HappyImp.c
+#  gcc -shared -Wl,-soname,libhappy.so.1 -o libhappy.so.1.0 Happy.o HappyImp.o
+
+libmyjapi.dylib:	libmyjapi.a myjapi_MyJapi.o myjapi_MyJapiCtypes.o myjapi_classes.o ../myapi/libmyapi.a
+	$(LINK.cpp) \
+	-fPIC -shared -dynamiclib \
+	-o libmyjapi.dylib \
+	myjapi_MyJapi.o \
+	myjapi_MyJapiCtypes.o \
+	myjapi_classes.o \
+	libmyjapi.a \
+	../myapi/libmyapi.a
+
+#	$(LDLIBS)
+
+# sufficient at runtime (statically linked):
+#	../myapi/libmyapi.a
+
+# not sufficient at runtime (apparently dynamically linked and no path info):
+#	$(LDLIBS)
+
+# doesn't seem to have an effect
+#	-Wl,-rpath -Wl,".:../myapi" \
+#	../myapi/libmyapi.dylib \
+
+# undefined references to be resolved by LD_LIBRARY_PATH:
+#	libmyapi.so
+# or
+#	-L. \
+#	-lmyapi \
+# ldd libmyjapi.so
+#       libmyapi.so => not found
+
+# symbolical references with default library path:
+#
+#	-Wl,-rpath -Wl,/home/md/martins_little_helpers/src/myapi \
+# ldd libmyjapi.so
+#        libmyapi.so => /home/md/martins_little_helpers/src/myapi/libmyapi.so (0xb7f8d000)
+#
+#	-Wl,-rpath -Wl,. \
+# ldd libmyjapi.so
+#        libmyapi.so => ./libmyapi.so (0xb7edd000)
+
+# statically linked references:
+#	libmyapi.a
+# ldd libmyjapi.so
+#       ...
+
+.PHONY: run.test
+run.test:	$(JAVA_SRC)/test/MyJapiTest.class
+	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea test.MyJapiTest
+
+#	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea -Djava.library.path=".:../myapi" test.MyJapiTest
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added directory 'storage/ndb/ndbjtie/src/myjapi/myjapi'
=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi/A.java'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi/A.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi/A.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,138 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * A.java
+ */
+
+package myjapi;
+
+// ---------------------------------------------------------------------------
+// generatable, user-API-dependent Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class A extends jtie.Wrapper {
+
+    // with default constructor, cdelegate needs to be written from JNI
+    //protected A() {
+    //    System.out.println("<-> myjapi.A()");
+    //};
+
+    // this c'tor may me protected, for access from JNI is still possible
+    protected A(long cdelegate) {
+        super(cdelegate);
+        //System.out.println("<-> myjapi.A(" + Long.toHexString(cdelegate) + ")");
+    };
+
+    // constructor wrapper
+    static public native A create();
+
+    // destructor wrapper
+    static public native void delete(A a);
+
+    // static method
+    static public native int f0s();
+
+    // non-virtual method
+    static public native int f0n(A p0);
+
+    // virtual method
+    public native int f0v();
+
+    // factory for Bs
+    public native B0 getB0();
+
+    // factory for Bs
+    public native B1 getB1();
+
+    // returns an A by ptr
+    static public native A return_ptr();
+
+    // returns an A by ptr
+    static public native A return_null_ptr();
+
+    // returns an A by ref
+    static public native A return_ref();
+
+    // always supposed to raise an exception
+    static public native A return_null_ref();
+
+    // takes an A by ptr
+    static public native void take_ptr(A p0);
+
+    // takes an A by ptr
+    static public native void take_null_ptr(A p0);
+
+    // takes an A by ref
+    static public native void take_ref(A p0);
+
+    // never supposed to abort but raise an exception when called with null
+    static public native void take_null_ref(A p0);
+
+    // prints an A
+    static public native void print(A p0);
+
+    // ----------------------------------------------------------------------
+
+    static public native void h0();
+
+    static public native void h1(byte p0);
+
+    static public native void h2(byte p0, short p1);
+
+    static public native void h3(byte p0, short p1, int p2);
+
+    static public native int h0r();
+
+    static public native int h1r(byte p0);
+
+    static public native int h2r(byte p0, short p1);
+
+    static public native int h3r(byte p0, short p1, int p2);
+
+    static public native void g0c(A obj);
+
+    static public native void g1c(A obj, byte p0);
+
+    static public native void g2c(A obj, byte p0, short p1);
+
+    static public native void g3c(A obj, byte p0, short p1, int p2);
+
+    static public native void g0(A obj);
+
+    static public native void g1(A obj, byte p0);
+
+    static public native void g2(A obj, byte p0, short p1);
+
+    static public native void g3(A obj, byte p0, short p1, int p2);
+
+    static public native int g0rc(A obj);
+
+    static public native int g1rc(A obj, byte p0);
+
+    static public native int g2rc(A obj, byte p0, short p1);
+
+    static public native int g3rc(A obj, byte p0, short p1, int p2);
+
+    static public native int g0r(A obj);
+
+    static public native int g1r(A obj, byte p0);
+
+    static public native int g2r(A obj, byte p0, short p1);
+
+    static public native int g3r(A obj, byte p0, short p1, int p2);
+}

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi/B0.java'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi/B0.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi/B0.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * B0.java
+ */
+
+package myjapi;
+
+// ---------------------------------------------------------------------------
+// generatable, user-API-dependent Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class B0 extends jtie.Wrapper {
+
+    // with default constructor, cdelegate needs to be written from JNI
+    //protected B0() {
+    //    System.out.println("<-> myjapi.B0()");
+    //};
+
+    // this c'tor may me protected, for access from JNI is still possible
+    protected B0(long cdelegate) {
+        super(cdelegate);
+        //System.out.println("<-> myjapi.B0(" + Long.toHexString(cdelegate) + ")");
+    };
+
+    // static method
+    static public native int f0s();
+
+    // non-virtual method
+    static public native int f0n(B0 p0);
+        
+    // virtual method
+    public native int f0v();
+}

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi/B1.java'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi/B1.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi/B1.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * B1.java
+ */
+
+package myjapi;
+
+// ---------------------------------------------------------------------------
+// generatable, user-API-dependent Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class B1 extends B0 {
+
+    // with default constructor, cdelegate needs to be written from JNI
+    //protected B1() {
+    //    System.out.println("<-> myjapi.B1()");
+    //};
+
+    // this c'tor may me protected, for access from JNI is still possible
+    protected B1(long cdelegate) {
+        super(cdelegate);
+        //System.out.println("<-> myjapi.B1(" + Long.toHexString(cdelegate) + ")");
+    };
+
+    // static method
+    static public native int f0s();
+
+    // non-virtual method
+    static public native int f0n(B1 p0);
+
+    // virtual method
+    public native int f0v();
+}

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapi.java'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapi.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapi.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,243 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * MyJapi.java
+ */
+
+package myjapi;
+
+//import java.math.BigInteger;
+//import java.math.BigDecimal;
+import java.nio.ByteBuffer;
+
+// ---------------------------------------------------------------------------
+// generatable Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class MyJapi {
+
+    static public native void f0();
+
+    // ----------------------------------------------------------------------
+    // string mappings of value result/parameter types
+    // ----------------------------------------------------------------------
+
+    static public native String s012();
+    static public native void s112(String p0);
+
+    // ----------------------------------------------------------------------
+    // default mappings of value result/parameter types
+    // ----------------------------------------------------------------------
+
+    static public native boolean f011();
+    static public native byte f012();
+    static public native byte f013();
+    static public native byte f014();
+    static public native short f015();
+    static public native short f016();
+    static public native int f017();
+    static public native int f018();
+    static public native int f019();
+    static public native int f020();
+    static public native long f021();
+    static public native long f022();
+    static public native float f023();
+    static public native double f024();
+    static public native double f025();
+
+    static public native void f111(boolean p0);
+    static public native void f112(byte p0);
+    static public native void f113(byte p0);
+    static public native void f114(byte p0);
+    static public native void f115(short p0);
+    static public native void f116(short p0);
+    static public native void f117(int p0);
+    static public native void f118(int p0);
+    static public native void f119(int p0);
+    static public native void f120(int p0);
+    static public native void f121(long p0);
+    static public native void f122(long p0);
+    static public native void f123(float p0);
+    static public native void f124(double p0);
+    static public native void f125(double p0);
+
+    static public native boolean f031();
+    static public native byte f032();
+    static public native byte f033();
+    static public native byte f034();
+    static public native short f035();
+    static public native short f036();
+    static public native int f037();
+    static public native int f038();
+    static public native int f039();
+    static public native int f040();
+    static public native long f041();
+    static public native long f042();
+    static public native float f043();
+    static public native double f044();
+    static public native double f045();
+
+    static public native void f131(boolean p0);
+    static public native void f132(byte p0);
+    static public native void f133(byte p0);
+    static public native void f134(byte p0);
+    static public native void f135(short p0);
+    static public native void f136(short p0);
+    static public native void f137(int p0);
+    static public native void f138(int p0);
+    static public native void f139(int p0);
+    static public native void f140(int p0);
+    static public native void f141(long p0);
+    static public native void f142(long p0);
+    static public native void f143(float p0);
+    static public native void f144(double p0);
+    static public native void f145(double p0);
+
+    // ----------------------------------------------------------------------
+    // ByteBuffer mappings of object reference types
+    // ----------------------------------------------------------------------

+
+    static public native ByteBuffer f211bb();
+    static public native ByteBuffer f212bb();
+    static public native ByteBuffer f213bb();
+    static public native ByteBuffer f214bb();
+    static public native ByteBuffer f215bb();
+    static public native ByteBuffer f216bb();
+    static public native ByteBuffer f217bb();
+    static public native ByteBuffer f218bb();
+    static public native ByteBuffer f219bb();
+    static public native ByteBuffer f220bb();
+    static public native ByteBuffer f221bb();
+    static public native ByteBuffer f222bb();
+    static public native ByteBuffer f223bb();
+    static public native ByteBuffer f224bb();
+    static public native ByteBuffer f225bb();
+
+    static public native void f311bb(ByteBuffer p0);
+    static public native void f312bb(ByteBuffer p0);
+    static public native void f313bb(ByteBuffer p0);
+    static public native void f314bb(ByteBuffer p0);
+    static public native void f315bb(ByteBuffer p0);
+    static public native void f316bb(ByteBuffer p0);
+    static public native void f317bb(ByteBuffer p0);
+    static public native void f318bb(ByteBuffer p0);
+    static public native void f319bb(ByteBuffer p0);
+    static public native void f320bb(ByteBuffer p0);
+    static public native void f321bb(ByteBuffer p0);
+    static public native void f322bb(ByteBuffer p0);
+    static public native void f323bb(ByteBuffer p0);
+    static public native void f324bb(ByteBuffer p0);
+    static public native void f325bb(ByteBuffer p0);
+
+    static public native ByteBuffer f231bb();
+    static public native ByteBuffer f232bb();
+    static public native ByteBuffer f233bb();
+    static public native ByteBuffer f234bb();
+    static public native ByteBuffer f235bb();
+    static public native ByteBuffer f236bb();
+    static public native ByteBuffer f237bb();
+    static public native ByteBuffer f238bb();
+    static public native ByteBuffer f239bb();
+    static public native ByteBuffer f240bb();
+    static public native ByteBuffer f241bb();
+    static public native ByteBuffer f242bb();
+    static public native ByteBuffer f243bb();
+    static public native ByteBuffer f244bb();
+    static public native ByteBuffer f245bb();
+
+    static public native void f331bb(ByteBuffer p0);
+    static public native void f332bb(ByteBuffer p0);
+    static public native void f333bb(ByteBuffer p0);
+    static public native void f334bb(ByteBuffer p0);
+    static public native void f335bb(ByteBuffer p0);
+    static public native void f336bb(ByteBuffer p0);
+    static public native void f337bb(ByteBuffer p0);
+    static public native void f338bb(ByteBuffer p0);
+    static public native void f339bb(ByteBuffer p0);
+    static public native void f340bb(ByteBuffer p0);
+    static public native void f341bb(ByteBuffer p0);
+    static public native void f342bb(ByteBuffer p0);
+    static public native void f343bb(ByteBuffer p0);
+    static public native void f344bb(ByteBuffer p0);
+    static public native void f345bb(ByteBuffer p0);
+
+    // ----------------------------------------------------------------------
+    // value-copy mappings of object reference types
+    // ----------------------------------------------------------------------
+
+    static public native boolean f211v();
+    static public native byte f212v();
+    static public native byte f213v();
+    static public native byte f214v();
+    static public native short f215v();
+    static public native short f216v();
+    static public native int f217v();
+    static public native int f218v();
+    static public native long f221v();
+    static public native long f222v();
+    static public native float f223v();
+    static public native double f224v();
+
+    static public native void f311v(boolean p0);
+    static public native void f312v(byte p0);
+    static public native void f313v(byte p0);
+    static public native void f314v(byte p0);
+    static public native void f315v(short p0);
+    static public native void f316v(short p0);
+    static public native void f317v(int p0);
+    static public native void f318v(int p0);
+    static public native void f321v(long p0);
+    static public native void f322v(long p0);
+    static public native void f323v(float p0);
+    static public native void f324v(double p0);
+
+    static public native boolean f231v();
+    static public native byte f232v();
+    static public native byte f233v();
+    static public native byte f234v();
+    static public native short f235v();
+    static public native short f236v();
+    static public native int f237v();
+    static public native int f238v();
+    static public native long f241v();
+    static public native long f242v();
+    static public native float f243v();
+    static public native double f244v();
+
+    static public native void f331v(boolean[] p0);
+    static public native void f332v(byte[] p0);
+    static public native void f333v(byte[] p0);
+    static public native void f334v(byte[] p0);
+    static public native void f335v(short[] p0);
+    static public native void f336v(short[] p0);
+    static public native void f337v(int[] p0);
+    static public native void f338v(int[] p0);
+    static public native void f341v(long[] p0);
+    static public native void f342v(long[] p0);
+    static public native void f343v(float[] p0);
+    static public native void f344v(double[] p0);
+
+    // ----------------------------------------------------------------------
+
+    //static public native void f140(BigInteger p0);
+    //static public native void f141(BigInteger p0);
+    // mapping to BigDecimal not supported at this time
+    //static public native void f145(BigDecimal p0);
+
+    // ----------------------------------------------------------------------
+}

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapiCtypes.java'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapiCtypes.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi/MyJapiCtypes.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * MyJapiCtypes.java
+ */
+
+package myjapi;
+
+//import java.math.BigInteger;
+//import java.math.BigDecimal;
+//import java.nio.ByteBuffer;
+
+// ---------------------------------------------------------------------------
+// generatable, platform-dependent Java wrapper class
+// ---------------------------------------------------------------------------
+
+public class MyJapiCtypes {
+
+    static public native boolean f011();
+
+    static public native boolean f11(boolean p0);
+    static public native byte f12(byte p0);
+    static public native byte f13(byte p0);
+    static public native byte f14(byte p0);
+    static public native short f15(short p0);
+    static public native short f16(short p0);
+    static public native int f17(int p0);
+    static public native int f18(int p0);
+    static public native int f19(int p0);
+    static public native int f20(int p0);
+    static public native long f21(long p0);
+    static public native long f22(long p0);
+    static public native float f23(float p0);
+    static public native double f24(double p0);
+    static public native double f25(double p0);
+
+    static public native boolean f31(boolean p0);
+    static public native byte f32(byte p0);
+    static public native byte f33(byte p0);
+    static public native byte f34(byte p0);
+    static public native short f35(short p0);
+    static public native short f36(short p0);
+    static public native int f37(int p0);
+    static public native int f38(int p0);
+    static public native int f39(int p0);
+    static public native int f40(int p0);
+    static public native long f41(long p0);
+    static public native long f42(long p0);
+    static public native float f43(float p0);
+    static public native double f44(double p0);
+    static public native double f45(double p0);
+}

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapi.cpp'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapi.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapi.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,1136 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myjapi_MyJapi.cpp
+ */
+
+#include <stdint.h>
+#include <jni.h>
+//#include <cstring>
+#include "helpers.hpp"
+#include "myapi.hpp"
+#include "myjapi_MyJapi.h"
+#include "jtie_ttrait.hpp"
+#include "jtie_tconv.hpp"
+#include "jtie_tconv_cvalue.hpp"
+#include "jtie_tconv_cstring.hpp"
+#include "jtie_tconv_carray.hpp"
+#include "jtie_tconv_refbybb.hpp"
+#include "jtie_tconv_refbyval.hpp"
+#include "jtie_tconv_cstring.hpp"
+#include "jtie_gcalls.hpp"
+
+// ---------------------------------------------------------------------------
+// generatable, application-dependent code: API JNI function stubs
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f0(JNIEnv * env, jclass cls)
+{
+    TRACE("void Java_myjapi_MyJapi_f010(JNIEnv *, jclass)");
+    gcall< f0 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jstring JNICALL Java_myjapi_MyJapi_s012(JNIEnv * env, jclass cls)
+{
+    TRACE("jstring Java_jtie_MyJAPI_s012(JNIEnv *, jclass)");
+    return gcall< ttrait_cstring, s012 >(env);
+}
+
+JNIEXPORT void JNICALL Java_myjapi_MyJapi_s112(JNIEnv * env, jclass cls, jstring p0)
+{
+    TRACE("void Java_jtie_MyJAPI_s112(JNIEnv *, jclass, jstring)");
+    gcall< ttrait_cstring, s112 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapi_f011(JNIEnv * env, jclass cls)
+{
+    TRACE("jboolean Java_myjapi_MyJapi_f011(JNIEnv *, jclass)");
+    return gcall< ttrait_cbool, f011 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f012(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f012(JNIEnv *, jclass)");
+    return gcall< ttrait_cchar, f012 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f013(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f013(JNIEnv *, jclass)");
+    return gcall< ttrait_cint8, f013 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f014(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f014(JNIEnv *, jclass)");
+    return gcall< ttrait_cuint8, f014 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f015(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f015(JNIEnv *, jclass)");
+    return gcall< ttrait_cint16, f015 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f016(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f016(JNIEnv *, jclass)");
+    return gcall< ttrait_cuint16, f016 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f017(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f017(JNIEnv *, jclass)");
+    return gcall< ttrait_cint32, f017 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f018(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f018(JNIEnv *, jclass)");
+    return gcall< ttrait_cuint32, f018 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f021(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f021(JNIEnv *, jclass)");
+    return gcall< ttrait_cint64, f021 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f022(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f022(JNIEnv *, jclass)");
+    return gcall< ttrait_cuint64, f022 >(env);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapi_f023(JNIEnv * env, jclass cls)
+{
+    TRACE("jfloat Java_myjapi_MyJapi_f023(JNIEnv *, jclass)");
+    return gcall< ttrait_cfloat, f023 >(env);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapi_f024(JNIEnv * env, jclass cls)
+{
+    TRACE("jdouble Java_myjapi_MyJapi_f024(JNIEnv *, jclass)");
+    return gcall< ttrait_cdouble, f024 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapi_f031(JNIEnv * env, jclass cls)
+{
+    TRACE("jboolean Java_myjapi_MyJapi_f031(JNIEnv *, jclass)");
+    return gcall< ttrait_bool, f031 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f032(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f032(JNIEnv *, jclass)");
+    return gcall< ttrait_char, f032 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f033(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f033(JNIEnv *, jclass)");
+    return gcall< ttrait_int8, f033 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f034(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f034(JNIEnv *, jclass)");
+    return gcall< ttrait_uint8, f034 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f035(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f035(JNIEnv *, jclass)");
+    return gcall< ttrait_int16, f035 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f036(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f036(JNIEnv *, jclass)");
+    return gcall< ttrait_uint16, f036 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f037(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f037(JNIEnv *, jclass)");
+    return gcall< ttrait_int32, f037 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f038(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f038(JNIEnv *, jclass)");
+    return gcall< ttrait_uint32, f038 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f041(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f041(JNIEnv *, jclass)");
+    return gcall< ttrait_int64, f041 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f042(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f042(JNIEnv *, jclass)");
+    return gcall< ttrait_uint64, f042 >(env);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapi_f043(JNIEnv * env, jclass cls)
+{
+    TRACE("jfloat Java_myjapi_MyJapi_f043(JNIEnv *, jclass)");
+    return gcall< ttrait_float, f043 >(env);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapi_f044(JNIEnv * env, jclass cls)
+{
+    TRACE("jdouble Java_myjapi_MyJapi_f044(JNIEnv *, jclass)");
+    return gcall< ttrait_double, f044 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f111(JNIEnv * env, jclass cls, jboolean p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f111(JNIEnv *, jclass, jboolean)");
+    gcall< ttrait_cbool, f111 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f112(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f112(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_cchar, f112 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f113(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f113(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_cint8, f113 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f114(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f114(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_cuint8, f114 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f115(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f115(JNIEnv *, jclass, jshort)");
+    gcall< ttrait_cint16, f115 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f116(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f116(JNIEnv *, jclass, jshort)");
+    gcall< ttrait_cuint16, f116 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f117(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f117(JNIEnv *, jclass, jint)");
+    gcall< ttrait_cint32, f117 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f118(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f118(JNIEnv *, jclass, jint)");
+    gcall< ttrait_cuint32, f118 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f121(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f121(JNIEnv *, jclass, jlong)");
+    gcall< ttrait_cint64, f121 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f122(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f122(JNIEnv *, jclass, jlong)");
+    gcall< ttrait_cuint64, f122 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f123(JNIEnv * env, jclass cls, jfloat p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f123(JNIEnv *, jclass, jfloat)");
+    gcall< ttrait_cfloat, f123 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f124(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f124(JNIEnv *, jclass, jdouble)");
+    gcall< ttrait_cdouble, f124 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f131(JNIEnv * env, jclass cls, jboolean p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f131(JNIEnv *, jclass, jboolean)");
+    gcall< ttrait_bool, f131 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f132(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f132(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_char, f132 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f133(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f133(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_int8, f133 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f134(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f134(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_uint8, f134 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f135(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f135(JNIEnv *, jclass, jshort)");
+    gcall< ttrait_int16, f135 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f136(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f136(JNIEnv *, jclass, jshort)");
+    gcall< ttrait_uint16, f136 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f137(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f137(JNIEnv *, jclass, jint)");
+    gcall< ttrait_int32, f137 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f138(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f138(JNIEnv *, jclass, jint)");
+    gcall< ttrait_uint32, f138 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f141(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f141(JNIEnv *, jclass, jlong)");
+    gcall< ttrait_int64, f141 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f142(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f142(JNIEnv *, jclass, jlong)");
+    gcall< ttrait_uint64, f142 >(env, p0);
+}

+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f143(JNIEnv * env, jclass cls, jfloat p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f143(JNIEnv *, jclass, jfloat)");
+    gcall< ttrait_float, f143 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f144(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f144(JNIEnv *, jclass, jdouble)");
+    gcall< ttrait_double, f144 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f211bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f211bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const bool &, j_n_ByteBuffer >, f211 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f212bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f212bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const char &, j_n_ByteBuffer >, f212 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f213bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f213bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const int8_t &, j_n_ByteBuffer >, f213 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f214bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f214bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const uint8_t &, j_n_ByteBuffer >, f214 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f215bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f215bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const int16_t &, j_n_ByteBuffer >, f215 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f216bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f216bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const uint16_t &, j_n_ByteBuffer >, f216 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f217bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f217bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const int32_t &, j_n_ByteBuffer >, f217 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f218bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f218bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const uint32_t &, j_n_ByteBuffer >, f218 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f221bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f221bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const int64_t &, j_n_ByteBuffer >, f221 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f222bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f222bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const uint64_t &, j_n_ByteBuffer >, f222 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f223bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f223bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const float &, j_n_ByteBuffer >, f223 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f224bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f224bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, const double &, j_n_ByteBuffer >, f224 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f231bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f231bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, bool &, j_n_ByteBuffer >, f231 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f232bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f232bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, char &, j_n_ByteBuffer >, f232 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f233bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f233bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, int8_t &, j_n_ByteBuffer >, f233 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f234bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f234bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, uint8_t &, j_n_ByteBuffer >, f234 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f235bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f235bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, int16_t &, j_n_ByteBuffer >, f235 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f236bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f236bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, uint16_t &, j_n_ByteBuffer >, f236 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f237bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f237bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, int32_t &, j_n_ByteBuffer >, f237 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f238bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f238bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, uint32_t &, j_n_ByteBuffer >, f238 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f241bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f241bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, int64_t &, j_n_ByteBuffer >, f241 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f242bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f242bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, uint64_t &, j_n_ByteBuffer >, f242 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f243bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f243bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, float &, j_n_ByteBuffer >, f243 >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_MyJapi_f244bb(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_MyJapi_f244bb(JNIEnv *, jclass)");
+    return gcall< ttrait< jobject, double &, j_n_ByteBuffer >, f244 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f311bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f311bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const bool &, j_n_ByteBuffer >, f311 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f312bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f312bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const char &, j_n_ByteBuffer >, f312 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f313bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f313bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const int8_t &, j_n_ByteBuffer >, f313 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f314bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f314bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const uint8_t &, j_n_ByteBuffer >, f314 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f315bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f315bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const int16_t &, j_n_ByteBuffer >, f315 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f316bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f316bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const uint16_t &, j_n_ByteBuffer >, f316 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f317bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f317bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const int32_t &, j_n_ByteBuffer >, f317 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f318bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f318bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const uint32_t &, j_n_ByteBuffer >, f318 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f321bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f321bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const int64_t &, j_n_ByteBuffer >, f321 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f322bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f322bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const uint64_t &, j_n_ByteBuffer >, f322 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f323bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f323bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const float &, j_n_ByteBuffer >, f323 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f324bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f324bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, const double &, j_n_ByteBuffer >, f324 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f331bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f331bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, bool &, j_n_ByteBuffer >, f331 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f332bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f332bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, char &, j_n_ByteBuffer >, f332 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f333bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f333bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, int8_t &, j_n_ByteBuffer >, f333 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f334bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f334bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, uint8_t &, j_n_ByteBuffer >, f334 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f335bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f335bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, int16_t &, j_n_ByteBuffer >, f335 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f336bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f336bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, uint16_t &, j_n_ByteBuffer >, f336 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f337bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f337bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, int32_t &, j_n_ByteBuffer >, f337 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f338bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f338bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, uint32_t &, j_n_ByteBuffer >, f338 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f341bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f341bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, int64_t &, j_n_ByteBuffer >, f341 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f342bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f342bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, uint64_t &, j_n_ByteBuffer >, f342 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f343bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f343bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, float &, j_n_ByteBuffer >, f343 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f344bb(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f344bb(JNIEnv *, jclass, jobject)");
+    gcall< ttrait< jobject, double &, j_n_ByteBuffer >, f344 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+/*
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f217v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f217v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, const int32_t & >, f217 >(env);
+}
+*/
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapi_f211v(JNIEnv * env, jclass cls)
+{
+    TRACE("jboolean Java_myjapi_MyJapi_f211v(JNIEnv *, jclass)");
+    return gcall< ttrait< jboolean, const bool & >, f211 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f212v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f212v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, const char & >, f212 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f213v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f213v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, const int8_t & >, f213 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f214v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f214v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, const uint8_t & >, f214 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f215v(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f215v(JNIEnv *, jclass)");
+    return gcall< ttrait< jshort, const int16_t & >, f215 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f216v(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f216v(JNIEnv *, jclass)");
+    return gcall< ttrait< jshort, const uint16_t & >, f216 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f217v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f217v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, const int32_t & >, f217 >(env);
+}
+
+JNIEXPORT jint JNICALL

+Java_myjapi_MyJapi_f218v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f218v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, const uint32_t & >, f218 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f221v(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f221v(JNIEnv *, jclass)");
+    return gcall< ttrait< jlong, const int64_t & >, f221 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f222v(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f222v(JNIEnv *, jclass)");
+    return gcall< ttrait< jlong, const uint64_t & >, f222 >(env);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapi_f223v(JNIEnv * env, jclass cls)
+{
+    TRACE("jfloat Java_myjapi_MyJapi_f223v(JNIEnv *, jclass)");
+    return gcall< ttrait< jfloat, const float & >, f223 >(env);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapi_f224v(JNIEnv * env, jclass cls)
+{
+    TRACE("jdouble Java_myjapi_MyJapi_f224v(JNIEnv *, jclass)");
+    return gcall< ttrait< jdouble, const double & >, f224 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+/*
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f237v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f237v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, int32_t & >, f237 >(env);
+}
+*/
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapi_f231v(JNIEnv * env, jclass cls)
+{
+    TRACE("jboolean Java_myjapi_MyJapi_f231v(JNIEnv *, jclass)");
+    return gcall< ttrait< jboolean, bool & >, f231 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f232v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f232v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, char & >, f232 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f233v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f233v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, int8_t & >, f233 >(env);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapi_f234v(JNIEnv * env, jclass cls)
+{
+    TRACE("jbyte Java_myjapi_MyJapi_f234v(JNIEnv *, jclass)");
+    return gcall< ttrait< jbyte, uint8_t & >, f234 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f235v(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f235v(JNIEnv *, jclass)");
+    return gcall< ttrait< jshort, int16_t & >, f235 >(env);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapi_f236v(JNIEnv * env, jclass cls)
+{
+    TRACE("jshort Java_myjapi_MyJapi_f236v(JNIEnv *, jclass)");
+    return gcall< ttrait< jshort, uint16_t & >, f236 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f237v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f237v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, int32_t & >, f237 >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapi_f238v(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_MyJapi_f238v(JNIEnv *, jclass)");
+    return gcall< ttrait< jint, uint32_t & >, f238 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f241v(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f241v(JNIEnv *, jclass)");
+    return gcall< ttrait< jlong, int64_t & >, f241 >(env);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapi_f242v(JNIEnv * env, jclass cls)
+{
+    TRACE("jlong Java_myjapi_MyJapi_f242v(JNIEnv *, jclass)");
+    return gcall< ttrait< jlong, uint64_t & >, f242 >(env);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapi_f243v(JNIEnv * env, jclass cls)
+{
+    TRACE("jfloat Java_myjapi_MyJapi_f243v(JNIEnv *, jclass)");
+    return gcall< ttrait< jfloat, float & >, f243 >(env);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapi_f244v(JNIEnv * env, jclass cls)
+{
+    TRACE("jdouble Java_myjapi_MyJapi_f244v(JNIEnv *, jclass)");
+    return gcall< ttrait< jdouble, double & >, f244 >(env);
+}
+
+// ---------------------------------------------------------------------------
+
+/*
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f317v(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f317v(JNIEnv *, jclass, jint)");
+    gcall< ttrait< jint, const int32_t & >, f317 >(env, p0);
+}
+*/
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f311v(JNIEnv * env, jclass cls, jboolean p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f311v(JNIEnv *, jclass, jboolean)");
+    gcall< ttrait< jboolean, const bool & >, f311 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f312v(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f312v(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait< jbyte, const char & >, f312 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f313v(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f313v(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait< jbyte, const int8_t & >, f313 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f314v(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f314v(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait< jbyte, const uint8_t & >, f314 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f315v(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f315v(JNIEnv *, jclass, jshort)");
+    gcall< ttrait< jshort, const int16_t & >, f315 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f316v(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f316v(JNIEnv *, jclass, jshort)");
+    gcall< ttrait< jshort, const uint16_t & >, f316 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f317v(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f317v(JNIEnv *, jclass, jint)");
+    gcall< ttrait< jint, const int32_t & >, f317 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f318v(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f318v(JNIEnv *, jclass, jint)");
+    gcall< ttrait< jint, const uint32_t & >, f318 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f321v(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f321v(JNIEnv *, jclass, jlong)");
+    gcall< ttrait< jlong, const int64_t & >, f321 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f322v(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f322v(JNIEnv *, jclass, jlong)");
+    gcall< ttrait< jlong, const uint64_t & >, f322 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f323v(JNIEnv * env, jclass cls, jfloat p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f323v(JNIEnv *, jclass, jfloat)");
+    gcall< ttrait< jfloat, const float & >, f323 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f324v(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f324v(JNIEnv *, jclass, jdouble)");
+    gcall< ttrait< jdouble, const double & >, f324 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+/*
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f337v(JNIEnv * env, jclass cls, jintArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f337v(JNIEnv *, jclass, jintArray)");
+    gcall< ttrait< jintArray, int32_t & >, f337 >(env, p0);
+}
+*/
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f331v(JNIEnv * env, jclass cls, jbooleanArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f331v(JNIEnv *, jclass, jbooleanArray)");
+    gcall< ttrait< jbooleanArray, bool & >, f331 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f332v(JNIEnv * env, jclass cls, jbyteArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f332v(JNIEnv *, jclass, jbyteArray)");
+    gcall< ttrait< jbyteArray, char & >, f332 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f333v(JNIEnv * env, jclass cls, jbyteArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f333v(JNIEnv *, jclass, jbyteArray)");
+    gcall< ttrait< jbyteArray, int8_t & >, f333 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f334v(JNIEnv * env, jclass cls, jbyteArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f334v(JNIEnv *, jclass, jbyteArray)");
+    gcall< ttrait< jbyteArray, uint8_t & >, f334 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f335v(JNIEnv * env, jclass cls, jshortArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f335v(JNIEnv *, jclass, jshortArray)");
+    gcall< ttrait< jshortArray, int16_t & >, f335 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f336v(JNIEnv * env, jclass cls, jshortArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f336v(JNIEnv *, jclass, jshortArray)");
+    gcall< ttrait< jshortArray, uint16_t & >, f336 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f337v(JNIEnv * env, jclass cls, jintArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f337v(JNIEnv *, jclass, jintArray)");
+    gcall< ttrait< jintArray, int32_t & >, f337 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f338v(JNIEnv * env, jclass cls, jintArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f338v(JNIEnv *, jclass, jintArray)");
+    gcall< ttrait< jintArray, uint32_t & >, f338 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f341v(JNIEnv * env, jclass cls, jlongArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f341v(JNIEnv *, jclass, jlongArray)");
+    gcall< ttrait< jlongArray, int64_t & >, f341 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f342v(JNIEnv * env, jclass cls, jlongArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f342v(JNIEnv *, jclass, jlongArray)");
+    gcall< ttrait< jlongArray, uint64_t & >, f342 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f343v(JNIEnv * env, jclass cls, jfloatArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f343v(JNIEnv *, jclass, jfloatArray)");
+    gcall< ttrait< jfloatArray, float & >, f343 >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_MyJapi_f344v(JNIEnv * env, jclass cls, jdoubleArray p0)
+{
+    TRACE("void Java_myjapi_MyJapi_f344v(JNIEnv *, jclass, jdoubleArray)");
+    gcall< ttrait< jdoubleArray, double & >, f344 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapiCtypes.cpp'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapiCtypes.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi_MyJapiCtypes.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,255 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myjapi_MyJapiCtypes.cpp
+ */
+
+#include <stdint.h>
+#include <jni.h>
+#include "helpers.hpp"
+#include "myapi.hpp"
+#include "myjapi_MyJapiCtypes.h"
+#include "jtie_ttrait.hpp"
+#include "jtie_tconv.hpp"
+#include "jtie_tconv_cvalue.hpp"
+#include "jtie_tconv_cvalue_ext.hpp"
+#include "jtie_tconv_carray.hpp"
+#include "jtie_tconv_carray_ext.hpp"
+#include "jtie_tconv_refbybb.hpp"
+#include "jtie_tconv_refbyval.hpp"
+#include "jtie_tconv_refbyval_ext.hpp"
+#include "jtie_gcalls.hpp"
+
+
+// ---------------------------------------------------------------------------
+// generatable, application & platform-dependent code: API JNI function stubs
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapiCtypes_f11(JNIEnv * env, jclass cls, jboolean p0)
+{
+    TRACE("jboolean Java_myjapi_MyJapiCtypes_f11(JNIEnv *, jclass, jboolean)");
+    return gcall< ttrait_cbool, ttrait_cbool, f11 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f12(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f12(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_cchar, ttrait_cchar, f12 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f13(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f13(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_cint8, ttrait_cint8, f13 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f14(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f14(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_cuint8, ttrait_cuint8, f14 >(env, p0);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapiCtypes_f15(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("jshort Java_myjapi_MyJapiCtypes_f15(JNIEnv *, jclass, jshort)");
+    return gcall< ttrait_cint16, ttrait_cint16, f15 >(env, p0);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapiCtypes_f16(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("jshort Java_myjapi_MyJapiCtypes_f16(JNIEnv *, jclass, jshort)");
+    return gcall< ttrait_cuint16, ttrait_cuint16, f16 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f17(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f17(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_cint32, ttrait_cint32, f17 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f18(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f18(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_cuint32, ttrait_cuint32, f18 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f19(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f19(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_clong, ttrait_clong, f19 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f20(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f20(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_culong, ttrait_culong, f20 >(env, p0);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapiCtypes_f21(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("jlong Java_myjapi_MyJapiCtypes_f21(JNIEnv *, jclass, jlong)");
+    return gcall< ttrait_cint64, ttrait_cint64, f21 >(env, p0);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapiCtypes_f22(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("jlong Java_myjapi_MyJapiCtypes_f22(JNIEnv *, jclass, jlong)");
+    return gcall< ttrait_cuint64, ttrait_cuint64, f22 >(env, p0);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapiCtypes_f23(JNIEnv * env, jclass cls, jfloat p0)
+{
+    TRACE("jfloat Java_myjapi_MyJapiCtypes_f23(JNIEnv *, jclass, jfloat)");
+    return gcall< ttrait_cfloat, ttrait_cfloat, f23 >(env, p0);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapiCtypes_f24(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("jdouble Java_myjapi_MyJapiCtypes_f24(JNIEnv *, jclass, jdouble)");
+    return gcall< ttrait_cdouble, ttrait_cdouble, f24 >(env, p0);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapiCtypes_f25(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("jdouble Java_myjapi_MyJapiCtypes_f25(JNIEnv *, jclass, jdouble)");
+    return gcall< ttrait_cldouble, ttrait_cldouble, f25 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jboolean JNICALL
+Java_myjapi_MyJapiCtypes_f31(JNIEnv * env, jclass cls, jboolean p0)
+{
+    TRACE("jboolean Java_myjapi_MyJapiCtypes_f31(JNIEnv *, jclass, jboolean)");
+    return gcall< ttrait_bool, ttrait_bool, f31 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f32(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f32(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_char, ttrait_char, f32 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f33(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f33(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_int8, ttrait_int8, f33 >(env, p0);
+}
+
+JNIEXPORT jbyte JNICALL
+Java_myjapi_MyJapiCtypes_f34(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jbyte Java_myjapi_MyJapiCtypes_f34(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_uint8, ttrait_uint8, f34 >(env, p0);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapiCtypes_f35(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("jshort Java_myjapi_MyJapiCtypes_f35(JNIEnv *, jclass, jshort)");
+    return gcall< ttrait_int16, ttrait_int16, f35 >(env, p0);
+}
+
+JNIEXPORT jshort JNICALL
+Java_myjapi_MyJapiCtypes_f36(JNIEnv * env, jclass cls, jshort p0)
+{
+    TRACE("jshort Java_myjapi_MyJapiCtypes_f36(JNIEnv *, jclass, jshort)");
+    return gcall< ttrait_uint16, ttrait_uint16, f36 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f37(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f37(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_int32, ttrait_int32, f37 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f38(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f38(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_uint32, ttrait_uint32, f38 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f39(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f39(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_long, ttrait_long, f39 >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_MyJapiCtypes_f40(JNIEnv * env, jclass cls, jint p0)
+{
+    TRACE("jint Java_myjapi_MyJapiCtypes_f40(JNIEnv *, jclass, jint)");
+    return gcall< ttrait_ulong, ttrait_ulong, f40 >(env, p0);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapiCtypes_f41(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("jlong Java_myjapi_MyJapiCtypes_f41(JNIEnv *, jclass, jlong)");
+    return gcall< ttrait_int64, ttrait_int64, f41 >(env, p0);
+}
+
+JNIEXPORT jlong JNICALL
+Java_myjapi_MyJapiCtypes_f42(JNIEnv * env, jclass cls, jlong p0)
+{
+    TRACE("jlong Java_myjapi_MyJapiCtypes_f42(JNIEnv *, jclass, jlong)");
+    return gcall< ttrait_uint64, ttrait_uint64, f42 >(env, p0);
+}
+
+JNIEXPORT jfloat JNICALL
+Java_myjapi_MyJapiCtypes_f43(JNIEnv * env, jclass cls, jfloat p0)
+{
+    TRACE("jfloat Java_myjapi_MyJapiCtypes_f43(JNIEnv *, jclass, jfloat)");
+    return gcall< ttrait_float, ttrait_float, f43 >(env, p0);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapiCtypes_f44(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("jdouble Java_myjapi_MyJapiCtypes_f44(JNIEnv *, jclass, jdouble)");
+    return gcall< ttrait_double, ttrait_double, f44 >(env, p0);
+}
+
+JNIEXPORT jdouble JNICALL
+Java_myjapi_MyJapiCtypes_f45(JNIEnv * env, jclass cls, jdouble p0)
+{
+    TRACE("jdouble Java_myjapi_MyJapiCtypes_f45(JNIEnv * env, jclass cls, jdouble)");
+    return gcall< ttrait_ldouble, ttrait_ldouble, f45 >(env, p0);
+}
+
+// ---------------------------------------------------------------------------

=== added file 'storage/ndb/ndbjtie/src/myjapi/myjapi_classes.cpp'
--- a/storage/ndb/ndbjtie/src/myjapi/myjapi_classes.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/myjapi_classes.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,502 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * myjapi_classes.cpp
+ */
+
+#include <stdint.h>
+#include <jni.h>
+#include "helpers.hpp"
+#include "myapi.hpp"
+#include "myjapi_A.h"
+#include "myjapi_B0.h"
+#include "myjapi_B1.h"
+#include "jtie_ttrait.hpp"
+#include "jtie_tconv.hpp"
+#include "jtie_tconv_cvalue.hpp"
+#include "jtie_tconv_carray.hpp"
+#include "jtie_tconv_cstring.hpp"
+#include "jtie_tconv_refbybb.hpp"
+#include "jtie_tconv_refbyval.hpp"
+#include "jtie_tconv_cobject.hpp"
+#include "jtie_gcalls.hpp"
+
+// ---------------------------------------------------------------------------
+// generatable, application-dependent code: API JNI function stubs
+// ---------------------------------------------------------------------------
+
+//
+// Type conversion definitions for class myapi.A
+//
+
+struct _m_A {
+    static const char * const java_internal_class_name;
+};
+const char * const _m_A::java_internal_class_name = "myjapi/A";
+typedef _m_A * m_A;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, m_A >(m_A s) {
+    TRACE("jobject cast(m_A)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline m_A
+cast< m_A, jobject >(jobject s) {
+    TRACE("m_A cast(jobject)");
+    return reinterpret_cast< m_A >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, A, jobject, A & > ttrait_myjapi_A_target;
+typedef ttrait< jobject, A *, m_A, A * > ttrait_myjapi_A_ptr_return;
+typedef ttrait< jobject, A &, m_A, A & > ttrait_myjapi_A_ref_return;
+typedef ttrait< jobject, A *, jobject, A * > ttrait_myjapi_A_ptr_arg;
+typedef ttrait< jobject, A &, jobject, A & > ttrait_myjapi_A_ref_arg;
+
+// constructor wrapper (return a reference for automatic Java exceptions)
+A &
+myjapi_A_create() {
+    TRACE("A & myjapi_A_create()");
+    A * r = new A();
+    printf("    r = %p\n", r);
+    return *r;
+};
+
+// destructor wrapper (take a reference for automatic Java exceptions)
+void
+myjapi_A_delete(A & p0) {
+    TRACE("void myjapi_A_delete(A &)");
+    printf("    p0 = %p\n", &p0);
+    delete &p0;
+
+};
+
+// this trait definition has a declared but undefined Param match
+// (default Param decl); hence, compilation passes but we get
+// undefined symbols during linking:
+// ttrait< jobject, A *, m_A, A * > ttrait_myjapi_A_ptr_arg;
+
+//
+// Type conversion definitions for class myapi.B0
+//
+
+struct _m_B0 {
+    static const char * const java_internal_class_name;
+};
+const char * const _m_B0::java_internal_class_name = "myjapi/B0";
+typedef _m_B0 * m_B0;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, m_B0 >(m_B0 s) {
+    TRACE("jobject cast(m_B0)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline m_B0
+cast< m_B0, jobject >(jobject s) {
+    TRACE("m_B0 cast(jobject)");
+    return reinterpret_cast< m_B0 >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, B0, jobject, B0 & > ttrait_myjapi_B0_target;
+typedef ttrait< jobject, B0 *, m_B0, B0 * > ttrait_myjapi_B0_ptr_return;
+typedef ttrait< jobject, B0 &, m_B0, B0 & > ttrait_myjapi_B0_ref_return;
+typedef ttrait< jobject, B0 *, jobject, B0 * > ttrait_myjapi_B0_ptr_arg;
+typedef ttrait< jobject, B0 &, jobject, B0 & > ttrait_myjapi_B0_ref_arg;
+
+//
+// Type conversion definitions for class myapi.B1
+//
+
+struct _m_B1 {
+    static const char * const java_internal_class_name;
+};
+const char * const _m_B1::java_internal_class_name = "myjapi/B1";
+typedef _m_B1 * m_B1;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, m_B1 >(m_B1 s) {
+    TRACE("jobject cast(m_B1)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline m_B1
+cast< m_B1, jobject >(jobject s) {
+    TRACE("m_B1 cast(jobject)");
+    return reinterpret_cast< m_B1 >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, B1, jobject, B1 & > ttrait_myjapi_B1_target;
+typedef ttrait< jobject, B1 *, m_B1, B1 * > ttrait_myjapi_B1_ptr_return;
+typedef ttrait< jobject, B1 &, m_B1, B1 & > ttrait_myjapi_B1_ref_return;
+typedef ttrait< jobject, B1 *, jobject, B1 * > ttrait_myjapi_B1_ptr_arg;
+typedef ttrait< jobject, B1 &, jobject, B1 & > ttrait_myjapi_B1_ref_arg;
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_create(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_A_create(JNIEnv *, jclass)");
+    return gcreate< ttrait_myjapi_A_ref_return, myjapi_A_create >(env);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_delete(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_delete(JNIEnv *, jclass, jobject)");
+    gdelete< ttrait_myjapi_A_ref_arg, myjapi_A_delete >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_f0s(JNIEnv * env, jclass cls) 
+{
+    TRACE("jint Java_myjapi_A_f0s(JNIEnv *, jclass)");
+    return gcall< ttrait_int32, A::f0s >(env);
+    //return 10;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_f0n(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jint Java_myjapi_A_f0n(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, &A::f0n >(env, obj);
+    //return 11;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_f0v(JNIEnv * env, jobject obj)
+{
+    TRACE("jint Java_myjapi_A_f0v(JNIEnv *, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, &A::f0v >(env, obj);
+    //return 12;
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_getB0(JNIEnv * env, jobject obj)
+{
+    TRACE("jobject Java_myjapi_A_getB0(JNIEnv *, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_myjapi_B0_ptr_return, &A::getB0 >(env, obj);
+    //return 0;
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_getB1(JNIEnv * env, jobject obj)
+{
+    TRACE("jobject Java_myjapi_A_getB1(JNIEnv *, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_myjapi_B1_ptr_return, &A::getB1 >(env, obj);
+    //return 0;
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_return_1ptr(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_A_return_1ptr(JNIEnv *, jclass)");
+    return gcall< ttrait_myjapi_A_ptr_return, A::return_ptr >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_return_1null_1ptr(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_A_return_1null_1ptr(JNIEnv *, jclass)");
+    return gcall< ttrait_myjapi_A_ptr_return, A::return_null_ptr >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_return_1ref(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_A_return_1ref(JNIEnv *, jclass)");
+    return gcall< ttrait_myjapi_A_ref_return, A::return_ref >(env);
+}
+
+JNIEXPORT jobject JNICALL
+Java_myjapi_A_return_1null_1ref(JNIEnv * env, jclass cls)
+{
+    TRACE("jobject Java_myjapi_A_return_1null_1ref(JNIEnv *, jclass)");
+    return gcall< ttrait_myjapi_A_ref_return, A::return_null_ref >(env);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_take_1ptr(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_take_1ptr(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_ptr_arg, A::take_ptr >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_take_1null_1ptr(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_take_1null_1ptr(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_ptr_arg, A::take_null_ptr >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_take_1ref(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_take_1ref(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_ref_arg, A::take_ref >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_take_1null_1ref(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_take_1null_1ref(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_ref_arg, A::take_null_ref >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_print(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_myjapi_A_print(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_ptr_arg, A::print >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B0_f0s(JNIEnv * env, jclass cls) 
+{
+    TRACE("jint Java_myjapi_B0_f0s(JNIEnv *, jclass)");
+    return gcall< ttrait_int32, B0::f0s >(env);
+    //return 20;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B0_f0n(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jint Java_myjapi_B0_f0n(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_myjapi_B0_target, ttrait_int32, &B0::f0n >(env, obj);
+    //return 21;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B0_f0v(JNIEnv * env, jobject obj)
+{
+    TRACE("jint Java_myjapi_B0_f0v(JNIEnv *, jobject)");
+    return gcall< ttrait_myjapi_B0_target, ttrait_int32, &B0::f0v >(env, obj);
+    //return 22;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B1_f0s(JNIEnv * env, jclass cls) 
+{
+    TRACE("jint Java_myjapi_B1_f0s(JNIEnv *, jclass)");
+    return gcall< ttrait_int32, B1::f0s >(env);
+    //return 30;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B1_f0n(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jint Java_myjapi_B1_f0n(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_myjapi_B1_target, ttrait_int32, &B1::f0n >(env, obj);
+    //return 31;
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_B1_f0v(JNIEnv * env, jobject obj)
+{
+    TRACE("jint Java_myjapi_B1_f0v(JNIEnv *, jobject)");
+    return gcall< ttrait_myjapi_B1_target, ttrait_int32, &B1::f0v >(env, obj);
+    //return 32;
+}
+
+// ---------------------------------------------------------------------------
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_h0(JNIEnv * env, jclass cls)
+{
+    TRACE("void Java_myjapi_A_h0(JNIEnv *, jclass)");
+    gcall< &h0 >(env);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_h1(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("void Java_myjapi_A_h1(JNIEnv *, jclass, jbyte)");
+    gcall< ttrait_int8, &h1 >(env, p0);
+}
+

+JNIEXPORT void JNICALL
+Java_myjapi_A_h2(JNIEnv * env, jclass cls, jbyte p0, jshort p1)
+{
+    TRACE("void Java_myjapi_A_h2(JNIEnv *, jclass, jbyte, jshort)");
+    gcall< ttrait_int8, ttrait_int16, &h2 >(env, p0, p1);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_h3(JNIEnv * env, jclass cls, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("void Java_myjapi_A_h3(JNIEnv *, jclass, jbyte, jshort, jint)");
+    gcall< ttrait_int8, ttrait_int16, ttrait_int32, &h3 >(env, p0, p1, p2);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_h0r(JNIEnv * env, jclass cls)
+{
+    TRACE("jint Java_myjapi_A_h0r(JNIEnv *, jclass)");
+    return gcall< ttrait_int32, &h0r >(env);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_h1r(JNIEnv * env, jclass cls, jbyte p0)
+{
+    TRACE("jint Java_myjapi_A_h1r(JNIEnv *, jclass, jbyte)");
+    return gcall< ttrait_int32, ttrait_int8, &h1r >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_h2r(JNIEnv * env, jclass cls, jbyte p0, jshort p1)
+{
+    TRACE("jint Java_myjapi_A_h2r(JNIEnv *, jclass, jbyte, jshort)");
+    return gcall< ttrait_int32, ttrait_int8, ttrait_int16, &h2r >(env, p0, p1);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_h3r(JNIEnv * env, jclass cls, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("jint Java_myjapi_A_h3r(JNIEnv *, jclass, jbyte, jshort, jint)");
+    return gcall< ttrait_int32, ttrait_int8, ttrait_int16, ttrait_int32, &h3r >(env, p0, p1, p2);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g0c(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("void Java_myjapi_A_g0c(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_target, &A::g0c >(env, obj);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g1c(JNIEnv * env, jclass cls, jobject obj, jbyte p0)
+{
+    TRACE("void Java_myjapi_A_g1c(JNIEnv *, jclass, jobject, jbyte)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, &A::g1c >(env, obj, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g2c(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1)
+{
+    TRACE("void Java_myjapi_A_g2c(JNIEnv *, jclass, jobject, jbyte, jshort)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, ttrait_int16, &A::g2c >(env, obj, p0, p1);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g3c(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("void Java_myjapi_A_g3c(JNIEnv *, jclass, jobject, jbyte, jshort, jint)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, ttrait_int16, ttrait_int32, &A::g3c >(env, obj, p0, p1, p2);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g0(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("void Java_myjapi_A_g0(JNIEnv *, jclass, jobject)");
+    gcall< ttrait_myjapi_A_target, &A::g0 >(env, obj);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g1(JNIEnv * env, jclass cls, jobject obj, jbyte p0)
+{
+    TRACE("void Java_myjapi_A_g1(JNIEnv *, jclass, jobject, jbyte)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, &A::g1 >(env, obj, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g2(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1)
+{
+    TRACE("void Java_myjapi_A_g2(JNIEnv *, jclass, jobject, jbyte, jshort)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, ttrait_int16, &A::g2 >(env, obj, p0, p1);
+}
+
+JNIEXPORT void JNICALL
+Java_myjapi_A_g3(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("void Java_myjapi_A_g3(JNIEnv *, jclass, jobject, jbyte, jshort, jint)");
+    gcall< ttrait_myjapi_A_target, ttrait_int8, ttrait_int16, ttrait_int32, &A::g3 >(env, obj, p0, p1, p2);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g0rc(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jint Java_myjapi_A_g0rc(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, &A::g0rc >(env, obj);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g1rc(JNIEnv * env, jclass cls, jobject obj, jbyte p0)
+{
+    TRACE("jint Java_myjapi_A_g1rc(JNIEnv *, jclass, jobject, jbyte)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, &A::g1rc >(env, obj, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g2rc(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1)
+{
+    TRACE("jint Java_myjapi_A_g2rc(JNIEnv *, jclass, jobject, jbyte, jshort)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, ttrait_int16, &A::g2rc >(env, obj, p0, p1);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g3rc(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("jint Java_myjapi_A_g3rc(JNIEnv *, jclass, jobject, jbyte, jshort, jint)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, ttrait_int16, ttrait_int32, &A::g3rc >(env, obj, p0, p1, p2);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g0r(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jint Java_myjapi_A_g0r(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, &A::g0r >(env, obj);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g1r(JNIEnv * env, jclass cls, jobject obj, jbyte p0)
+{
+    TRACE("jint Java_myjapi_A_g1r(JNIEnv *, jclass, jobject, jbyte)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, &A::g1r >(env, obj, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g2r(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1)
+{
+    TRACE("jint Java_myjapi_A_g2r(JNIEnv *, jclass, jobject, jbyte, jshort)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, ttrait_int16, &A::g2r >(env, obj, p0, p1);
+}
+
+JNIEXPORT jint JNICALL
+Java_myjapi_A_g3r(JNIEnv * env, jclass cls, jobject obj, jbyte p0, jshort p1, jint p2)
+{
+    TRACE("jint Java_myjapi_A_g3r(JNIEnv *, jclass, jobject, jbyte, jshort, jint)");
+    return gcall< ttrait_myjapi_A_target, ttrait_int32, ttrait_int8, ttrait_int16, ttrait_int32, &A::g3r >(env, obj, p0, p1, p2);
+}
+
+// ---------------------------------------------------------------------------

=== added directory 'storage/ndb/ndbjtie/src/myjapi/test'
=== added file 'storage/ndb/ndbjtie/src/myjapi/test/MyJapiTest.java'
--- a/storage/ndb/ndbjtie/src/myjapi/test/MyJapiTest.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/myjapi/test/MyJapiTest.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,952 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * MyJapiTest.java
+ */
+
+package test;
+
+import java.io.PrintWriter;
+
+import java.math.BigInteger;
+//import java.math.BigDecimal;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.CharBuffer;
+import java.nio.ShortBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+import java.nio.FloatBuffer;
+import java.nio.DoubleBuffer;
+
+import myjapi.MyJapi;
+import myjapi.MyJapiCtypes;
+import myjapi.A;
+import myjapi.B0;
+import myjapi.B1;
+
+public class MyJapiTest {
+
+    static protected final PrintWriter out = new PrintWriter(System.out, true);
+
+    static protected final PrintWriter err = new PrintWriter(System.err, true);
+
+    /**
+     * Loads a dynamically linked system library and reports any failures.
+     */
+    static protected void loadSystemLibrary(String name) {
+        out.print("loading libary ...");
+        out.flush();
+        try {
+            System.loadLibrary(name);
+        } catch (UnsatisfiedLinkError e) {
+            String path;
+            try {
+                path = System.getProperty("java.library.path");
+            } catch (Exception ex) {
+                path = "<exception caught: " + ex.getMessage() + ">";
+            }
+            err.println("failed loading library '"
+                        + name + "'; java.library.path='" + path + "'");
+            throw e;
+        } catch (SecurityException e) {
+            err.println("failed loading library '"
+                        + name + "'; caught exception: " + e);
+            throw e;
+        }
+        out.println("          [" + name + "]");
+    }
+
+/*    
+    static public abstract class Run
+    {
+        private String name;
+
+        public Run(String name) {
+            this.name = name;
+        }
+
+        public abstract T call();
+        
+        public abstract T call();
+        
+        public void test(T e) {
+            out.println();
+            out.println("calling " + name + "() ...");
+            T r = call();
+            if (e.equals(r))
+                throw new RuntimeException("e = " + e + ", r = " + r);
+        }
+        
+        public void run(int n) {
+            if 
+            for (int i = 1; i < 3; i++) {
+                test(i);
+            }
+        }
+    }
+*/
+
+    static public void test0() {
+        out.println("--> MyJapiTest.test0()");
+
+        out.println();
+        out.println("testing basic MyJapi function: f0() ...");
+        out.println();
+
+        out.println("\ncalling f0()");
+        MyJapi.f0();
+
+        out.println();
+        out.println("testing MyJapiCtypes functions: fxx(0) ...");
+        out.println();
+
+        for (int i = 0; i < 2; i++) {
+            out.println("\ncalling f11()");
+            final boolean nf11 = MyJapiCtypes.f11(false);
+            assert(nf11 == false);
+            out.println("\ncalling f12()");
+            final byte nf12 = MyJapiCtypes.f12((byte)0);
+            assert(nf12 == (byte)0);
+            out.println("\ncalling f13()");
+            final byte nf13 = MyJapiCtypes.f13((byte)0);
+            assert(nf13 == (byte)0);
+            out.println("\ncalling f14()");
+            final byte nf14 = MyJapiCtypes.f14((byte)0);
+            assert(nf14 == (byte)0);
+            out.println("\ncalling f15()");
+            final short nf15 = MyJapiCtypes.f15((short)0);
+            assert(nf15 == (short)0);
+            out.println("\ncalling f16()");
+            final short nf16 = MyJapiCtypes.f16((short)0);
+            assert(nf16 == (short)0);
+            out.println("\ncalling f17()");
+            final int nf17 = MyJapiCtypes.f17((int)0);
+            assert(nf17 == (int)0);
+            out.println("\ncalling f18()");
+            final int nf18 = MyJapiCtypes.f18((int)0);
+            assert(nf18 == (int)0);
+            out.println("\ncalling f19()");
+            final int nf19 = MyJapiCtypes.f19((int)0);
+            assert(nf19 == (int)0);
+            out.println("\ncalling f20()");
+            final int nf20 = MyJapiCtypes.f20((int)0);
+            assert(nf20 == (int)0);
+            out.println("\ncalling f21()");
+            final long nf21 = MyJapiCtypes.f21((long)0);
+            assert(nf21 == (long)0);
+            out.println("\ncalling f22()");
+            final long nf22 = MyJapiCtypes.f22((long)0);
+            assert(nf22 == (long)0);
+            out.println("\ncalling f23()");
+            final float nf23 = MyJapiCtypes.f23((float)0);
+            assert(nf23 == (float)0);
+            out.println("\ncalling f24()");
+            final double nf24 = MyJapiCtypes.f24((double)0);
+            assert(nf24 == (double)0);
+            out.println("\ncalling f25()");
+            final double nf25 = MyJapiCtypes.f25((double)0);
+            assert(nf25 == (double)0);
+
+            out.println("\ncalling f31()");
+            final boolean nf31 = MyJapiCtypes.f31(false);
+            assert(nf31 == false);
+            out.println("\ncalling f32()");
+            final byte nf32 = MyJapiCtypes.f32((byte)0);
+            assert(nf32 == (byte)0);
+            out.println("\ncalling f33()");
+            final byte nf33 = MyJapiCtypes.f33((byte)0);
+            assert(nf33 == (byte)0);
+            out.println("\ncalling f34()");
+            final byte nf34 = MyJapiCtypes.f34((byte)0);
+            assert(nf34 == (byte)0);
+            out.println("\ncalling f35()");
+            final short nf35 = MyJapiCtypes.f35((short)0);
+            assert(nf35 == (short)0);
+            out.println("\ncalling f36()");
+            final short nf36 = MyJapiCtypes.f36((short)0);
+            assert(nf36 == (short)0);
+            out.println("\ncalling f37()");
+            final int nf37 = MyJapiCtypes.f37((int)0);
+            assert(nf37 == (int)0);
+            out.println("\ncalling f38()");
+            final int nf38 = MyJapiCtypes.f38((int)0);
+            assert(nf38 == (int)0);
+            out.println("\ncalling f39()");
+            final int nf39 = MyJapiCtypes.f39((int)0);
+            assert(nf39 == (int)0);
+            out.println("\ncalling f40()");
+            final int nf40 = MyJapiCtypes.f40((int)0);
+            assert(nf40 == (int)0);
+            out.println("\ncalling f41()");
+            final long nf41 = MyJapiCtypes.f41((long)0);
+            assert(nf41 == (long)0);
+            out.println("\ncalling f42()");
+            final long nf42 = MyJapiCtypes.f42((long)0);
+            assert(nf42 == (long)0);
+            out.println("\ncalling f43()");
+            final float nf43 = MyJapiCtypes.f43((float)0);
+            assert(nf43 == (float)0);
+            out.println("\ncalling f44()");
+            final double nf44 = MyJapiCtypes.f44((double)0);
+            assert(nf44 == (double)0);
+            out.println("\ncalling f45()");
+            final double nf45 = MyJapiCtypes.f45((double)0);
+            assert(nf45 == (double)0);
+        }
+
+        out.println();
+        out.println("<-- MyJapiTest.test0()");
+    }
+
+    static public void test1() {
+        out.println("--> MyJapiTest.test1()");
+
+        out.println();
+        out.println("testing basic MyJapi functions: f1xx(f0xx()) ...");
+        out.println();
+
+        out.println("\ncalling f0()");
+        MyJapi.f0();
+
+        for (int i = 0; i < 2; i++) {
+            out.println("\ncalling f111(f011())");
+            MyJapi.f111(MyJapi.f011());
+            out.println("\ncalling f112(f012())");
+            MyJapi.f112(MyJapi.f012());
+            out.println("\ncalling f113(f013())");
+            MyJapi.f113(MyJapi.f013());
+            out.println("\ncalling f114(f014())");
+            MyJapi.f114(MyJapi.f014());
+            out.println("\ncalling f115(f015())");
+            MyJapi.f115(MyJapi.f015());
+            out.println("\ncalling f116(f016())");
+            MyJapi.f116(MyJapi.f016());
+            out.println("\ncalling f117(f017())");
+            MyJapi.f117(MyJapi.f017());
+            out.println("\ncalling f118(f018())");
+            MyJapi.f118(MyJapi.f018());
+            out.println("\ncalling f121(f021())");
+            MyJapi.f121(MyJapi.f021());
+            out.println("\ncalling f122(f022())");
+            MyJapi.f122(MyJapi.f022());
+            out.println("\ncalling f123(f023())");
+            MyJapi.f123(MyJapi.f023());
+            out.println("\ncalling f124(f024())");
+            MyJapi.f124(MyJapi.f024());
+
+            out.println("\ncalling f131(f031())");
+            MyJapi.f131(MyJapi.f031());
+            out.println("\ncalling f132(f032())");
+            MyJapi.f132(MyJapi.f032());
+            out.println("\ncalling f133(f033())");
+            MyJapi.f133(MyJapi.f033());
+            out.println("\ncalling f134(f034())");
+            MyJapi.f134(MyJapi.f034());
+            out.println("\ncalling f135(f035())");
+            MyJapi.f135(MyJapi.f035());
+            out.println("\ncalling f136(f036())");
+            MyJapi.f136(MyJapi.f036());
+            out.println("\ncalling f137(f037())");
+            MyJapi.f137(MyJapi.f037());
+            out.println("\ncalling f138(f038())");
+            MyJapi.f138(MyJapi.f038());
+            out.println("\ncalling f141(f041())");
+            MyJapi.f141(MyJapi.f041());
+            out.println("\ncalling f142(f042())");
+            MyJapi.f142(MyJapi.f042());
+            out.println("\ncalling f143(f043())");
+            MyJapi.f143(MyJapi.f043());
+            out.println("\ncalling f144(f044())");
+            MyJapi.f144(MyJapi.f044());
+        }
+
+        out.println();
+        out.println("<-- MyJapiTest.test1()");
+    }
+    
+    static public void test2() {
+        out.println("--> MyJapiTest.test2()");
+
+        out.println();
+        out.println("testing basic MyJapi functions: f3xxbb(f2xxbb()) ...");
+        out.println();
+
+        // XXX todo: test
+        // java/lang/IllegalArgumentException
+        // java/nio/ReadOnlyBufferException
+
+        if (false) {
+            out.println("\ncalling f237bb()");
+            ByteBuffer bb = MyJapi.f237bb();
+            out.println("bb = " + bb);
+            bb.order(ByteOrder.nativeOrder()); // initial order is big endian!
+            IntBuffer ib = bb.asIntBuffer();
+            out.println("ib = " + ib);
+            out.println("ib.get() = " + ib.get());
+            out.println("\ncalling f337bb()");
+            MyJapi.f337bb(bb);
+        }
+        if (false) {
+            out.println("\ncalling f217()");
+            ByteBuffer bb = MyJapi.f217bb();
+            out.println("bb = " + bb);
+            bb.order(ByteOrder.nativeOrder()); // initial order is big endian!
+            IntBuffer ib = bb.asIntBuffer();
+            out.println("ib = " + ib);
+            out.println("ib.get() = " + ib.get());
+            out.println("\ncalling f317bb()");
+            MyJapi.f317bb(bb);
+        }
+
+        for (int i = 0; i < 2; i++) {
+            out.println("\ncalling f311bb(f211bb())");
+            final ByteBuffer f211bb = MyJapi.f211bb().order(ByteOrder.nativeOrder());
+            final byte nf211bb = f211bb.asReadOnlyBuffer().get();
+            MyJapi.f311bb(f211bb);
+            assert (nf211bb == f211bb.asReadOnlyBuffer().get());
+            MyJapi.f311bb(MyJapi.f211bb());
+            assert (nf211bb - 1 == f211bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f312bb(f212bb())");
+            final ByteBuffer f212bb = MyJapi.f212bb().order(ByteOrder.nativeOrder());
+            final byte nf212bb = f212bb.asReadOnlyBuffer().get();
+            MyJapi.f312bb(f212bb);
+            assert (nf212bb == f212bb.asReadOnlyBuffer().get());
+            MyJapi.f312bb(MyJapi.f212bb());
+            assert (nf212bb + 1 == f212bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f313bb(f213bb())");
+            final ByteBuffer f213bb = MyJapi.f213bb().order(ByteOrder.nativeOrder());
+            final byte nf213bb = f213bb.asReadOnlyBuffer().get();
+            MyJapi.f313bb(f213bb);
+            assert (nf213bb == f213bb.asReadOnlyBuffer().get());
+            MyJapi.f313bb(MyJapi.f213bb());
+            assert (nf213bb + 1 == f213bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f314bb(f214bb())");
+            final ByteBuffer f214bb = MyJapi.f214bb().order(ByteOrder.nativeOrder());
+            final byte nf214bb = f214bb.asReadOnlyBuffer().get();
+            MyJapi.f314bb(f214bb);
+            assert (nf214bb == f214bb.asReadOnlyBuffer().get());
+            MyJapi.f314bb(MyJapi.f214bb());
+            assert (nf214bb + 1 == f214bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f315bb(f215bb())");
+            final ByteBuffer f215bb = MyJapi.f215bb().order(ByteOrder.nativeOrder());
+            final short nf215bb = f215bb.asShortBuffer().get();
+            MyJapi.f315bb(f215bb);
+            assert (nf215bb == f215bb.asShortBuffer().get());
+            MyJapi.f315bb(MyJapi.f215bb());
+            assert (nf215bb + 1 == f215bb.asShortBuffer().get());
+
+            out.println("\ncalling f316bb(f216bb())");
+            final ByteBuffer f216bb = MyJapi.f216bb().order(ByteOrder.nativeOrder());
+            final short nf216bb = f216bb.asShortBuffer().get();
+            MyJapi.f316bb(f216bb);
+            assert (nf216bb == f216bb.asShortBuffer().get());
+            MyJapi.f316bb(MyJapi.f216bb());
+            assert (nf216bb + 1 == f216bb.asShortBuffer().get());
+
+            out.println("\ncalling f317bb(f217bb())");
+            final ByteBuffer f217bb = MyJapi.f217bb().order(ByteOrder.nativeOrder());
+            final int nf217bb = f217bb.asIntBuffer().get();
+            MyJapi.f317bb(f217bb);
+            assert (nf217bb == f217bb.asIntBuffer().get());
+            MyJapi.f317bb(MyJapi.f217bb());
+            assert (nf217bb + 1 == f217bb.asIntBuffer().get());
+
+            out.println("\ncalling f318bb(f218bb())");
+            final ByteBuffer f218bb = MyJapi.f218bb().order(ByteOrder.nativeOrder());
+            final int nf218bb = f218bb.asIntBuffer().get();
+            MyJapi.f318bb(f218bb);
+            assert (nf218bb == f218bb.asIntBuffer().get());
+            MyJapi.f318bb(MyJapi.f218bb());
+            assert (nf218bb + 1 == f218bb.asIntBuffer().get());
+
+            out.println("\ncalling f321bb(f221bb())");
+            final ByteBuffer f221bb = MyJapi.f221bb().order(ByteOrder.nativeOrder());
+            final long nf221bb = f221bb.asLongBuffer().get();
+            MyJapi.f321bb(f221bb);
+            assert (nf221bb == f221bb.asLongBuffer().get());
+            MyJapi.f321bb(MyJapi.f221bb());
+            assert (nf221bb + 1 == f221bb.asLongBuffer().get());
+
+            out.println("\ncalling f322bb(f222bb())");
+            final ByteBuffer f222bb = MyJapi.f222bb().order(ByteOrder.nativeOrder());
+            final long nf222bb = f222bb.asLongBuffer().get();
+            MyJapi.f322bb(f222bb);
+            assert (nf222bb == f222bb.asLongBuffer().get());
+            MyJapi.f322bb(MyJapi.f222bb());
+            assert (nf222bb + 1 == f222bb.asLongBuffer().get());
+
+            out.println("\ncalling f323bb(f223bb())");
+            final ByteBuffer f223bb = MyJapi.f223bb().order(ByteOrder.nativeOrder());
+            final float nf223bb = f223bb.asFloatBuffer().get();
+            MyJapi.f323bb(f223bb);
+            assert (nf223bb == f223bb.asFloatBuffer().get());
+            MyJapi.f323bb(MyJapi.f223bb());
+            assert (nf223bb + 1 == f223bb.asFloatBuffer().get());
+
+            out.println("\ncalling f324bb(f224bb())");
+            final ByteBuffer f224bb = MyJapi.f224bb().order(ByteOrder.nativeOrder());
+            final double nf224bb = f224bb.asDoubleBuffer().get();
+            MyJapi.f324bb(f224bb);
+            assert (nf224bb == f224bb.asDoubleBuffer().get());
+            MyJapi.f324bb(MyJapi.f224bb());
+            assert (nf224bb + 1 == f224bb.asDoubleBuffer().get());
+
+            out.println("\ncalling f331bb(f231bb())");
+            final ByteBuffer f231bb = MyJapi.f231bb().order(ByteOrder.nativeOrder());
+            final byte nf231bb = f231bb.asReadOnlyBuffer().get();
+            MyJapi.f331bb(f231bb);
+            assert (nf231bb - 1 == f231bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f332bb(f232bb())");
+            final ByteBuffer f232bb = MyJapi.f232bb().order(ByteOrder.nativeOrder());
+            final byte nf232bb = f232bb.asReadOnlyBuffer().get();
+            MyJapi.f332bb(f232bb);
+            assert (nf232bb + 1 == f232bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f333bb(f233bb())");
+            final ByteBuffer f233bb = MyJapi.f233bb().order(ByteOrder.nativeOrder());
+            final byte nf233bb = f233bb.asReadOnlyBuffer().get();
+            MyJapi.f333bb(f233bb);
+            assert (nf233bb + 1 == f233bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f334bb(f234bb())");
+            final ByteBuffer f234bb = MyJapi.f234bb().order(ByteOrder.nativeOrder());
+            final byte nf234bb = f234bb.asReadOnlyBuffer().get();
+            MyJapi.f334bb(f234bb);
+            assert (nf234bb + 1 == f234bb.asReadOnlyBuffer().get());
+
+            out.println("\ncalling f335bb(f235bb())");
+            final ByteBuffer f235bb = MyJapi.f235bb().order(ByteOrder.nativeOrder());
+            final short nf235bb = f235bb.asShortBuffer().get();
+            MyJapi.f335bb(f235bb);
+            assert (nf235bb + 1 == f235bb.asShortBuffer().get());
+
+            out.println("\ncalling f336bb(f236bb())");
+            final ByteBuffer f236bb = MyJapi.f236bb().order(ByteOrder.nativeOrder());
+            final short nf236bb = f236bb.asShortBuffer().get();
+            MyJapi.f336bb(f236bb);
+            assert (nf236bb + 1 == f236bb.asShortBuffer().get());
+
+            out.println("\ncalling f337bb(f237bb())");
+            final ByteBuffer f237bb = MyJapi.f237bb().order(ByteOrder.nativeOrder());
+            final int nf237bb = f237bb.asIntBuffer().get();
+            MyJapi.f337bb(f237bb);
+            assert (nf237bb + 1 == f237bb.asIntBuffer().get());
+
+            out.println("\ncalling f338bb(f238bb())");
+            final ByteBuffer f238bb = MyJapi.f238bb().order(ByteOrder.nativeOrder());
+            final int nf238bb = f238bb.asIntBuffer().get();
+            MyJapi.f338bb(f238bb);
+            assert (nf238bb + 1 == f238bb.asIntBuffer().get());
+
+            out.println("\ncalling f341bb(f241bb())");
+            final ByteBuffer f241bb = MyJapi.f241bb().order(ByteOrder.nativeOrder());
+            final long nf241bb = f241bb.asLongBuffer().get();
+            MyJapi.f341bb(f241bb);
+            assert (nf241bb + 1 == f241bb.asLongBuffer().get());
+
+            out.println("\ncalling f342bb(f242bb())");
+            final ByteBuffer f242bb = MyJapi.f242bb().order(ByteOrder.nativeOrder());
+            final long nf242bb = f242bb.asLongBuffer().get();
+            MyJapi.f342bb(f242bb);
+            assert (nf242bb + 1 == f242bb.asLongBuffer().get());
+
+            out.println("\ncalling f343bb(f243bb())");
+            final ByteBuffer f243bb = MyJapi.f243bb().order(ByteOrder.nativeOrder());
+            final float nf243bb = f243bb.asFloatBuffer().get();
+            MyJapi.f343bb(f243bb);
+            assert (nf243bb + 1 == f243bb.asFloatBuffer().get());
+
+            out.println("\ncalling f344bb(f244bb())");
+            final ByteBuffer f244bb = MyJapi.f244bb().order(ByteOrder.nativeOrder());
+            final double nf244bb = f244bb.asDoubleBuffer().get();
+            MyJapi.f344bb(f244bb);
+            assert (nf244bb + 1 == f244bb.asDoubleBuffer().get());
+        }
+
+        out.println();
+        out.println("<-- MyJapiTest.test2()");
+    }
+    
+    static public void test3() {
+        out.println("--> MyJapiTest.test3()");
+
+        out.println();
+        out.println("testing basic MyJapi functions: f3xxv(f2xxv()) ...");
+        out.println();
+
+        // XXX check NULL argument, array length != 1 arg
+
+        if (false) {
+            out.println("\ncalling f317v(f217v()); f317v(f217v())");
+            final int nf217v0 = MyJapi.f217v();
+            MyJapi.f317v(nf217v0);
+            final int nf217v1 = MyJapi.f217v();
+            MyJapi.f317v(nf217v1);
+            assert (nf217v0 + 1 == nf217v1);
+        }
+        if (false) {
+            out.println("\ncalling f337bb(f237bb()); f237v()");
+            final int nf237v0 = MyJapi.f237v();
+            final int[] nf337v = { nf237v0 };
+            MyJapi.f337v(nf337v);
+            assert (nf237v0 + 1 == nf337v[0]);
+            final int nf237v1 = MyJapi.f237v();
+            assert (nf237v1 == nf337v[0]);
+        }
+
+        for (int i = 0; i < 2; i++) {
+            out.println("\ncalling f311v(f211v()); f311v(f211v())");
+            final boolean nf211v0 = MyJapi.f211v();
+            MyJapi.f311v(nf211v0);
+            final boolean nf211v1 = MyJapi.f211v();
+            MyJapi.f311v(nf211v1);
+            assert (!nf211v0 == nf211v1);
+
+            out.println("\ncalling f312v(f212v()); f312v(f212v())");
+            final byte nf212v0 = MyJapi.f212v();
+            MyJapi.f312v(nf212v0);
+            final byte nf212v1 = MyJapi.f212v();
+            MyJapi.f312v(nf212v1);
+            assert (nf212v0 + 1 == nf212v1);
+
+            out.println("\ncalling f313v(f213v()); f313v(f213v())");
+            final byte nf213v0 = MyJapi.f213v();
+            MyJapi.f313v(nf213v0);
+            final byte nf213v1 = MyJapi.f213v();
+            MyJapi.f313v(nf213v1);
+            assert (nf213v0 + 1 == nf213v1);
+
+            out.println("\ncalling f314v(f214v()); f314v(f214v())");
+            final byte nf214v0 = MyJapi.f214v();
+            MyJapi.f314v(nf214v0);
+            final byte nf214v1 = MyJapi.f214v();
+            MyJapi.f314v(nf214v1);
+            assert (nf214v0 + 1 == nf214v1);
+
+            out.println("\ncalling f315v(f215v()); f315v(f215v())");
+            final short nf215v0 = MyJapi.f215v();
+            MyJapi.f315v(nf215v0);
+            final short nf215v1 = MyJapi.f215v();
+            MyJapi.f315v(nf215v1);
+            assert (nf215v0 + 1 == nf215v1);
+
+            out.println("\ncalling f316v(f216v()); f316v(f216v())");
+            final short nf216v0 = MyJapi.f216v();
+            MyJapi.f316v(nf216v0);
+            final short nf216v1 = MyJapi.f216v();
+            MyJapi.f316v(nf216v1);
+            assert (nf216v0 + 1 == nf216v1);
+
+            out.println("\ncalling f317v(f217v()); f317v(f217v())");
+            final int nf217v0 = MyJapi.f217v();
+            MyJapi.f317v(nf217v0);
+            final int nf217v1 = MyJapi.f217v();
+            MyJapi.f317v(nf217v1);
+            assert (nf217v0 + 1 == nf217v1);
+
+            out.println("\ncalling f318v(f218v()); f318v(f218v())");
+            final int nf218v0 = MyJapi.f218v();
+            MyJapi.f318v(nf218v0);
+            final int nf218v1 = MyJapi.f218v();
+            MyJapi.f318v(nf218v1);
+            assert (nf218v0 + 1 == nf218v1);
+
+            out.println("\ncalling f321v(f221v()); f321v(f221v())");
+            final long nf221v0 = MyJapi.f221v();
+            MyJapi.f321v(nf221v0);
+            final long nf221v1 = MyJapi.f221v();
+            MyJapi.f321v(nf221v1);
+            assert (nf221v0 + 1 == nf221v1);
+
+            out.println("\ncalling f322v(f222v()); f322v(f222v())");
+            final long nf222v0 = MyJapi.f222v();
+            MyJapi.f322v(nf222v0);
+            final long nf222v1 = MyJapi.f222v();
+            MyJapi.f322v(nf222v1);
+            assert (nf222v0 + 1 == nf222v1);
+
+            out.println("\ncalling f323v(f223v()); f323v(f223v())");
+            final float nf223v0 = MyJapi.f223v();
+            MyJapi.f323v(nf223v0);
+            final float nf223v1 = MyJapi.f223v();
+            MyJapi.f323v(nf223v1);
+            assert (nf223v0 + 1 == nf223v1);
+
+            out.println("\ncalling f324v(f224v()); f324v(f224v())");
+            final double nf224v0 = MyJapi.f224v();
+            MyJapi.f324v(nf224v0);
+            final double nf224v1 = MyJapi.f224v();
+            MyJapi.f324v(nf224v1);
+            assert (nf224v0 + 1 == nf224v1);
+        }
+        
+        for (int i = 0; i < 2; i++) {
+            out.println("\ncalling f331v(f231v()); f231v()");
+            final boolean nf231v0 = MyJapi.f231v();
+            final boolean[] nf331v = { nf231v0 };
+            MyJapi.f331v(nf331v);
+            assert (!nf231v0 == nf331v[0]);
+            final boolean nf231v1 = MyJapi.f231v();
+            assert (nf231v1 == nf331v[0]);
+
+            out.println("\ncalling f332v(f232v()); f232v()");
+            final byte nf232v0 = MyJapi.f232v();
+            final byte[] nf332v = { nf232v0 };
+            MyJapi.f332v(nf332v);
+            assert (nf232v0 + 1 == nf332v[0]);
+            final byte nf232v1 = MyJapi.f232v();
+            assert (nf232v1 == nf332v[0]);
+
+            out.println("\ncalling f333v(f233v()); f233v()");
+            final byte nf233v0 = MyJapi.f233v();
+            final byte[] nf333v = { nf233v0 };
+            MyJapi.f333v(nf333v);
+            assert (nf233v0 + 1 == nf333v[0]);
+            final byte nf233v1 = MyJapi.f233v();
+            assert (nf233v1 == nf333v[0]);
+
+            out.println("\ncalling f334v(f234v()); f234v()");
+            final byte nf234v0 = MyJapi.f234v();
+            final byte[] nf334v = { nf234v0 };
+            MyJapi.f334v(nf334v);
+            assert (nf234v0 + 1 == nf334v[0]);
+            final byte nf234v1 = MyJapi.f234v();
+            assert (nf234v1 == nf334v[0]);
+
+            out.println("\ncalling f335v(f235v()); f235v()");
+            final short nf235v0 = MyJapi.f235v();
+            final short[] nf335v = { nf235v0 };
+            MyJapi.f335v(nf335v);
+            assert (nf235v0 + 1 == nf335v[0]);
+            final short nf235v1 = MyJapi.f235v();
+            assert (nf235v1 == nf335v[0]);
+
+            out.println("\ncalling f336v(f236v()); f236v()");
+            final short nf236v0 = MyJapi.f236v();
+            final short[] nf336v = { nf236v0 };
+            MyJapi.f336v(nf336v);
+            assert (nf236v0 + 1 == nf336v[0]);
+            final short nf236v1 = MyJapi.f236v();
+            assert (nf236v1 == nf336v[0]);
+
+            out.println("\ncalling f337v(f237v()); f237v()");
+            final int nf237v0 = MyJapi.f237v();
+            final int[] nf337v = { nf237v0 };
+            MyJapi.f337v(nf337v);
+            assert (nf237v0 + 1 == nf337v[0]);
+            final int nf237v1 = MyJapi.f237v();
+            assert (nf237v1 == nf337v[0]);
+
+            out.println("\ncalling f338v(f238v()); f238v()");
+            final int nf238v0 = MyJapi.f238v();
+            final int[] nf338v = { nf238v0 };
+            MyJapi.f338v(nf338v);
+            assert (nf238v0 + 1 == nf338v[0]);
+            final int nf238v1 = MyJapi.f238v();
+            assert (nf238v1 == nf338v[0]);
+
+            out.println("\ncalling f341v(f241v()); f241v()");
+            final long nf241v0 = MyJapi.f241v();
+            final long[] nf341v = { nf241v0 };
+            MyJapi.f341v(nf341v);
+            assert (nf241v0 + 1 == nf341v[0]);
+            final long nf241v1 = MyJapi.f241v();
+            assert (nf241v1 == nf341v[0]);
+
+            out.println("\ncalling f342v(f242v()); f242v()");
+            final long nf242v0 = MyJapi.f242v();
+            final long[] nf342v = { nf242v0 };
+            MyJapi.f342v(nf342v);
+            assert (nf242v0 + 1 == nf342v[0]);
+            final long nf242v1 = MyJapi.f242v();
+            assert (nf242v1 == nf342v[0]);
+
+            out.println("\ncalling f343v(f243v()); f243v()");
+            final float nf243v0 = MyJapi.f243v();
+            final float[] nf343v = { nf243v0 };
+            MyJapi.f343v(nf343v);
+            assert (nf243v0 + 1 == nf343v[0]);
+            final float nf243v1 = MyJapi.f243v();
+            assert (nf243v1 == nf343v[0]);
+
+            out.println("\ncalling f344v(f244v()); f244v()");
+            final double nf244v0 = MyJapi.f244v();
+            final double[] nf344v = { nf244v0 };
+            MyJapi.f344v(nf344v);
+            assert (nf244v0 + 1 == nf344v[0]);
+            final double nf244v1 = MyJapi.f244v();
+            assert (nf244v1 == nf344v[0]);
+        }
+        
+        out.println();
+        out.println("<-- MyJapiTest.test3()");
+    }
+
+    static public void test4() {
+        out.println("--> MyJapiTest.test4()");
+
+        out.println();
+        out.println("testing instance wrappers: ...");
+        int n = -1;
+    
+        out.println("\ncalling A.create()...");
+        A a = A.create();
+        out.println("... a = " + a);
+        assert (a != null);
+
+        out.println("\ncalling a.f0s()...");
+        n = a.f0s();
+        out.println("... a.f0s() = " + n);
+        assert (n == 10);
+
+        out.println("\ncalling A.f0n(a)...");
+        n = A.f0n(a);
+        out.println("... A.f0n(a) = " + n);
+        assert (n == 11);
+
+        out.println("\ncalling a.f0v()...");
+        n = a.f0v();
+        out.println("... a.f0v() = " + n);
+        assert (n == 12);
+
+        out.println("\ncalling B0...");
+        n = B0.f0s();    
+        out.println("... B0.f0s() = " + n);
+        assert (n == 20);
+
+        out.println("\ncalling a.getB0()...");
+        B0 b0b0 = a.getB0();
+        out.println("... b0b0 = " + b0b0);
+        assert (b0b0 != null);
+
+        out.println("\ncalling b0b0.f0s()...");
+        n = b0b0.f0s();    
+        out.println("... b0b0.f0s() = " + n);
+        assert (n == 20);
+
+        out.println("\ncalling B0.f0n(b0b0)...");
+        n = B0.f0n(b0b0);
+        out.println("... B0.f0n(b0b0) = " + n);
+        assert (n == 21);
+
+        out.println("\ncalling b0b0.f0v()...");
+        n = b0b0.f0v();
+        out.println("... b0b0.f0v() = " + n);
+        assert (n == 22);
+
+        out.println("\ncalling B1.f0s()...");
+        n = B1.f0s();    
+        out.println("... B1.f0s() = " + n);
+        assert (n == 30);
+
+        out.println("\ncalling a.getB1()...");
+        B0 b0b1 = a.getB1();
+        out.println("... b0b1 = " + b0b1);
+        assert (b0b1 != null);
+
+        out.println("\ncalling b0b1.f0s()...");
+        n = b0b1.f0s();    
+        out.println("... b0b1.f0s() = " + n);
+        assert (n == 20);
+
+        out.println("\ncalling B0.f0n(b0b1)...");
+        n = B0.f0n(b0b1);
+        out.println("... B0.f0n(b0b1) = " + n);
+        assert (n == 21);
+
+        out.println("\ncalling b0b1.f0v()...");
+        n = b0b1.f0v();
+        out.println("... b0b1.f0v() = " + n);
+        assert (n == 32);
+
+        out.println("\ncalling A.delete(A)...");
+        A.delete(a);
+        out.println("... a = " + a);
+        assert (a != null);
+
+        out.println("\ncalling A.return_ptr()...");
+        A pa = A.return_ptr();
+        assert (pa != null);
+        
+        out.println("\ncalling A.take_ptr()...");
+        A.take_ptr(pa);
+        
+        out.println("\ncalling A.return_null_ptr()...");
+        A p0 = A.return_null_ptr();
+        assert (p0 == null);
+        
+        out.println("\ncalling A.take_null_ptr()...");
+        A.take_null_ptr(p0);
+        
+        out.println("\ncalling A.return_ref()...");
+        A ra = A.return_ref();
+        assert (ra != null);
+        
+        out.println("\ncalling A.take_ref()...");
+        A.take_ref(ra);
+        
+        out.println("\ncalling A.return_null_ref()...");
+        try {
+            A.return_null_ref();
+            assert (false);
+        } catch (AssertionError e) {
+            out.println("... successfully caught: " + e);
+        }
+        
+        out.println("\ncalling A.take_null_ref()...");
+        try {
+            A.take_null_ref(null);
+            assert (false);
+        } catch (IllegalArgumentException e) {
+            out.println("... successfully caught: " + e);
+        }
+        
+        out.println("\ncalling A.print()...");

+        A.print(a);
+
+        out.println();
+        out.println("<-- MyJapiTest.test4()");
+    };
+
+    static public void test5() {
+        out.println("--> MyJapiTest.test5()");
+
+        out.println();
+        out.println("testing n-ary array functions: g(), h() ...");
+        int n = -1;
+
+        out.println("\ncalling A.create()...");
+        A a = A.create();
+        out.println("... a = " + a);
+        assert (a != null);
+
+        A.h0();
+
+        A.h1((byte)1);
+
+        A.h2((byte)1, (short)2);
+
+        A.h3((byte)1, (short)2, 3);
+
+        n = A.h0r();
+        assert (n == 0);
+    
+        n = A.h1r((byte)1);
+        assert (n == 1);
+    
+        n = A.h2r((byte)1, (short)2);
+        assert (n == 3);
+    
+        n = A.h3r((byte)1, (short)2, 3);
+        assert (n == 6);
+    
+        A.g0c(a);
+
+        A.g1c(a, (byte)1);
+
+        A.g2c(a, (byte)1, (short)2);
+
+        A.g3c(a, (byte)1, (short)2, 3);
+
+        A.g0(a);
+
+        A.g1(a, (byte)1);
+
+        A.g2(a, (byte)1, (short)2);
+
+        A.g3(a, (byte)1, (short)2, 3);
+
+        n = A.g0rc(a);
+        assert (n == 0);
+    
+        n = A.g1rc(a, (byte)1);
+        assert (n == 1);
+    
+        n = A.g2rc(a, (byte)1, (short)2);
+        assert (n == 3);
+    
+        n = A.g3rc(a, (byte)1, (short)2, 3);
+        assert (n == 6);
+    
+        n = A.g0r(a);
+        assert (n == 0);
+    
+        n = A.g1r(a, (byte)1);
+        assert (n == 1);
+    
+        n = A.g2r(a, (byte)1, (short)2);
+        assert (n == 3);
+    
+        n = A.g3r(a, (byte)1, (short)2, 3);
+        assert (n == 6);
+
+        out.println();
+        out.println("<-- MyJapiTest.test5()");
+    };
+    
+    static public void test6() {
+        out.println("--> MyJapiTest.test6()");
+
+        out.println();
+        out.println("testing MyJapi String functions: s1xx(s0xx()) ...");
+        out.println();
+
+        out.println("\ncalling s112(s012())");
+        MyJapi.s112(MyJapi.s012());
+
+        out.println();
+        out.println("<-- MyJapiTest.test6()");
+    };
+
+    static public void main(String[] args) 
+    {
+        out.println("--> MyJapiTest.main()");
+
+        out.println();
+        loadSystemLibrary("myjapi");
+
+        if (true) {
+            out.println();
+            test0();
+            out.println();
+            test1();
+            out.println();
+            test2();
+            out.println();
+            test3();
+            out.println();
+            test4();
+            out.println();
+            test5();
+            out.println();
+            test6();
+        } else {
+            out.println();
+            test4();
+        }
+
+        out.println();
+        out.println("<-- MyJapiTest.main()");
+    }
+}

=== added directory 'storage/ndb/ndbjtie/src/ndbjtie'
=== added file 'storage/ndb/ndbjtie/src/ndbjtie/Makefile'
--- a/storage/ndb/ndbjtie/src/ndbjtie/Makefile	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/Makefile	2009-06-20 21:40:43 +0000
@@ -0,0 +1,149 @@
+#------------------------------------------------------------------------------
+
+# read the generic settings
+include	../../Makefile.defaults
+include	../../env.properties
+
+#------------------------------------------------------------------------------
+
+  JAVA_SRC	= .
+
+# preprocessing defines:
+  DDEFINES 	= 
+
+  DELIVERABLES	= $(JAVA_SRC)/test/NdbJtieTest.class \
+		libndbjtie.a libndbjtie.$(DLL_SUFFIX)
+
+  GENERATED_H	= ndbjtie_Ndb_cluster_connection.h \
+		ndbjtie_Ndb.h \
+		ndbjtie_NdbError.h \
+		ndbjtie_NdbTransaction.h \
+		ndbjtie_NdbDictionary.h \
+		ndbjtie_NdbDictionary_Object.h \
+		ndbjtie_NdbDictionary_Table.h
+
+  CLEAN		= core *.o *.class $(JAVA_SRC)/*/*.class $(GENERATED_H)
+
+  CLOBBER	= $(DELIVERABLES) *.dSYM
+
+  DISTCLEAN	= *~ *% */*~
+
+  SRCS		= *.cpp
+
+# currently, not needed:
+#  OBJECTS	= $(SRC:.c=.o)
+#  OBJECTS	+= $(SRC:.cc=.o)
+#  OBJECTS	+= $(SRC:.cpp=.o)
+
+  INCLUDES	= -I. -I.. -I../jtie $(JAVA_INCLUDEOPTS) $(NDB_INCLUDEOPTS)
+
+  CLASSPATH	= ".:../jtie"
+
+# for library dependencies, LOADLIBES and LDLIBS have been used historically
+# this convention is used sometimes: use
+#   LDLIBS for project-wide libs (like -lc or -lm)
+#   LOADLIBES for libs for the individual case
+# check with non-gnu makes: use of LOADLIBES, LDLIBS
+  LDLIBS	= -L${NDB_LIBDIR} -lndbclient
+
+#------------------------------------------------------------------------------
+
+.PHONY:	all clean clobber depend dep
+
+all:	$(DELIVERABLES)
+
+dep depend:	$(GENERATED_H)
+
+ndbjtie_Ndb_cluster_connection.h:	$(JAVA_SRC)/ndbjtie/Ndb_cluster_connection.class
+	$(COMPILE.javah) ndbjtie.Ndb_cluster_connection
+
+ndbjtie_Ndb.h:	$(JAVA_SRC)/ndbjtie/Ndb.class
+	$(COMPILE.javah) ndbjtie.Ndb
+
+ndbjtie_NdbError.h:	$(JAVA_SRC)/ndbjtie/NdbError.class
+	$(COMPILE.javah) ndbjtie.NdbError
+
+ndbjtie_NdbDictionary.h ndbjtie_NdbDictionary_Object.h ndbjtie_NdbDictionary_Table.h:	\
+		$(JAVA_SRC)/ndbjtie/NdbDictionary.class
+	$(COMPILE.javah) ndbjtie.NdbDictionary
+
+ndbjtie_NdbTransaction.h:	$(JAVA_SRC)/ndbjtie/NdbTransaction.class
+	$(COMPILE.javah) ndbjtie.NdbTransaction
+
+$(JAVA_SRC)/test/NdbJtieTest.class:	$(JAVA_SRC)/test/NdbJtieTest.java \
+		$(JAVA_SRC)/ndbjtie/Ndb_cluster_connection.java \
+		$(JAVA_SRC)/ndbjtie/Ndb.java \
+		$(JAVA_SRC)/ndbjtie/NdbError.java
+	$(COMPILE.java) $<
+
+libndbjtie.a:	libndbjtie.a(ndbjtie_classes.o)
+
+#
+# Important for libs like $(LDLIBS) to come last!
+#
+
+libndbjtie.so:	ndbjtie_NdbJtie.o ../myapi/libmyapi.a
+	$(LINK.cpp) \
+	-fPIC -shared \
+	$(LDLIBS) \
+	-o libndbjtie.so \
+	ndbjtie_classes.o \
+	-Wl,-rpath -Wl,. libmyapi.so
+
+#  gcc -I/usr/local/java/include -I/usr/local/java/include/genunix -fPIC -c Happy.c HappyImp.c
+#  gcc -shared -Wl,-soname,libhappy.so.1 -o libhappy.so.1.0 Happy.o HappyImp.o
+
+libndbjtie.dylib:	libndbjtie.a ndbjtie_classes.o
+	$(LINK.cpp) \
+	-fPIC -shared -dynamiclib \
+	-o libndbjtie.dylib \
+	ndbjtie_classes.o \
+	libndbjtie.a \
+	$(LDLIBS)
+
+# not needed:
+#	${NDB_LIBDIR}/libndbclient.a
+
+# doesn't seem to have an effect
+#	-Wl,-rpath -Wl,".:../myapi" \
+#	../myapi/libmyapi.dylib \
+
+# undefined references to be resolved by LD_LIBRARY_PATH:
+#	libmyapi.so
+# or
+#	-L. \
+#	-lmyapi \
+# ldd libndbjtie.so
+#       libmyapi.so => not found
+
+# symbolical references with default library path:
+#
+#	-Wl,-rpath -Wl,/home/md/martins_little_helpers/src/myapi \
+# ldd libndbjtie.so
+#        libmyapi.so => /home/md/martins_little_helpers/src/myapi/libmyapi.so (0xb7f8d000)
+#
+#	-Wl,-rpath -Wl,. \
+# ldd libndbjtie.so
+#        libmyapi.so => ./libmyapi.so (0xb7edd000)
+
+# statically linked references:
+#	libmyapi.a
+# ldd libndbjtie.so
+#       ...
+
+.PHONY: run.test
+run.test:	$(JAVA_SRC)/test/NdbJtieTest.class
+	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea test.NdbJtieTest
+
+#	$(JAVA) $(JAVAFLAGS) -classpath $(CLASSPATH) -ea -Djava.library.path=".:../myapi" test.NdbJtieTest
+
+#------------------------------------------------------------------------------
+
+.depend:
+	touch $@
+
+# read local dependencies
+-include	.depend
+
+#------------------------------------------------------------------------------
+# DO NOT DELETE

=== added directory 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie'
=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * Ndb.java
+ */
+
+package ndbjtie;
+
+import ndbjtie.NdbDictionary.Table;
+
+public class Ndb extends jtie.Wrapper {
+
+    protected Ndb(long cdelegate) {
+        super(cdelegate);
+        System.out.println("<-> ndbjtie.Ndb(long)");
+    }
+
+    // constructor
+    static public native Ndb create(Ndb_cluster_connection ndb_cluster_connection, String aCatalogName, String aSchemaName);
+
+    // destructor
+    static public native void delete(Ndb obj);
+
+    public final native int init(int maxNoOfTransactions);
+    
+    public final native NdbError getNdbError();
+    
+    public final native NdbError getNdbError(int errorCode);
+
+    public final native NdbTransaction startTransaction(Table table , char keyData , int keyLen);
+
+    public final native NdbTransaction startTransaction(Table table , int partitionId);
+
+    public final native void closeTransaction(NdbTransaction tx);
+}

=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbDictionary.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbDictionary.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbDictionary.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * NdbDictionary.java
+ */
+
+package ndbjtie;
+
+public class NdbDictionary extends jtie.Wrapper {
+
+    protected NdbDictionary(long cdelegate) {
+        super(cdelegate);
+        System.out.println("<-> ndbjtie.NdbDictionary(long)");
+    }
+
+    static public class Object extends jtie.Wrapper {
+
+        protected Object(long cdelegate) {
+            super(cdelegate);
+            System.out.println("<-> ndbjtie.NdbDictionary.Object(long)");
+        }
+    }
+
+    static public class Table extends Object {
+
+        protected Table(long cdelegate) {
+            super(cdelegate);
+            System.out.println("<-> ndbjtie.NdbDictionary.Table(long)");
+        }
+    }
+}
\ No newline at end of file

=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbError.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbError.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbError.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * NdbError.java
+ */
+
+package ndbjtie;
+
+public class NdbError extends jtie.Wrapper {
+
+    // this c'tor may me protected, for access from JNI is still possible
+    protected NdbError(long cdelegate) {
+        super(cdelegate);
+        System.out.println("<-> ndbjtie.NdbError(long)");
+    }
+
+    // while instance methods are convenient to use,
+    //public native int code();
+    //public native String message();
+    // the accurate access model are static methods
+    // (field hiding v method overriding)
+    //static public native int code(NdbError obj);
+    //static public native String message(NdbError obj);
+    // however, we can safeguard against overloading using final:
+    public native final int code();
+    public native final String message();
+}

=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbTransaction.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbTransaction.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/NdbTransaction.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,30 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * NdbTransaction.java
+ */
+
+package ndbjtie;
+
+public class NdbTransaction extends jtie.Wrapper {
+
+    protected NdbTransaction(long cdelegate) {
+        super(cdelegate);
+        System.out.println("<-> ndbjtie.NdbTransaction(long)");
+    }
+}

=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb_cluster_connection.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb_cluster_connection.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie/Ndb_cluster_connection.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * Ndb_cluster_connection.java
+ */
+
+package ndbjtie;
+
+public class Ndb_cluster_connection extends jtie.Wrapper {
+
+    // this c'tor may me protected, for access from JNI is still possible
+    protected Ndb_cluster_connection(long cdelegate) {
+        super(cdelegate);
+        System.out.println("<-> ndbjtie.Ndb_cluster_connection(long)");
+    }
+
+    // constructor
+    static public native Ndb_cluster_connection create(String connectstring);
+
+    // destructor
+    static public native void delete(Ndb_cluster_connection obj);
+
+    public final native int connect(int no_retries, int retry_delay_in_seconds, int verbose);
+
+    public final native int wait_until_ready(int timeout_for_first_alive, int timeout_after_first_alive);
+}

=== added file 'storage/ndb/ndbjtie/src/ndbjtie/ndbjtie_classes.cpp'
--- a/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie_classes.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/ndbjtie_classes.cpp	2009-06-19 04:54:13 +0000
@@ -0,0 +1,399 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * ndbjtie_classes.cpp
+ */
+
+#include <stdint.h>
+#include <jni.h>
+#include "helpers.hpp"
+
+#include <cstdio>
+
+#include "jtie_ttrait.hpp"
+#include "jtie_tconv.hpp"
+#include "jtie_tconv_cvalue.hpp"
+#include "jtie_tconv_cvalue_ext.hpp"
+#include "jtie_tconv_carray.hpp"
+#include "jtie_tconv_refbybb.hpp"
+//#include "jtie_tconv_refbyval.hpp"
+#include "jtie_tconv_cobject.hpp"
+#include "jtie_tconv_cstring.hpp"
+#include "jtie_gcalls.hpp"
+
+#include "ndbjtie_Ndb_cluster_connection.h"
+#include "ndbjtie_Ndb.h"
+#include "ndbjtie_NdbError.h"
+#include "ndbjtie_NdbDictionary.h"
+#include "ndbjtie_NdbDictionary_Object.h"
+#include "ndbjtie_NdbDictionary_Table.h"
+#include "ndbjtie_NdbTransaction.h"
+#include <NdbApi.hpp>
+#include <NdbError.hpp>
+
+// ---------------------------------------------------------------------------
+// generatable, application-dependent code: NDB JTie function stubs
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// Type definitions and conversions for Ndb_cluster_connection
+// ---------------------------------------------------------------------------
+
+// internal type for Ndb_cluster_connection
+struct _c_s_m_n_Ndb_cluster_connection {
+    static const char * const java_internal_class_name;
+};
+const char * const _c_s_m_n_Ndb_cluster_connection::java_internal_class_name = "ndbjtie/Ndb_cluster_connection";
+typedef _c_s_m_n_Ndb_cluster_connection * c_s_m_n_Ndb_cluster_connection;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, c_s_m_n_Ndb_cluster_connection >(c_s_m_n_Ndb_cluster_connection s) {
+    TRACE("jobject cast(c_s_m_n_Ndb_cluster_connection)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline c_s_m_n_Ndb_cluster_connection
+cast< c_s_m_n_Ndb_cluster_connection, jobject >(jobject s) {
+    TRACE("c_s_m_n_Ndb_cluster_connection cast(jobject)");
+    return reinterpret_cast< c_s_m_n_Ndb_cluster_connection >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, Ndb_cluster_connection, jobject, Ndb_cluster_connection & > ttrait_Ndb_cluster_connection_target;
+typedef ttrait< jobject, Ndb_cluster_connection *, c_s_m_n_Ndb_cluster_connection, Ndb_cluster_connection * > ttrait_Ndb_cluster_connection_ptr_return;
+typedef ttrait< jobject, Ndb_cluster_connection &, c_s_m_n_Ndb_cluster_connection, Ndb_cluster_connection & > ttrait_Ndb_cluster_connection_ref_return;
+typedef ttrait< jobject, Ndb_cluster_connection * > ttrait_Ndb_cluster_connection_ptr_arg;
+typedef ttrait< jobject, Ndb_cluster_connection & > ttrait_Ndb_cluster_connection_ref_arg;
+
+// constructor wrapper (return a reference for automatic Java exceptions)
+Ndb_cluster_connection &
+Ndb_cluster_connection_create(const char * p0) {
+    TRACE("Ndb_cluster_connection & Ndb_cluster_connection_create(const char *)");
+    Ndb_cluster_connection * r = new Ndb_cluster_connection(p0);
+    printf("    r = %p\n", r);
+    return *r;
+};
+
+// destructor wrapper (take a reference for automatic Java exceptions)
+void
+Ndb_cluster_connection_delete(Ndb_cluster_connection & p0) {
+    TRACE("void Ndb_cluster_connection_delete(Ndb_cluster_connection &)");
+    printf("    p0 = %p\n", &p0);
+    delete &p0;
+};
+
+// ---------------------------------------------------------------------------
+// Type definitions and conversions for Ndb
+// ---------------------------------------------------------------------------
+
+// internal type for Ndb
+struct _c_s_m_n_Ndb {
+    static const char * const java_internal_class_name;
+};
+const char * const _c_s_m_n_Ndb::java_internal_class_name = "ndbjtie/Ndb";
+typedef _c_s_m_n_Ndb * c_s_m_n_Ndb;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, c_s_m_n_Ndb >(c_s_m_n_Ndb s) {
+    TRACE("jobject cast(c_s_m_n_Ndb)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline c_s_m_n_Ndb
+cast< c_s_m_n_Ndb, jobject >(jobject s) {
+    TRACE("c_s_m_n_Ndb cast(jobject)");
+    return reinterpret_cast< c_s_m_n_Ndb >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, Ndb, jobject, Ndb & > ttrait_Ndb_target;
+typedef ttrait< jobject, Ndb *, c_s_m_n_Ndb, Ndb * > ttrait_Ndb_ptr_return;
+typedef ttrait< jobject, Ndb &, c_s_m_n_Ndb, Ndb & > ttrait_Ndb_ref_return;
+typedef ttrait< jobject, Ndb * > ttrait_Ndb_ptr_arg;
+typedef ttrait< jobject, Ndb & > ttrait_Ndb_ref_arg;
+
+// constructor wrapper (return a reference for automatic Java exceptions)
+Ndb &
+Ndb_create(Ndb_cluster_connection * p0, const char * p1, const char * p2) {
+    TRACE("Ndb & Ndb_create(Ndb_cluster_connection *, const char *, const char *)");
+    Ndb * r = new Ndb(p0, p1, p2);
+    printf("    r = %p\n", r);
+    return *r;
+};
+
+// destructor wrapper (take a reference for automatic Java exceptions)
+void
+Ndb_delete(Ndb & p0) {
+    TRACE("void Ndb_delete(Ndb &)");
+    printf("    p0 = %p\n", &p0);
+    delete &p0;
+};
+
+// ---------------------------------------------------------------------------
+// Type definitions and conversions for NdbError
+// ---------------------------------------------------------------------------
+
+// internal type for NdbError
+struct _c_s_m_n_NdbError {
+    static const char * const java_internal_class_name;
+};
+const char * const _c_s_m_n_NdbError::java_internal_class_name = "ndbjtie/NdbError";
+typedef _c_s_m_n_NdbError * c_s_m_n_NdbError;
+
+// formal <-> actual result type cast
+template<>
+inline jobject
+cast< jobject, c_s_m_n_NdbError >(c_s_m_n_NdbError s) {
+    TRACE("jobject cast(c_s_m_n_NdbError)");
+    return reinterpret_cast< jobject >(s);
+}
+
+// formal <-> actual parameter type cast
+template<>
+inline c_s_m_n_NdbError
+cast< c_s_m_n_NdbError, jobject >(jobject s) {
+    TRACE("c_s_m_n_NdbError cast(jobject)");
+    return reinterpret_cast< c_s_m_n_NdbError >(s);
+}
+
+// type mapping aliases
+typedef ttrait< jobject, NdbError, jobject, NdbError & > ttrait_NdbError_target;
+typedef ttrait< jobject, NdbError *, c_s_m_n_NdbError, NdbError * > ttrait_NdbError_ptr_return;
+typedef ttrait< jobject, NdbError &, c_s_m_n_NdbError, NdbError & > ttrait_NdbError_ref_return;
+typedef ttrait< jobject, NdbError * > ttrait_NdbError_ptr_arg;
+typedef ttrait< jobject, NdbError & > ttrait_NdbError_ref_arg;
+
+// new:
+typedef ttrait< jobject, const NdbError &, c_s_m_n_NdbError, const NdbError & > ttrait_NdbError_cref_return;
+// leads to ambuguities between
+//#include "jtie_tconv_refbyval.hpp"
+//#include "jtie_tconv_cobject.hpp"
+//
+//../jtie/jtie_gcalls.hpp:487: error: ambiguous class template instantiation for 'struct Result<_c_s_m_n_NdbError*, const NdbError&>'
+//../jtie/jtie_tconv_refbyval.hpp:25: error: candidates are: struct Result<J, const C&>
+//../jtie/jtie_tconv_refbyval.hpp:38: error:                 struct Result<J, C&>
+//../jtie/jtie_tconv_cobject.hpp:157: error:                 struct Result<J*, C&>
+//../jtie/jtie_gcalls.hpp:487: error: incomplete type 'Result<_c_s_m_n_NdbError*, const NdbError&>' used in nested name specifier
+
+
+// ---------------------------------------------------------------------------
+// Library Load and Unload Handlers
+// ---------------------------------------------------------------------------
+
+// useful for Threads to obtain their local JNIEnv
+static JavaVM * cached_jvm;
+
+// cache classes in a weak global ref to allow for them to be unloaded
+//static jclass cls_jtie_Wrapper;
+static jweak cls_jtie_Wrapper;
+
+// cached method and field IDs
+// XXX need to be recomputed after reloading of class?
+static jmethodID mid_jtie_Wrapper_ctor;
+static jmethodID mid_jtie_Wrapper_detach;
+static jfieldID fid_jtie_Wrapper_cdelegate;
+
+// initialize the NDB interface and cache method and field ids;
+// called when the native library is loaded; returns the JNI version
+// needed by the native library.
+JNIEXPORT jint JNICALL
+JNI_OnLoad(JavaVM * jvm, void * reserved)
+{
+    TRACE("jint JNI_OnLoad(JavaVM *, void *)");
+    cout << "    loading the NDB JTie library..." << endl;
+
+    // cache the JavaVM pointer
+    cached_jvm = jvm;
+
+    // get the JNI environment
+    JNIEnv * env;
+    if (jvm->GetEnv((void**)&env, JNI_VERSION_1_2) != JNI_OK) {
+        return JNI_ERR; // unsupported version or thread not attached to VM
+    }
+
+    // find class
+    jclass cls = env->FindClass("jtie/Wrapper");
+    if (cls == NULL) {
+        return JNI_ERR; // class not found or resource problem, error pending
+    }
+
+    // store class in a weak global ref to allow for class to be unloaded
+    cls_jtie_Wrapper = env->NewWeakGlobalRef(cls);
+    if (cls_jtie_Wrapper == NULL) {
+        return JNI_ERR; // OutOfMemoryError pending
+    }
+    
+    // retrieve and cache the method and field IDs
+    mid_jtie_Wrapper_ctor = env->GetMethodID(cls, "<init>", "(J)V");
+    if (mid_jtie_Wrapper_ctor == NULL) {
+        return JNI_ERR; // method found or resource problem, error pending
+    }
+    mid_jtie_Wrapper_detach = env->GetMethodID(cls, "detach", "()V");
+    if (mid_jtie_Wrapper_detach == NULL) {
+        return JNI_ERR; // method found or resource problem, error pending
+    }
+    fid_jtie_Wrapper_cdelegate = env->GetFieldID(cls, "cdelegate", "J");
+    if (fid_jtie_Wrapper_cdelegate == NULL) {
+        return JNI_ERR; // method found or resource problem, error pending
+    }
+
+    // XXX better call ndb_init() from main()?
+    cout << "    initializing NDBAPI..." << endl;
+    int stat = ndb_init();
+    if (stat != 0) {
+        //ABORT_ERROR("ndb_init() returned: " << stat);
+        cout << endl << "!!! error in " << __FILE__ << ", line: " << __LINE__
+             << ", msg: ndb_init() returned: " << stat;
+        return JNI_ERR;
+    }
+    cout << "    [ok]" << endl;
+
+    cout << "    [loaded]" << endl;
+
+    // as a precaution, we assume using JNI functions introduced in JDK 1.4
+    //return JNI_VERSION_1_2;
+    return JNI_VERSION_1_4;
+}
+
+// called when the class loader containing the native library is garbage
+// collected; called in an unknown context (such as from a finalizer):
+// be conservative, and refrain from arbitrary Java call-backs.
+JNIEXPORT void JNICALL
+JNI_OnUnload(JavaVM * jvm, void * reserved)
+{
+    TRACE("void JNI_OnUnload(JavaVM *, void *)");
+    cout << "    unloading the NDB JTie library..." << endl;
+
+    // XXX better call ndb_end() from main()?
+    cout << "    closing NDBAPI ...   " << endl;
+    ndb_end(0);
+    cout << "    [ok]" << endl;
+
+    // get the JNI environment
+    JNIEnv * env;
+    if (jvm->GetEnv((void**)&env, JNI_VERSION_1_2) != JNI_OK) {
+        return; // unsupported version or thread not attached to VM
+    }
+
+    // delete cached resources
+    fid_jtie_Wrapper_cdelegate = NULL;
+    mid_jtie_Wrapper_detach = NULL;
+    mid_jtie_Wrapper_ctor = NULL;
+    env->NewWeakGlobalRef(cls_jtie_Wrapper);
+    cached_jvm = NULL; // probably, not needed
+
+    cout << "    [unloaded]" << endl;
+}
+
+
+// ---------------------------------------------------------------------------
+// Function Stubs for Ndb_cluster_connection
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_1cluster_1connection_create(JNIEnv * env, jclass cls, jstring p0)
+{
+    TRACE("jobject Java_ndbjtie_Ndb_1cluster_1connection_create(JNIEnv *, jclass, jstring)");
+    return gcreate< ttrait_Ndb_cluster_connection_ref_return, ttrait_cstring, Ndb_cluster_connection_create >(env, p0);
+}
+
+JNIEXPORT void JNICALL
+Java_ndbjtie_Ndb_1cluster_1connection_delete(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_ndbjtie_Ndb_1cluster_1connection_delete(JNIEnv *, jclass, jobject)");
+    gdelete< ttrait_Ndb_cluster_connection_ref_arg, Ndb_cluster_connection_delete >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_ndbjtie_Ndb_1cluster_1connection_connect(JNIEnv * env, jobject obj, jint p0, jint p1, jint p2)
+{
+    TRACE("jint Java_ndbjtie_Ndb_1cluster_1connection_connect(JNIEnv *, jobject, jint, jint, jint)");
+    return gcall<  ttrait_Ndb_cluster_connection_target, ttrait_int, ttrait_int, ttrait_int, ttrait_int, &Ndb_cluster_connection::connect >(env, obj, p0, p1, p2);
+}
+
+JNIEXPORT jint JNICALL
+Java_ndbjtie_Ndb_1cluster_1connection_wait_1until_1ready(JNIEnv * env, jobject obj, jint p0, jint p1)
+{
+    TRACE("jint Java_ndbjtie_Ndb_1cluster_1connection_wait_1until_1ready(JNIEnv *, jobject, jint, jint)");
+    return gcall< ttrait_Ndb_cluster_connection_target, ttrait_int, ttrait_int, ttrait_int, &Ndb_cluster_connection::wait_until_ready >(env, obj, p0, p1);
+}
+
+// ---------------------------------------------------------------------------
+// Function Stubs for Ndb
+// ---------------------------------------------------------------------------
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_create(JNIEnv * env, jclass cls, jobject p0, jstring p1, jstring p2)
+{
+    TRACE("jobject Java_ndbjtie_Ndb_create(JNIEnv *, jclass, jstring)");
+    return gcreate< ttrait_Ndb_ref_return, ttrait_Ndb_cluster_connection_ptr_arg, ttrait_cstring, ttrait_cstring, Ndb_create >(env, p0, p1, p2);
+}
+
+JNIEXPORT void JNICALL
+Java_ndbjtie_Ndb_delete(JNIEnv * env, jclass cls, jobject p0)
+{
+    TRACE("void Java_ndbjtie_Ndb_delete(JNIEnv *, jclass, jobject)");
+    gdelete< ttrait_Ndb_ref_arg, Ndb_delete >(env, p0);
+}
+
+JNIEXPORT jint JNICALL
+Java_ndbjtie_Ndb_init(JNIEnv * env, jclass cls, jobject obj, jint p0)
+{
+    TRACE("jint Java_ndbjtie_Ndb_init(JNIEnv *, jclass, jobject, jint)");
+    return gcall< ttrait_Ndb_target, ttrait_int, ttrait_int, &Ndb::init >(env, obj, p0);
+}
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_getNdbError__Lndbjtie_Ndb_2(JNIEnv * env, jclass cls, jobject obj)
+{
+    TRACE("jobject Java_ndbjtie_Ndb_getNdbError__Lndbjtie_Ndb_2(JNIEnv *, jclass, jobject)");
+    return gcall< ttrait_Ndb_target, ttrait_NdbError_cref_return, &Ndb::getNdbError >(env, obj);
+}
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_getNdbError__Lndbjtie_Ndb_2I(JNIEnv * env, jclass cls, jobject obj, jint p0)
+{
+    TRACE("jobject Java_ndbjtie_Ndb_getNdbError__Lndbjtie_Ndb_2I(JNIEnv *, jclass, jobject, jint)");
+    return gcall< ttrait_Ndb_target, ttrait_NdbError_cref_return, ttrait_int, &Ndb::getNdbError >(env, obj, p0);
+}
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_startTransaction__Lndbjtie_NdbDictionary_Table_2CI
+  (JNIEnv *, jobject, jobject, jchar, jint);
+
+JNIEXPORT jobject JNICALL
+Java_ndbjtie_Ndb_startTransaction__Lndbjtie_NdbDictionary_Table_2I
+  (JNIEnv *, jobject, jobject, jint);
+
+JNIEXPORT void JNICALL
+Java_ndbjtie_Ndb_closeTransaction
+  (JNIEnv *, jobject, jobject);
+
+// ---------------------------------------------------------------------------
+// Function Stubs for NdbDictionary
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------

=== added directory 'storage/ndb/ndbjtie/src/ndbjtie/test'
=== added file 'storage/ndb/ndbjtie/src/ndbjtie/test/NdbJtieTest.java'
--- a/storage/ndb/ndbjtie/src/ndbjtie/test/NdbJtieTest.java	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/ndbjtie/src/ndbjtie/test/NdbJtieTest.java	2009-06-19 04:54:13 +0000
@@ -0,0 +1,185 @@
+/*
+ Copyright (C) 2009 Sun Microsystems, Inc.
+ All rights reserved. Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+/*
+ * NdbJtieTest.java
+ */
+
+package test;
+
+import java.io.PrintWriter;
+
+//import java.math.BigInteger;
+//import java.math.BigDecimal;
+//import java.nio.ByteBuffer;
+//import java.nio.ByteOrder;
+//import java.nio.CharBuffer;
+//import java.nio.ShortBuffer;
+//import java.nio.IntBuffer;
+//import java.nio.LongBuffer;
+//import java.nio.FloatBuffer;
+//import java.nio.DoubleBuffer;
+
+import ndbjtie.Ndb_cluster_connection;
+import ndbjtie.Ndb;
+import ndbjtie.NdbError;
+
+public class NdbJtieTest {
+
+    static protected final PrintWriter out = new PrintWriter(System.out, true);
+
+    static protected final PrintWriter err = new PrintWriter(System.err, true);
+
+    private String mgmdConnect = "localhost";
+    private String catalog = "crunddb";
+    private String schema = "def";
+
+    private Ndb_cluster_connection mgmd;
+    private Ndb ndb;
+
+    /**
+     * Loads a dynamically linked system library and reports any failures.
+     */
+    static protected void loadSystemLibrary(String name) {
+        out.println("loading libary...");
+        try {
+            System.loadLibrary(name);
+        } catch (UnsatisfiedLinkError e) {
+            String path;
+            try {
+                path = System.getProperty("java.library.path");
+            } catch (Exception ex) {
+                path = "<exception caught: " + ex.getMessage() + ">";
+            }
+            err.println("failed loading library '"
+                        + name + "'; java.library.path='" + path + "'");
+            throw e;
+        } catch (SecurityException e) {
+            err.println("failed loading library '"
+                        + name + "'; caught exception: " + e);
+            throw e;
+        }
+        out.println("... [" + name + "]");
+    }
+
+    protected void init() {
+        // load native library (better diagnostics doing it explicitely)
+        loadSystemLibrary("ndbjtie");
+
+        // instantiate NDB cluster singleton
+        out.println();
+        out.println("creating cluster conn...");
+
+        mgmd = Ndb_cluster_connection.create(mgmdConnect);
+        //assert mgmd != null;
+        out.println("... [ok, mgmd=" + mgmd + "]");
+
+        // connect to cluster management node (ndb_mgmd)
+        out.println();
+        out.println("connecting to mgmd ...");
+        final int retries = 0;        // retries (< 0 = indefinitely)
+        final int delay = 0;          // seconds to wait after retry
+        final int verbose = 1;        // print report of progess
+        // 0 = success, 1 = recoverable error, -1 = non-recoverable error
+        //if (Ndb_cluster_connection.connect(mgmd, retries, delay, verbose) != 0) {
+        if (mgmd.connect(retries, delay, verbose) != 0) {
+            final String msg = ("mgmd@" + mgmdConnect
+                                + " was not ready within "
+                                + (retries * delay) + "s.");
+            out.println(msg);
+            throw new RuntimeException(msg);
+        }
+        out.println("... [ok: " + mgmdConnect + "]");
+    }
+
+    protected void close() {
+        out.println();
+        out.println("closing mgmd conn ...");
+        if (mgmd != null)
+            Ndb_cluster_connection.delete(mgmd);
+        out.println("... [ok, mgmd=" + mgmd + "]");
+        mgmd = null;
+
+/*
+    cout << "closing NDBAPI ...   " << flush;
+    // ndb_close must be called last
+    ndb_end(0);
+    cout << "       [ok]" << endl;
+*/
+    }
+
+    void
+    initConnection(String catalog, String schema) {
+        // optionally, connect and wait for reaching the data nodes (ndbds)
+        out.println();
+        out.println("waiting until ready...");
+        final int initial_wait = 10; // seconds to wait until first node detected
+        final int final_wait = 0;    // seconds to wait after first node detected
+        // returns: 0 all nodes live, > 0 at least one node live, < 0 error
+        if (mgmd.wait_until_ready(initial_wait, final_wait) < 0) {
+            final String msg = ("data nodes were not ready within "
+                                + (initial_wait + final_wait) + "s.");
+            out.println(msg);
+            throw new RuntimeException(msg);
+        }
+        out.println("... [ok]");
+
+        // connect to database
+        out.println();
+        out.println("connecting to database...");
+        ndb = Ndb.create(mgmd, catalog, schema);
+        final int max_no_tx = 10; // maximum number of parallel tx (<=1024)
+        // note each scan or index scan operation uses one extra transaction
+        if (ndb.init(max_no_tx) != 0) {
+            String msg = "Error caught: " + ndb.getNdbError().message();
+            throw new RuntimeException(msg);
+        }
+        out.println("... [ok]");
+    }
+
+    void
+    closeConnection() {
+        out.println();
+        out.println("closing database conn ...");
+        Ndb.delete(ndb);
+        ndb = null;
+        out.println("... [ok]");
+    }
+
+    public void test() {
+        out.println("--> NdbJtieTest.test()");
+
+        init();
+        initConnection(catalog, schema);
+        closeConnection();
+        close();
+
+        out.println();
+        out.println("<-- NdbJtieTest.test()");
+    };
+    
+    static public void main(String[] args) throws Exception {
+        out.println("--> NdbJtieTest.main()");
+
+        out.println();
+        NdbJtieTest test = new NdbJtieTest();
+        test.test();
+        
+        out.println();
+        out.println("<-- NdbJtieTest.main()");
+    }
+}

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2009-06-22 09:07:41 +0000
@@ -148,15 +148,9 @@ Ndb::NDB_connect(Uint32 tNode) 
 //***************************************************************************
   
   int	         tReturnCode;
-  TransporterFacade *tp = theImpl->m_transporter_facade;
 
   DBUG_ENTER("Ndb::NDB_connect");
 
-  bool nodeAvail = tp->get_node_alive(tNode);
-  if(nodeAvail == false){
-    DBUG_RETURN(0);
-  }
-  
   NdbTransaction * tConArray = theConnectionArray[tNode];
   if (tConArray != NULL) {
     DBUG_RETURN(2);
@@ -211,6 +205,18 @@ Ndb::NDB_connect(Uint32 tNode) 
       // no need to retry with other node
       DBUG_RETURN(-1);
     }
+
+    /**
+     * If node was dead, report 0...
+     *
+     * Btw, the sendRecSignal-method should taken out and shot
+     */
+    switch(tReturnCode){
+    case -2:
+    case -3:
+      DBUG_RETURN(0);
+    }
+
     DBUG_RETURN(3);
   }//if
 }//Ndb::NDB_connect()

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2009-06-22 09:07:41 +0000
@@ -3462,11 +3462,11 @@ send_report:
   data[1]= m_total_alloc-m_free_data_sz;
   data[2]= m_total_alloc;
   data[3]= 0;
-  data[4]= (Uint32)(apply_gci & ~(Uint32)0);
+  data[4]= (Uint32)(apply_gci);
   data[5]= (Uint32)(apply_gci >> 32);
-  data[6]= (Uint32)(latest_gci & ~(Uint32)0);
+  data[6]= (Uint32)(latest_gci);
   data[7]= (Uint32)(latest_gci >> 32);
-  Ndb_internal::send_event_report(m_ndb, data,8);
+  Ndb_internal::send_event_report(true, m_ndb, data,8);
 #ifdef VM_TRACE
   assert(m_total_alloc >= m_free_data_sz);
 #endif

=== modified file 'storage/ndb/src/ndbapi/NdbImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbImpl.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbImpl.hpp	2009-06-22 08:23:35 +0000
@@ -58,7 +58,7 @@ public:
   NdbImpl(Ndb_cluster_connection *, Ndb&);
   ~NdbImpl();
 
-  int send_event_report(Uint32 *data, Uint32 length);
+  int send_event_report(bool has_lock, Uint32 *data, Uint32 length);
 
   Ndb &m_ndb;
   Ndb * m_next_ndb_object, * m_prev_ndb_object;

=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp	2009-06-22 09:07:41 +0000
@@ -1466,7 +1466,8 @@ NdbTransaction::sendTC_COMMIT_ACK(Transp
 }
 
 int
-NdbImpl::send_event_report(Uint32 *data, Uint32 length)
+NdbImpl::send_event_report(bool has_lock,
+                           Uint32 *data, Uint32 length)
 {
   NdbApiSignal aSignal(m_ndb.theMyRef);
   TransporterFacade *tp = m_transporter_facade;
@@ -1476,15 +1477,29 @@ NdbImpl::send_event_report(Uint32 *data,
   aSignal.theLength               = length;
   memcpy((char *)aSignal.getDataPtrSend(), (char *)data, length*4);
 
+
+  int ret = 0;
+  if (!has_lock)
+  {
+    tp->lock_mutex();
+  }
   Uint32 tNode;
   Ndb_cluster_connection_node_iter node_iter;
   m_ndb_cluster_connection.init_get_next_node(node_iter);
   while ((tNode= m_ndb_cluster_connection.get_next_node(node_iter)))
   {
-    if(tp->get_node_alive(tNode)){
+    if(tp->get_node_alive(tNode))
+    {
       tp->sendSignal(&aSignal, tNode);
-      return 0;
+      goto done;
     }
   }
-  return 1;
+  
+  ret = 1;
+done:
+  if (!has_lock)
+  {
+    tp->unlock_mutex();
+  }
+  return ret;
 }

=== modified file 'storage/ndb/src/ndbapi/ndb_internal.hpp'
--- a/storage/ndb/src/ndbapi/ndb_internal.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/ndbapi/ndb_internal.hpp	2009-06-22 08:23:35 +0000
@@ -25,6 +25,6 @@ private:
   friend class BackupRestore;
   Ndb_internal() {}
   virtual ~Ndb_internal() {}
-  static int send_event_report(Ndb *ndb, Uint32 *data, Uint32 length)
-    { return ndb->theImpl->send_event_report(data, length); }
+  static int send_event_report(bool has_lock, Ndb *ndb, Uint32 *data, Uint32 length)
+    { return ndb->theImpl->send_event_report(has_lock, data, length); }
 };

=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp	2009-06-15 07:27:14 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp	2009-06-22 09:07:41 +0000
@@ -811,7 +811,7 @@ BackupRestore::report_started(unsigned b
     data[0]= NDB_LE_RestoreStarted;
     data[1]= backup_id;
     data[2]= node_id;
-    Ndb_internal::send_event_report(m_ndb, data, 3);
+    Ndb_internal::send_event_report(false /* has lock */, m_ndb, data, 3);
   }
   return true;
 }
@@ -830,7 +830,7 @@ BackupRestore::report_meta_data(unsigned
     data[5]= m_n_logfilegroup;
     data[6]= m_n_datafile;
     data[7]= m_n_undofile;
-    Ndb_internal::send_event_report(m_ndb, data, 8);
+    Ndb_internal::send_event_report(false /* has lock */, m_ndb, data, 8);
   }
   return true;
 }
@@ -847,7 +847,7 @@ BackupRestore::report_data(unsigned back
     data[4]= 0;
     data[5]= (Uint32)(m_dataBytes & 0xFFFFFFFF);
     data[6]= (Uint32)((m_dataBytes >> 32) & 0xFFFFFFFF);
-    Ndb_internal::send_event_report(m_ndb, data, 7);
+    Ndb_internal::send_event_report(false /* has lock */, m_ndb, data, 7);
   }
   return true;
 }
@@ -865,7 +865,7 @@ BackupRestore::report_log(unsigned backu
     data[4]= 0;
     data[5]= (Uint32)(m_logBytes & 0xFFFFFFFF);
     data[6]= (Uint32)((m_logBytes >> 32) & 0xFFFFFFFF);
-    Ndb_internal::send_event_report(m_ndb, data, 7);
+    Ndb_internal::send_event_report(false /* has lock */, m_ndb, data, 7);
   }
   return true;
 }
@@ -879,7 +879,7 @@ BackupRestore::report_completed(unsigned
     data[0]= NDB_LE_RestoreCompleted;
     data[1]= backup_id;
     data[2]= node_id;
-    Ndb_internal::send_event_report(m_ndb, data, 3);
+    Ndb_internal::send_event_report(false /* has lock */, m_ndb, data, 3);
   }
   return true;
 }

Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090622090741-pwen4ub432by62mr.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:2940)Jonas Oreland22 Jun