openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijay chandra <>
Subject Multiple open office services are associated to same PID(OS)
Date Wed, 04 Mar 2015 12:53:52 GMT
We recently upgraded to open office 4.1.1
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

Command :C:\Program Files (x86)\OpenOffice 4\program\soffice -invisible

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

Code Snippet:
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();

Thanks & Regards,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message