120 lines
6.8 KiB
HTML
120 lines
6.8 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Comparing the i5/OS Java virtual machine and the IBM Toolbox for Java classes" />
|
|
<meta name="abstract" content="You always have at least two ways to access an iSeries server resource when your Java program is running on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM)." />
|
|
<meta name="description" content="You always have at least two ways to access an iSeries server resource when your Java program is running on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM)." />
|
|
<meta name="DC.Relation" scheme="URI" content="jvm.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="jvmvstb" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Comparing the i5/OS Java virtual machine and the IBM Toolbox for Java classes</title>
|
|
</head>
|
|
<body id="jvmvstb"><a name="jvmvstb"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Comparing the i5/OS Java virtual machine and the IBM Toolbox for Java classes</h1>
|
|
<div><p>You always have at least two ways to access an iSeries™ server
|
|
resource when your Java™ program is running on the IBM<sup>®</sup> Developer
|
|
Kit for Java (i5/OS™) Java virtual machine (JVM). </p>
|
|
<div class="section"><p>You can use either of the following interfaces:</p>
|
|
<ul><li>Facilities built into Java</li>
|
|
<li>An IBM Toolbox
|
|
for Java class</li>
|
|
</ul>
|
|
<p>When deciding which interface to use, consider the following factors:</p>
|
|
<ul><li><strong>Location</strong> - Where a program runs is the most important factor in
|
|
deciding which interface set to use. Does the program do the following: <ul><li>Run only on the client?</li>
|
|
<li>Run only on the server?</li>
|
|
<li>Run on both client and server, but in both cases the resource is an iSeries server
|
|
resource?</li>
|
|
<li>Run on one i5/OS JVM
|
|
and access resources on another iSeries server?</li>
|
|
<li>Run on different kinds of servers?</li>
|
|
</ul>
|
|
<p>If the program runs on both client and server (including an iSeries server
|
|
as a client to a second iSeries server) and accesses only iSeries server
|
|
resources, it may be best to use the IBM Toolbox for Java interfaces.</p>
|
|
<p>If the program must
|
|
access data on many types of servers, it may be best to use Java native
|
|
interfaces.</p>
|
|
</li>
|
|
<li><strong>Consistency / Portability</strong> - The ability to run IBM Toolbox for Java classes
|
|
on iSeries servers
|
|
means that the same interfaces can be used for both client programs and server
|
|
programs. When you have only one interface to learn for both client programs
|
|
and server programs, you can be more productive. <p>Writing to IBM Toolbox for Java interfaces
|
|
makes your program less <strong>server</strong> portable, however.</p>
|
|
<p>If your program
|
|
must run to an iSeries server
|
|
as well as other servers, you may find it better to use the facilities that
|
|
are built into Java.</p>
|
|
</li>
|
|
<li><strong>Complexity</strong> - The IBM Toolbox for Java interface is built especially for
|
|
easy access to an iSeries server resource. Often, the only alternative
|
|
to using the IBM Toolbox
|
|
for Java interface
|
|
is to write a program that accesses the resource and communicates with that
|
|
program through Java Native Interface (JNI). <p>You must decide whether
|
|
it is more important to have better Java neutrality and write a program to access
|
|
the resource, or to use the IBM Toolbox for Java interface, which is less portable.</p>
|
|
</li>
|
|
<li><strong>Function</strong> - The IBM Toolbox for Java interface often provides more function
|
|
than the Java interface. For example, the IFSFileOutputStream
|
|
class of the IBM Toolbox
|
|
for Java licensed
|
|
program has more function than the FileOutputStream class of java.io. Using
|
|
IFSFileOutputStream makes your program specific to iSeries servers, however. You lose <strong>server</strong>
|
|
portability by using the IBM Toolbox for Java class. <p>You must decide whether
|
|
portability is more important or whether you want to take advantage of the
|
|
additional function.</p>
|
|
</li>
|
|
<li><strong>Resource</strong> - When running on the i5/OS JVM, many of the IBM Toolbox for Java classes
|
|
still make requests through the host servers. Therefore, a second job (the
|
|
server job) carries out the request to access a resource. <p>This request
|
|
may take more resource than a Java native interface that runs under the
|
|
job of the Java program.</p>
|
|
</li>
|
|
<li><strong>iSeries server
|
|
as a client</strong> - If your program runs on one iSeries server and accesses data on a
|
|
second iSeries server,
|
|
your best choice may be to use IBM Toolbox for Java classes. These classes provide easy
|
|
access to the resource on the second iSeries server. <p>An example of this
|
|
is Data Queue access. The Data Queue interfaces of the IBM Toolbox for Java licensed program provide easy access
|
|
to the data queue resource.</p>
|
|
<p>Using the IBM Toolbox for Java also means your program works on both
|
|
a client and server to access a data queue on an iSeries server. It also works when running
|
|
on one iSeries server
|
|
to access a data queue on another iSeries server.</p>
|
|
<p>The alternative
|
|
is to write a separate program (in C, for example) that accesses the data
|
|
queue. The Java program calls this program when it needs to access
|
|
the data queue.</p>
|
|
<p>This method is more server-portable; you can have one Java program
|
|
that handles data queue access and different versions of the program for each
|
|
server you support.</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="jvm.htm" title="The IBM Toolbox for Java classes run on the IBM Developer Kit for Java (i5/OS) Java virtual machine (JVM).">i5/OS Java virtual machine</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |