BEA Home | Events | Solutions | Partners | Products | Services | Download | Developer Center | WebSUPPORT
| WebLogic Server Doc Home | WebLogic jCOM User Guide | Previous Topic | Next Topic | Contents | View as PDF

Introducing BEA WebLogic jCOM

The following sections describe how WebLogic jCOM can expand the accessibility of WebLogic Server to COM clients:

- What is BEA WebLogic jCOM?

- The Java COM Conflict

- WebLogic jCOM's Solution to the Conflict

- How WebLogic jCOM Works

- WebLogic jCOM Features

What is BEA WebLogic jCOM?

BEA WebLogic jCOM is a bi-directional COM-Java bridging tool. Using WebLogic jCOM you can access Component Object Model (COM) components as though they were Java objects, and you can access pure Java objects as though they were COM Components.

The Java COM Conflict

In Support of Java

One of the reasons why so many companies are using Java, is that it allows them to dramatically reduce the costs of software development and deployment, because Java programs can execute on any platform that supports a standard Java Virtual Machine (JVM).

The principle of developing "pure" Java software is a very important one, and many software developers are, correctly, extremely concerned about the use of any software which locks them into a specific platform.

In Support of COM

Software Components are a natural evolution of Object Oriented software development, enabling the isolation of parts of an application into separate components. Such components can be shared between applications, and since components are only accessed through a rigidly defined interface, their implementation can be changed without impacting applications which use them.

Microsoft's widely used Component Object Model (COM) defines a binary standard for component integration, allowing COM components created using Visual BASIC (for example), to be accessed from an application created using Visual C++.

An enormous number of COM Components have been created and are available for purchase. Indeed, any software which has been recently developed under Microsoft Windows will almost certainly have been created using components.

Modern software design under Microsoft Windows practically mandates that an application be designed using a COM Component based approach. One of the benefits of doing so is that parts of an application's functionality can be made accessible to other applications, not only the same host, but also remotely -- using Distributed COM (DCOM).

The Conflict Between Java and COM

There may be conflict between the desire to create Java software which runs anywhere, and the need to re-use COM software components.

This conflict often manifests itself in companies where there are two clearly divided camps -- the Java developers, who abhor anything which will limit their pure Java software to a specific platform, and the Windows developers, that are urging the use and re-use of COM components.

Nevertheless, there is frequently a business need to access existing applications from new applications developed in pure Java, running in a standard JVM. Many of these existing applications were developed under Microsoft Windows, and because they were well designed, they expose their functionality to other applications by exposing COM Components.

WebLogic jCOM's Solution to the Conflict

BEA WebLogic jCOM offers a solution to the conflict by providing a bridge which allows you the "write once, run anywhere" benefit Java and the benefit of COM component re-use provides.

Internally WebLogic jCOM uses a standard platform independent mechanism which Microsoft has defined for accessing COM Components.

How WebLogic jCOM Works

WebLogic jCOM's Java-COM bridging capabilities allow COM access from and to Java objects that are running on any operating system environment.

COM developers can make callbacks into Java objects. WebLogic jCOM dynamically "remote-enables" any Java object, making all of its public methods and member variables accessible from COM.

To the Java programmer, WebLogic jCOM makes COM components look just like Java objects, presenting COM properties, methods and events as Java properties, methods and events.

Figure 1-1 WebLogic jCOM works with any Java Virtual Machine, on any platform, and requires no native code.

WebLogic jCOM's pure Java runtime talks to COM components using Distributed COM layered over Remote Procedure Calls (RPC), which are themselves layered on TCP/IP. So at the lowest level WebLogic jCOM uses the totally standard Java networking classes.

WebLogic jCOM Features

The key features of WebLogic jCOM can be summarized as follows:

- WebLogic jCOM provides a bi-directional bridge between COM components and Java. Enterprise Java Beans (EJBs) and Java objects can be accessed from COM clients; COM components can be accessed from Java clients.

- WebLogic jCOM hides the existence of the data types accessed by the client, dynamically mapping between the most appropriate Java objects and COM components.

- WebLogic jCOM supports both late and early binding.

- All JVMs are supported.

- The machine running the JVM only needs to have the WebLogic jCOM runtime (that is only jCOM.jar) on it. The jCOM.jar file requires no native code, it is pure Java.

- No native code is required on the machine hosting the COM Component. Internally, WebLogic jCOM uses the Windows DCOM network protocol to provide communication between both local and remote COM components and a pure Java environment. WebLogic jCOM does, however, support an optional "native mode" which maximizes performance when running on a Windows platform.

- The WebLogic jCOM Java runtime (jcom.jar) is approximately 595K in size.

- WebLogic jCOM supports event handling. For example, with WebLogic jCOM Java events are accessible from VB using the standard COM event mechanism and also, Java objects can subscribe to COM compnent events.

- WebLogic jCOM lets you access COM Components from Java using no authentication, or with the equivalent of Connect level authentication.

Copyright © 2001 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.