To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=75164 Issue #|75164 Summary|Remove dependency of sdbc_hsqldb.jar on UNO jars Component|Database access Version|current Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|ENHANCEMENT Priority|P3 Subcomponent|none Assigned to|oj Reported by|sb
------- Additional comments from [EMAIL PROTECTED] Tue Mar 6 15:06:57 +0000 2007 ------- Fixing issue 69624 on CWS sb36, it became obvious that it is a disadvantage that sdbc_hsqldb.jar (built at connectivity/com/sun/star/sdbcx/comp/hsqldb/makefile.mk:1.5.50.6) uses classes from jurt.jar (com.sun.star.lib.util.NativeLibraryLoader) and unoil.jar (com.sun.star.embed.ElementModes): sdbc_hsqldb.jar is now loaded with its own classloader in connectivity/source/drivers/jdbc/JConnection.cxx:1.2.28.3, where that classloader does not inherit from the newly introduced UNO classloader (in which all classes needed for the Java UNO runtime infrastructure, and esp. jurt.jar and unoil.jar, are already available, see jvmaccess/inc/jvmaccess/unovirtualmachine.hxx:1.4). Hence, that classloader will create fresh instances of NativeLibraryLoader and ElementModes classes, and not use the same instances as the UNO classloader. This is potential resource wastage, can cause problems with loading native libraries (similar to what is described in the additional comments starting Mar 5 2007 in issue 69624), and can cause problems when ElementModes happens to be exchanged with true Java UNO code loaded by the UNO classloader one day (where the two instances of ElementModes will be considered distinct, incompatible types by the JVM). There are two solutions: Either declare that jars loaded by JConnection.cxx are UNO components or should be run in the UNO classloader. (But if they were UNO components, they should probably implement UNO services and be instantiated the normal UNO way in the first place. And if they are unrelated to UNO it is probably not wise to generally load them from the UNO classloader.) Or remove the dependencies of sdbc_hsqldb.jar on jurt.jar and unoil.jar. For NativeLibraryLoader, a working solution should be to replace calls to NativeLibraryLoader.loadLibrary with calls to System.loadLibrary, and to add .. (i.e., the OOo program directory where the native libraries reside) to the sdbc_hsqldb.jar manifest Class-Path. The use of the ElementModes constants can probably be replaced by helper functionality in sdbc_hsqldb.jar itself. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
