Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the best way to access COM interfaces from a J2EE server?

Are the available Java-COM bridges like j-Integra, com4j and Jacob and others suitable to be used in a J2EE container? Which one is the most appropriate for that use? I need to evaluate the risk of JVM crashes, native memory leak and unmanaged thread creation (since it's not recommended in a J2EE container that uses thread pools) for the available Java-COM bridges available today.

like image 784
Renan Mozone Avatar asked Oct 29 '10 16:10

Renan Mozone


1 Answers

I've used those bridges you mentioned. I would chose a very different approach, because of the things you said: crashes, mem leaks, and a lot of other stuff.

I would have a little Windows Server, using COM components since it is its native environment. In that little Windows Server you can expose some HTTP interfaces (WEB requests) you can use in your Java EE server to access COM components through Windows Server. That Windows Server can be an IIS with ASP.NET server, or a custom made program with a proprietary protocol you can write in C#, C++, C, VB.NET.

It's in my opinion, your safest choice. It will save you a lot of headaches when you go to production mode.

like image 182
Pablo Santa Cruz Avatar answered Oct 06 '22 00:10

Pablo Santa Cruz