a month ago
We encountered an interesting issue with Java Native Interface (JNI) libraries in SQL Anywhere 17. Java version used is 8.
When deploying updated Java classes that use JNI, we need to handle JVM reinitialization.
Issue:
- Using a third-party Java library that utilizes JNI/SWIG bindings
- When updating Java classes in the database, the JNI initialization fails because it can only happen once per JVM lifecycle
- Database restart works but isn't ideal for production environments
Found that STOP JAVA and START JAVA (or STOP/START EXTERNAL ENVIRONMENT JAVA) commands work, but they're session-specific. This means:
- Works in current session
- New connections/sessions need their own STOP/START JAVA
- Different users need to execute these commands in their sessions
Is there a better way to manage Java restarts in a running database?
We are looking at any potential solutions or best practices in managing the external environment with a problem like this.
Request clarification before answering.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.