cancel
Showing results for 
Search instead for 
Did you mean: 

Session-specific Java Reset

Andraz
Discoverer
117

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.

Accepted Solutions (0)

Answers (0)