[jboss-user] [JBoss Microcontainer Development] New message: "Re: Native library mapping at jboss-cl level"
Adrian Brock
do-not-reply at jboss.com
Thu Jan 21 08:43:42 EST 2010
User development,
A new message was posted in the thread "Native library mapping at jboss-cl level":
http://community.jboss.org/message/521411#521411
Author : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org
Message:
--------------------------------------------------------------
> mailto:thomas.diesler at jboss.com wrote:
>
>
> > 1) It should be generating a unique name for the library so that it
> > can be hotdeployed (if the OS supports reloading native libraries).
> Areyou saying that the CLP should use a unique name as a key to some other service which then extracts the library on demand or provides that actual location in some other way? I believe the libname in http://java.sun.com/javase/6/docs/api/java/lang/System.html#loadLibrary(java.lang.String) is such a key. The way this is currently modelled is that the CLP can be given NativeLibraryProvider interface, which get provide the lib location lazily.
> > 3)
> > You shouldn't use the BundleStoragePlugin. e.g. if this is running
> > inside JBossAS, the libraries should be extracted to server/xxx/temp not server/xxx/data
> Why is this distinction relevant? The bundle storage are can be used for all kinds of persistent data that relate to the bundle.
It is the URL of the library I'm talking about, the one returned from loadLibrary().
It should be unique to that particular instance of the bundle deployment, it shouldn't be persistant.
e.g. take an OS that supports hot deployment of native code, but locks the file of the library when it is loaded,
(i.e. the file system doesn't support file descriptors that have been deleted but are still open to some application)
The user then redeploys the bundle (possibly after changing the native code).
According to the OSGi rules, the uninstalled bundle should continue to use the previous version of the native code (until refreshPackages
gets used) while the new instance of the bundle sees the new native code.
You can't do that unless you generate a unique URL for each deployment of the bundle.
i.e. it is not persistent data, it should go in the tmp directory.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521411#521411
More information about the jboss-user
mailing list