https://bz.apache.org/ooo/show_bug.cgi?id=126148

--- Comment #2 from Ariel Constenla-Haile <[email protected]> ---
(In reply to jvchbabu from comment #0)
> We tried to start the multiple open office services by providing multiple
> port numbers such as below
> C:\Program Files (x86)\OpenOffice 4\program\soffice -invisible
> -"accept=socket,host=0,port=8100;urp" &
> C:\Program Files (x86)\OpenOffice 4\program\soffice -invisible
> -"accept=socket,host=0,port=8600;urp" &
> 
> Both the ports are listening on their respective ports but surprisingly the
> process associated to them is one.

That's because OpenOffice is using the same user profile in both cases.
You must specify a different user directory. For example:

~]$ openoffice4 -env:UserInstallation=file:///tmp/test_aoo1 > /dev/null 2>&1 &
[1] 9743
~]$ openoffice4 -env:UserInstallation=file:///tmp/test_aoo2 > /dev/null 2>&1 &
[2] 9820

Just use -env:UserInstallation=file://<path to separate user dir>









When there is failure with respective any
> one of the service, killing and starting the open services stops all
> ports.But we wanted at least one service should available to serve the
> requests, any solution/suggestions/alternatives to have such kind of
> multiple services.
> 
> Is there a specific restriction to have singleton for the remote context of
> XComponentContext type?
> 
> We use the below code snippet to create and get the service manager instance.
> 
>          XComponentContext xRemoteContext =null;
>       if (xRemoteContext ==null  ) {
>             
>          
>          XComponentContext xLocalContext = com.sun.star.comp.helper.Bootstrap
>                .createInitialComponentContext(null);
>          XMultiComponentFactory xLocalServiceManager = xLocalContext
>                .getServiceManager();
>          Object urlResolver = xLocalServiceManager
>                .createInstanceWithContext(
>                      "com.sun.star.bridge.UnoUrlResolver", xLocalContext);
>          
>          XUnoUrlResolver xUnoUrlResolver = (XUnoUrlResolver) UnoRuntime
>                .queryInterface(XUnoUrlResolver.class, urlResolver);
>          
>          
>          Object initialObject = xUnoUrlResolver.resolve(unoUrl);
>          XPropertySet xPropertySet = (XPropertySet) UnoRuntime
>                .queryInterface(XPropertySet.class, initialObject);
>          Object context = xPropertySet.getPropertyValue("DefaultContext");
>          
>             xRemoteContext=(XComponentContext) UnoRuntime.queryInterface(
>                XComponentContext.class, context));
>          
>          
>       }
> 
>       return xRemoteContext.get("8100").getServiceManager();
> }

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to