https://bz.apache.org/ooo/show_bug.cgi?id=126148
--- Comment #4 from jvchbabu <[email protected]> --- (In reply to Ariel Constenla-Haile from comment #2) > (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(); > > } Starting the open office services with different user profiles will land us in problems while restating the open office services through java process(programatic restart of OO with Java), as open office services and java process should be owned by the same user. -- You are receiving this mail because: You are the assignee for the issue.
