Providing Your Own Services Through the Service Manager

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Providing Your Own Services Through the Service Manager

Postby CilindroAmarillo » Tue Dec 31, 2019 1:33 am

I'm currently trying to learn about UNO by building a simple command-line interface in Java. The demo contains a client and server, which connect to each other using XConnector and XAcceptor, as well as a simple command parser implemented as an UNO component. So far I've succeeded in generating a type database and Java mappings of my types; I'm still planning on creating a registry for my components.

While I've been working on that, I've been trying to determine the best way of using my types with the service manager. So far, from reading the developer's guide, it is my understanding (and I may be mistaken) that my options are:
  • Merging with the OpenOffice registries, types.rdb and services.rdb. This seems like the simplest option, though seeing as these two programs are entirely external to OpenOffice, this doesn't really feel like the right option.
  • Registering my services with XSet. I will probably use this method if all else fails, as it seems like the simplest. It also doesn't seem that flexible, as the available services become hard-coded, so I don't believe it to be preferable.
  • Implementing a simple service manager. I haven't researched this option in detail, as I would prefer to use an existing implementation of a service manager.
  • Using the UNO executable. This seems like a reasonable option, though understanding the limitations of the UNO executable, I would rather make my programs stand-alone.
  • Using a different registry with the service manager. This is the option I'm currently exploring; more on that below.

The developer's guide suggests that it's possible to configure which registries are used with UNO using an ini file. I've attempted to pass my own ini file as an argument to Bootstrap.defaultBootstrap_initialComponentContext, though regardless of whether I pass arguments, it always throws a 'RuntimeException: cannot get mapping C++ <-> Java'. Oddly enough, Bootstrap.bootstrap works fine.

Before I continue any further trying to sort out this problem, is this a practical way of using my services with UNO, or should I explore another way? I'm a beginner at using UNO, so any advice is appreciated! If this is indeed the most practical approach to using my services with the service manager, then I can provide any information needed to reproduce the problem, and hopefully then we can solve it.

Thanks in advance for your help!
OpenOffice 4.1.7 | Windows 10
Posts: 4
Joined: Wed Nov 06, 2019 6:55 pm

Return to External Programs

Who is online

Users browsing this forum: No registered users and 3 guests