Question

We would like to give access to some of our EJBs from Excel. The goal is to give an API usable from VBA.

Our EJBs are mostly Stateless Session Beans that do simple CRUD operations with POJOs.

Some possible solutions:

  • Exposing the EJBs as WebServices and create a VB/C# dll wrapping them,
  • Using Corba to access the EJBs from C#,
  • Creating a COM Library that uses Java to access the EJBs,

Pointers to frameworks for these solution or other ideas are welcome.

Was it helpful?

Solution

You could take a look at IIOP.NET, which addresses this issue.

OTHER TIPS

If you have a fairly recent ejb container, the cheapest and easiest should be to expose your beans as web services and call it from VB/C#. This doesn't require any extra tool or library.

I work on an open source project called XLLoop - this framework allows you to expose POJO functions as Excel functions.

It consists of:

  1. An Excel add-in (XLL), which communicates over TCP to:
  2. A Java server/library, which invokes java methods.

You could embed this java function server in an EJB and have it deployed as part of your app server.

Back in the VB6/COM/DCOM times we used the suite J-Integra to accomblish this task. I have no experience with the .NET version though.

I highly recommend IKVM. It is a java byte code to .NET assembly compiler (i.e. JAR --> DLL) and I have used it to create live JMX links and listeners in an Excel automation server. It should not be difficult for you to create a .NET assembly of your EJB client stubs and supporting libraries.

//Nicholas

You could try Obba (I work on this project):

Obba is a Java object handler for spreadsheet applications.

It provides a bridge between spreadsheets and Java classes, such that spreadsheets can be used as graphical user interface for Java libraries. Accessing your Java library form the spreadsheet requires no glue code (no VBA needed, no special Java code needed). Objects are instantiated by their original constructor. Constructors and methods are invoked using a "by name" reflection. A spreadsheet-specific factory method is not necessary. Obba provides the functions to handle objects in spreadsheets.

The Java virtual machine providing the add-in may run on the same computer or a remote computer - without any change to the spreadsheet, i.e., object referenced in the spreadsheet can reside on remote Java virtual machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top