public class JniLifecycleListener extends Object implements LifecycleListener
Native libraries are associated with the class loader of the class that loaded them, and the same library may not be loaded by more than one class loader. Due to that restriction, loading a native library from a Webapp's class loader makes it impossible for other Webapps to load the native library.
Loading the native library using this listener solves the issue as it is loaded by a shared class loader (typically the Common class loader, but may vary in some configurations).
Constructor and Description |
---|
JniLifecycleListener() |
Modifier and Type | Method and Description |
---|---|
String |
getLibraryName() |
String |
getLibraryPath() |
void |
lifecycleEvent(LifecycleEvent event)
Acknowledge the occurrence of the specified event.
|
void |
setLibraryName(String libraryName) |
void |
setLibraryPath(String libraryPath) |
public void lifecycleEvent(LifecycleEvent event)
LifecycleListener
lifecycleEvent
in interface LifecycleListener
event
- LifecycleEvent that has occurredpublic void setLibraryName(String libraryName)
public String getLibraryName()
public void setLibraryPath(String libraryPath)
public String getLibraryPath()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.