[jboss-user] [JBoss Microcontainer Development] New message: "Re: Native library mapping at jboss-cl level"
Adrian Brock
do-not-reply at jboss.com
Mon Jan 18 12:14:58 EST 2010
User development,
A new message was posted in the thread "Native library mapping at jboss-cl level":
http://community.jboss.org/message/520620#520620
Author : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org
Message:
--------------------------------------------------------------
While I agree with adding something like the Bundle-NativeCode header to the ClassLoadingMetaData (CLMD),
that isn't what the ClassLoader should use at runtime.
The actual libraries will be unpacked into a temporary location which is a runtime detail so it needs to be a seperate piece of metadata
that is passed to the ClassLoaderPolicy at construction.
Its not declarativily declared by the person deploying the bundle.
I also disagree with what you've done in the OSGiBundleNativeCodeDeployer.
1) It should be generating a unique name for the library so that it can be hotdeployed (if the OS supports reloading native libraries).
2) It should be deleting the library when its no longer deployed (if it can, e.g. it won't be able to on Windows since the file will
likely be locked until the classloader is garbage collected - but could use createTempFile() so it gets deleted at shutdown).
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
It would also be nice if the unpacking happened lazily. i.e. the metadata object that gets passed to the classloader policy unpacks it
when it is first used rather than doing it up front in the deployer.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520620#520620
More information about the jboss-user
mailing list