28 #include "helpers.hpp"
39 JTIE_INSTANTIATE_CLASS_MEMBER_INFO(_ByteBuffer_isReadOnly,
40 "java/nio/ByteBuffer",
44 JTIE_INSTANTIATE_CLASS_MEMBER_INFO(_ByteBuffer_asReadOnlyBuffer,
45 "java/nio/ByteBuffer",
47 "()Ljava/nio/ByteBuffer;")
49 JTIE_INSTANTIATE_CLASS_MEMBER_INFO(_ByteBuffer_remaining,
50 "java/nio/ByteBuffer",
54 JTIE_INSTANTIATE_CLASS_MEMBER_INFO(_ByteBuffer_position,
55 "java/nio/ByteBuffer",
59 JTIE_INSTANTIATE_CLASS_MEMBER_INFO(_Wrapper_cdelegate,
60 "com/mysql/jtie/Wrapper",
69 static JavaVM * jtie_cached_jvm;
85 JTie_OnLoad(JavaVM * jvm,
void * reserved)
87 TRACE(
"jint JTie_OnLoad(JavaVM *, void *)");
89 VERBOSE(
"initializing the JTie resources ...");
95 jtie_cached_jvm = jvm;
99 if (jvm->GetEnv((
void**)&env, JNI_VERSION_1_2) != JNI_OK) {
104 VERBOSE(
"... initialized the JTie resources");
105 return JNI_VERSION_1_4;
120 JTie_OnUnload(JavaVM * jvm,
void * reserved)
122 TRACE(
"void JTie_OnUnload(JavaVM *, void *)");
124 VERBOSE(
"releasing the JTie resources ...");
128 if (jvm->GetEnv((
void**)&env, JNI_VERSION_1_2) != JNI_OK) {
132 jtie_cached_jvm = NULL;
133 VERBOSE(
"... released the JTie resources");
140 #if 0 // XXX not implemented, see comments in Wrapper.java
151 #include "jtie_Wrapper.h"
156 JNIEXPORT
void JNICALL
157 Java_com_mysql_jtie_Wrapper_initIds(JNIEnv *, jclass);
162 JNIEXPORT
void JNICALL
163 Java_com_mysql_jtie_Wrapper_initIds(JNIEnv * env, jclass cls)
165 TRACE(
"void Java_com_mysql_jtie_Wrapper_initIds(JNIEnv *, jclass)");
167 jtie_cls_com_mysql_jtie_Wrapper = env->NewWeakGlobalRef(cls);
168 if (jtie_cls_com_mysql_jtie_Wrapper == NULL) {
179 #endif // jtie_lib_hpp