Search code examples
javacom

Providing a Java Programm as (D)COM Service


I am looking for a solution (best example code) how to implement an register a Java Program as (D)COM Server/Service. More concise I have the following issue:

Initially situation is:

  • (a) I have a Java Webservice (Axis) pulling in Data from the Web.

  • (b) I have a 3rd Party service (written in Delphi) which wants the data from a COM-Object and is periodically calling this (the interface, which methods of the COM Object are called, is specified).

In order to get the data from (a) to (b), I need to implement a COM-Server which provids the needed methods for (b) to retrieve its data.

The main Question I have is:

How can I make and register the Java Service as a COM-Object and provide the needed methods so that (b) get its data when calling.

I know Java, but I am no expert to (D)COM. So, forgive me possible technical error concerning COM. Searching the Web I found several tools/frameworks (e.g. JInterop) that allow a Java Program to interact with a COM-Object, but I did not found code etc. how to make a Java Program accessible via (D)COM.


Solution

  • First, take a look on using Java Servers and DCOM. An example is idl server. Also, you can see services tutorial.