summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/jdbc.component
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-16 21:39:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-16 21:43:12 +0100
commitb1d65c9f1535c9ef283d2a91a225359e5983f747 (patch)
tree9fa6c419d271067578f716167073e0121b9693c0 /connectivity/source/drivers/jdbc/jdbc.component
parent9630b973553c7db8e591adb34470228965f01491 (diff)
Allow setting environment value directly in .component files
...for internal loader="com.sun.star.loader.SharedLibrary" components, instead of exported component_getImplementationEnvironmen (or implicit CPPU_CURRENT_LANGUAGE_BINDING_NAME). Adapted a few .component files as proof- of-concept, more to follow. Change-Id: I82332e0a48e6fc1da245990bb72265fe6e58447e
Diffstat (limited to 'connectivity/source/drivers/jdbc/jdbc.component')
-rw-r--r--connectivity/source/drivers/jdbc/jdbc.component13
1 files changed, 12 insertions, 1 deletions
diff --git a/connectivity/source/drivers/jdbc/jdbc.component b/connectivity/source/drivers/jdbc/jdbc.component
index 5b8b151ba3dc..07fd03c68467 100644
--- a/connectivity/source/drivers/jdbc/jdbc.component
+++ b/connectivity/source/drivers/jdbc/jdbc.component
@@ -17,7 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<component loader="com.sun.star.loader.SharedLibrary" prefix="jdbc"
+<!-- Recent Java 6 VMs make calls to JNI Attach/DetachCurrentThread (which this
+ code does extensively) very expensive. A follow-up JVM fix reduced the
+ overhead significantly again for all threads but the main thread. So a
+ quick hack to improve performance of this component again is to confine it
+ in the affine apartment (where all code will run on a single, dedicated
+ thread that is guaranteed no to be the main thread). However, a better fix
+ would still be to redesign the code so that it does not call
+ Attach/DetachCurrentThread so frequently:
+-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ environment="@CPPU_ENV@:affine" prefix="jdbc"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.sdbc.JDBCDriver">
<service name="com.sun.star.sdbc.Driver"/>