I am trying to understand what is the correct way of usage JNI from Servlet.
As I understand there are several problems:
- If native DLL crashes, it will bring down whole app server
- If DLL is loaded by one class loaded, than another class loader won't be able to load and use it.
I searched internet and found couple of possible solution
- Create standalone JMS enabled application and use JMS in Servlet to communicate with it.
- Run standalone server, load in it JNI and talk to it through RMI
- Use Java Connector architecture
I would appreciate any information on this subject, what is best practice in this case?
P.S. I am not sure whether it's important, but the application which needs to use native DLL runs on JBoss.