office-gobmx/stoc/source/javaloader/javaloader.component
Michael Stahl 732fdafd9f officecfg,stoc: allow running JVM UNO components out-of-process
The problem is that 32-bit Win32 applications have very little VM, and
soffice.bin can run out, so try to move the JVM to a separate process
(uno.bin) and connect to it via pipe.

Add a new config to enable this:
"org.openoffice.Office.Java/VirtualMachine/RunUnoComponentsOutOfProcess"

If enabled, ServiceManager instantiates *all* JVM components
out-of-process, by instantiating
"com.sun.star.java.theJavaVirtualMachine" out-of-process.

To ensure that the remote connection is disconnected at shutdown (and
thereby prevent crashes with remote calls during late shutdown),
JavaComponentLoader is now a "single-instance" service; this change
should be harmless for the default in-process configuration case.

Tested with these extensions:
  Wiki Publisher
  smoketest TestExtension.oxt
  odk CalcAddins.oxt Inspector.oxt ToDo.oxt

Also passed "make check" on Linux when enabled, if the variable
URE_BIN_DIR is set properly for CppunitTest_services.

Change-Id: I76bf17a9512414b67dbd20daee25a6d29c05f9d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133218
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-13 16:33:39 +02:00

28 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.stoc.JavaComponentLoader"
constructor="stoc_JavaComponentLoader_get_implementation"
single-instance="true">
<service name="com.sun.star.loader.Java"/>
<service name="com.sun.star.loader.Java2"/>
</implementation>
</component>