- Code: Select all Expand viewCollapse view
List liste = ooo.connector.server.OOoServer.getDefaultOOoOptions();
liste.clear();
//liste.add("-nologo");
liste.add("--nodefault");
liste.add("--norestore");
oooExeFolder = "/opt/openoffice4/program";
ooo.connector.server.OOoServer server = new ooo.connector.server.OOoServer(oooExeFolder, liste);
[color=#800000]server.start("-accept=\"socket,host=localhost,port=8699;urp;StarOffice.ServiceManager\"");[/color]
System.out.println(server.toString());
BootstrapSocketConnector oooConnector = new BootstrapSocketConnector(server);
xContext = oooConnector.connect();
xMultiComponentFactory = xContext.getServiceManager();
xcomponentloader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,xMultiComponentFactory.createInstanceWithContext("com.sun.star.frame.Desktop", xContext));
PropertyValue[] argumente = new PropertyValue[1];
argumente[0] = new PropertyValue();
argumente[0].Name="MacroExecutionMode";
argumente[0].Value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN;
objectDocumentToStore = (XComponent) xcomponentloader.loadComponentFromURL(loadUrl, "_default", 2, argumente);
OpenOffice starts and everything works just fine. But now a second user starts a different java application with nearly the same bootstrap-mechanism. Only loadUrl and the red line above are different. It reads now
- Code: Select all Expand viewCollapse view
server.start("-accept=\"socket,host=localhost,port=8700;urp;StarOffice.ServiceManager\"");
The app of the second user crashes on the last line of the code snippet. In some cases with an error message, in other cases the OOo Document appears on the display of the first user!! But on the other hand, if user 1 types
- Code: Select all Expand viewCollapse view
/opt/openoffice4/program/soffice -accept="socket,host=localhost,port=8699;urp;StarOffice.ServiceManager"
Now user 2 types
- Code: Select all Expand viewCollapse view
/opt/openoffice4/program/soffice -accept="socket,host=localhost,port=8700;urp;StarOffice.ServiceManager"
sudo netstat -a gives me the information that ports 8699 and 8700 are in listening mode.
Some advice would be highly appreciated
Best regards and thanks in advance
Andeas from wmpartner