[jboss-cvs] JBoss Messaging SVN: r4148 - in trunk: native/bin and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 6 11:39:43 EDT 2008
Author: clebert.suconic at jboss.com
Date: 2008-05-06 11:39:42 -0400 (Tue, 06 May 2008)
New Revision: 4148
Modified:
trunk/build-messaging.xml
trunk/native/bin/libJBMLibAIO64.so
trunk/native/src/LibAIOController.cpp
trunk/native/src/org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl.h
trunk/src/main/org/jboss/messaging/core/asyncio/impl/AsynchronousFileImpl.java
Log:
JBMESSAGING-1283 - Adding test to validate the load of the library
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2008-05-06 12:46:02 UTC (rev 4147)
+++ trunk/build-messaging.xml 2008-05-06 15:39:42 UTC (rev 4148)
@@ -194,6 +194,7 @@
<path id="compilation.classpath">
<path refid="external.dependencies.classpath"/>
<path refid="jboss.dependencies.classpath"/>
+ <path location="${build.classes.dir}"/>
</path>
<path id="javadoc.classpath">
@@ -323,6 +324,9 @@
<include name="**/*.java"/>
<classpath refid="compilation.classpath"/>
</javac>
+ <javah class="org.jboss.messaging.core.asyncio.impl.AsynchronousFileImpl"
+ classpathref="compilation.classpath" destdir="./native/src"/>
+
<echo message="messaging.version.versionName=${messaging.version.name}${line.separator}messaging.version.majorVersion=${messaging.version.major}${line.separator}messaging.version.minorVersion=${messaging.version.minor}${line.separator}messaging.version.microVersion=${messaging.version.micro}${line.separator}messaging.version.incrementingVersion=${messaging.version.incrementing}${line.separator}messaging.version.versionSuffix=${messaging.version.suffix}${line.separator}"
file="${build.classes.dir}/version.properties"/>
Modified: trunk/native/bin/libJBMLibAIO64.so
===================================================================
(Binary files differ)
Modified: trunk/native/src/LibAIOController.cpp
===================================================================
--- trunk/native/src/LibAIOController.cpp 2008-05-06 12:46:02 UTC (rev 4147)
+++ trunk/native/src/LibAIOController.cpp 2008-05-06 15:39:42 UTC (rev 4148)
@@ -223,3 +223,10 @@
throwException(env, "java/lang/RuntimeException", e.what());
}
}
+
+/** It does nothing... just return true to make sure it has all the binary dependencies */
+JNIEXPORT jboolean JNICALL Java_org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl_isNativeLoaded
+ (JNIEnv *, jclass)
+{
+ return 1;
+}
Modified: trunk/native/src/org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl.h
===================================================================
--- trunk/native/src/org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl.h 2008-05-06 12:46:02 UTC (rev 4147)
+++ trunk/native/src/org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl.h 2008-05-06 15:39:42 UTC (rev 4148)
@@ -59,6 +59,14 @@
/*
* Class: org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl
+ * Method: isNativeLoaded
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl_isNativeLoaded
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_jboss_messaging_core_asyncio_impl_AsynchronousFileImpl
* Method: internalPollEvents
* Signature: (J)V
*/
Modified: trunk/src/main/org/jboss/messaging/core/asyncio/impl/AsynchronousFileImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/asyncio/impl/AsynchronousFileImpl.java 2008-05-06 12:46:02 UTC (rev 4147)
+++ trunk/src/main/org/jboss/messaging/core/asyncio/impl/AsynchronousFileImpl.java 2008-05-06 15:39:42 UTC (rev 4148)
@@ -50,7 +50,7 @@
{
log.trace(name + " being loaded");
System.loadLibrary(name);
- return true;
+ return isNativeLoaded();
}
catch (Throwable e)
{
@@ -72,6 +72,10 @@
loaded = true;
break;
}
+ else
+ {
+ log.debug("Library " + library + " not found!");
+ }
}
if (!loaded)
@@ -272,6 +276,9 @@
private static native void stopPoller(long handler);
+ /** A native method that does nothing, and just validate if the ELF dependencies are loaded and on the correct platform as this binary format */
+ private static native boolean isNativeLoaded();
+
/** Poll asynchrounous events from internal queues */
private static native void internalPollEvents(long handler);
More information about the jboss-cvs-commits
mailing list