从 Excel 使用 EJB 的最佳解决方案

发布于 2024-07-05 17:27:56 字数 292 浏览 6 评论 0原文

我们希望允许从 Excel 访问我们的一些 EJB。 目标是提供可通过 VBA 使用的 API。

我们的 EJB 大多是无状态会话 Bean,它们使用 POJO 执行简单的 CRUD 操作。

一些可能的解决方案:

  • 将 EJB 作为 Web 服务公开并创建一个包装它们的 VB/C# dll、
  • 使用 Corba 从 C# 访问 EJB、
  • 创建使用 Java 访问 EJB 的 COM 库、

指向这些解决方案或其他想法的框架的指针欢迎。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

停顿的约定 2024-07-12 17:27:56

您可以查看 IIOP.NET,它解决了这个问题。

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

海未深 2024-07-12 17:27:56

如果您有一个相当新的 ejb 容器,最便宜和最简单的方法应该是将您的 bean 公开为 Web 服务并从 VB/C# 调用它。 这不需要任何额外的工具或库。

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.

仅此而已 2024-07-12 17:27:56

我从事一个名为 XLLoop 的开源项目 - 该框架允许您公开 POJO 函数作为 Excel 函数。

它包括:

  1. Excel 加载项 (XLL),通过 TCP 与:
  2. Java 服务器/库,调用 java 方法。

您可以将此 java 函数服务器嵌入到 EJB 中,并将其部署为应用程序服务器的一部分。

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.

晨光如昨 2024-07-12 17:27:56

回到 VB6/COM/DCOM 时代,我们使用套件 J-Integra 来完成此任务。 不过我对 .NET 版本没有经验。

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.

潦草背影 2024-07-12 17:27:56

我强烈推荐IKVM。 它是一个 java 字节码到 .NET 程序集编译器(即 JAR --> DLL),我用它在 Excel 自动化服务器中创建实时 JMX 链接和侦听器。 创建 EJB 客户端存根和支持库的 .NET 程序集对您来说应该不难。

//尼古拉斯

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

白鸥掠海 2024-07-12 17:27:56

你可以尝试 Obba (我从事这个项目):

Obba 是电子表格应用程序的 Java 对象处理程序。

它提供了电子表格和 Java 类之间的桥梁,使得电子表格可以用作 Java 库的图形用户界面。 从电子表格访问 Java 库不需要粘合代码(不需要 VBA,不需要特殊的 Java 代码)。 对象由其原始构造函数实例化。 使用“按名称”反射来调用构造函数和方法。 不需要特定于电子表格的工厂方法。 Obba 提供了处理电子表格中对象的函数。

提供插件的 Java 虚拟机可以在同一台计算机或远程计算机上运行 - 无需对电子表格进行任何更改,即电子表格中引用的对象可以驻留在远程 Java 虚拟机上。


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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文