Browse Prior Art Database

OLEBridge for Java

IP.com Disclosure Number: IPCOM000013972D
Original Publication Date: 2001-May-01
Included in the Prior Art Database: 2003-Jun-19
Document File: 6 page(s) / 131K

Publishing Venue

IBM

Abstract

Introduction

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 25% of the total text.

Page 1 of 6

OLEBridge for Java

Introduction

OLEBridge is a product which exposes OLE Objects from Windows machines
to any Java platform supporting JDK1.1.4or better. By using a variety
of communication mechanisms, object wrappings, and object and data
translation mechanisms, OLEBridge allows a program to instantiate an
OLE enabled software product on a remote or local machine and call
methods on it as if using VB, C++, or some other WIN SDK enabled
development environment.

Problem Statement

Typically, programmers make use of the Java Native Interface (JNI) to access locally resident services. This process usually involves wrapping the target interface (OLE, DLL, Program API) with C code and invoking those services via the JNI. The result of this process is a one to one mapping between the C wrappers and the target interfaces. Several existing products support this approach. In fact, our first attempts utilized this approach. What we found was that this approach produces fragile code. When the vendor released a newer version of their OLE enabled application, they did not extend their dll's as expected. Rather they rewrote them and changed the order of the method call names. Consequently we were forced regenerate our wrappers to conform to the new interface.

After that painful lesson, we took a more flexible approach, one that decoupled the wrappers and interfaces. Our solution achieves an advantage in the area of maintainability by utilizing COM's IDispatch interface to dynamically invoke the methods exposed by the COM object's dispinterface.

OLEBridge Technical Overview

The following diagram illustrates conceptually how the OLEBridge is
designed. The following descriptions follow from the design
components identified within this diagram. The description flows
begins with a discussion of the services available on the Client.
These are the services that are available to the Java programmer.
Subsequent descriptions follow a bottom up approach.

1

Page 2 of 6

OLEBridge for Java

Local Method ExecutionRMIand other Communication methods possible.

OLEBridge Server

4,6

Java/C++ OLE Object Translator

&

OLE Exception Handler

  OleUtilities VoidPointerWrapper

 OLEBridge Object Services (Interfaces) RemoteOleServer RemoteOleServerObject

  RemoteOleObject RemoteReferenceObject

Uses

2JNI Java Wrappers

(Created with J2CPP)

JNI C Wrappers

(Created with J2CPP)

1C++ Objects

  COleObject CReferenceObject CVariant COleException

   CGUID CSafeArray CSafeArrayBound

CSafeArrayIndex CVariantArray

  OLE/COM Registered Objects Word Processors

Spread Sheets Web Browsers

Report Tools Imaging Tools

?

?

?

COM

Uses

5

Contains

OLE Types are used for bidirectional communication between Java and OLE via the Java to C++ OLE Object Translator. The Variant type provides a consistent means of using OLE types. The OleException reports COM exceptions in Java format.

3OLEBridge OLE Types in Java

  GUID OleException SafeArray

 Variant OleTypes

7OLEBridge Client

OLEBridge Client Objects

  OleServer OleClientObjec...