Вы находитесь на странице: 1из 13

j-Interop

Open Source Java COM Bridge


Contents
What is it ?

Comparison with Java Native interface

Comparison with J-Integra for COM

Benefits of using j-Interop

Support
j-Interop
What is j-Interop ?

Pure Java implementation of DCOM protocol requiring no
native code (i.e. no DLLs).
Runs on any platform that supports a Java (including Linux,
Solaris, Unix Variants).
Zero server installation (i.e. no JVM or additional software
required on the COM platform).
Easy to use API. This allows the Java developer full control
and flexibility to model calls to the COM server.
Providing out-of-box implementation of Automation specific
interfaces (like IDispatch etc.)
Open source library (LGPL).
Matured code base (2 years of active development,1 year of
Beta) and excellent support.
Compared to: Java Native Interface
Though JNI is Java, you still need to know a lot more about the native
component and the target architecture before accessing its services.
Developer has to be proficient in Java and in the native programming
language as well. With increasing demands to deliver on time - before
time, and the delivery having quality, it's usually hard to find such
cross-platform resources.
JNI takes away one of the most powerful features of the language
itself, "platform independence" (write once, run anywhere). It binds
the application to the host platform.
Normally, under such cross platform scenarios a Proxy\Stub way is
taken, Proxy sits on the host platform and Stub sits on the COM server
platform. But this is an invasive procedure and may be disallowed by
the Administrator as a potential security or integrity risk.
Another inherent risk when linking with native code is the instability it
may bring with it. A poorly written DLL (speaking of Windows) will
bring down an entire JVM, taking with it some vital applications.
Another aspect hard to put in is Bi-Directional access and Event based
operations. It is precarious to do this via JNI.
Compared to: Java Native Interface
JNI based solutions look more or less like figure 1.

















Figure 1
Java Application using
native APIs i.e. via JNI


(Windows Platform)
Java Application using a
proxy. This may be
RMI.

(UNIX Platform)
Java
Proxy
Java
Stub
JNI
DLL
MSWord or
MSExcel
COM Server
Windows Platform
continued
continued
Compared to: Java Native Interface

Since j-Interop is purely in Java, existing Java developers can
be leveraged without the need to hire additional resources.
Pure Java also makes sure that the code written once will run
on any platform such as Linux or Solaris etc. (Platforms
supporting Java)
There is no security risk involved as j-Interop based solutions
are completely non-invasive, they behave like standard COM
clients and do not require any special treatment. For that
matter the COM server will never know the difference.
Since there is no native code involved the question of instability
does not arise.
j-Interop provides easy APIs to register for Events and even
lets you replace a COM pointer with its Java implementation.
This polymorphism allows you to dynamically modify behavior
of COM servers from across domains.

MSRPC(DCOM)
















Figure 2
MSWord or
MSExcel
COM Server.
Windows Platform



UNIX Platform
Java virtual Machine
j-Interop based Java Application



Windows Platform
Java virtual Machine
j-Interop based Java Application
continued
j-Interop based solutions look like figure 2.
Compared to: Java Native Interface
MSRPC(DCOM)
Compared to: J-Integra for COM
J-Integra for COM is also a pure Java implementation of DCOM
protocol.

Almost all features provided by this commercial library are provided by
j-Interop as well including callbacks and support for all COM data
types.

Under lab conditions (I have no other source or setup) j-Interop has
performed comparably with a Windows COM client and better than J-
Integra (in the DCOM mode).

The areas where J-Integra scores over j-Interop are:-
Commercial Compiler to generate wrapper classes.
This feature will be shortly available in j-Interop.
Claims Full Bi-Directional access.
J-Interop is partial (only an existing COM reference can be replaced by a Java
implementation, but a Java Server cannot be morphed as a COM server.
This feature is under review for lack of use cases and demand.
If someone sees a need, please ping me.

j-Interop - Component stack
7 Application j-Interop (Implementing DCOM)
6 Presentation NDR (Network Data Representation)
5 Session DCE 1.1 RPC (Jarapac)
4 Transport TCP, UDP
3 Network IP
j-Interop - Benefits
Clean integration of two of the leading technologies without writing
any custom code:
j-Interop will produce all the Java classes necessary to interoperate with the COM
component, thus eliminating any need to write native (JNI) DLLs. (coming soon)

This decreases development time and also shortens the entire software lifecycle for
the products (based on j-Interop).

Such products are also saved from any kind of instability in function resulting from
poorly written native code (DLLs).

Accessing COM components from any type of Java client, including
Applets, EJBs, Servlets, JSPs, and standalone applications

Maximizing reuse of existing Java and COM components:

Since all the plumbing on interoperating with COM servers is done by j-Interop, it
makes reusing same components again instead of porting back and forth between
domains, a more lucrative and viable option.
No longer a dependency on cross platform resources, minimizing cost
and improving quality:

The same resources for Java can be utilized without any additional
training\competency building and the turn around time can be bought down
substantially.

Not having to deal with native code also removes the complexity associated with
maintaining the same. The code is now much cleaner and has a distinct line of
difference between what is from one domain and what is from another.

Debugging the projects based on j-Interop is substantially easier than debugging JNI
based DLL projects.

Easier deployment, there is no custom code at the server: This is a big
advantage in terms of administering the machines where the COM servers are deployed.
The administrator does not have to care about security or the instability of the native
components bringing the server down (Denial of Service).

Increasing marketability of products across domains: Choice of low turn
around time, easier deployment, no requirement of cross platform resources, less
maintainability all scale up the availability and marketability of products (based on j-Interop)
across domains.
j-Interop - Benefits
continued
Support
Please use the Support guidelines on the SourceForge home of
j-Interop.
For Professional services, please contact
vikram.roopchand@j-interop.org



Thank you for your time and patience.
Thats it

Вам также может понравиться