Multiple OpenOffice services are associated to same PID(OS)

The Application Programming Interface and the OASIS Open Document Format

Multiple OpenOffice services are associated to same PID(OS)

Postby jvchbabu » Wed Feb 25, 2015 6:58 am

We recently upgraded to open office 4.1.1 version(Apache_OpenOffice_incubating_4.1.1_Win_x86_install_en-US.exe).We installed it and and connect to open office 4.1.1 with UNO Java API.
We used to start the open office from commnad prompt by issue the below command. We kill and start the open office service by process id if our application found issues with open office processing(hung, failed to connect).

Command :C:\Program Files (x86)\OpenOffice 4\program\soffice -invisible -"accept=socket,host=0,port=8100;urp"&

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.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.

Code: Select all   Expand viewCollapse view
           XComponentContext xRemoteContext =null;
      if (xRemoteContext ==null  ) {
         XComponentContext xLocalContext =
         XMultiComponentFactory xLocalServiceManager = xLocalContext
         Object urlResolver = xLocalServiceManager
                     "", 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();
OpenOffice 4.0.1 on Windows 7
Posts: 3
Joined: Wed Dec 03, 2014 6:22 pm

Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest