You need to use a custom class loader to load the native object, which in turn loads the library in a static block. Then in a PreDestroy in an ejb you have to destroy the classloader and set all class refs to null and call a system.gc
[Message sent by forum member 'lineman78']
http://forums.java.net/jive/thread.jspa?messageID=399675