Professional Documents
Culture Documents
SAP AG
Presentation – Content Overview
1 Overview
2 Architecture
3 l Scenarios
4 l Design
5 Examples
1 Overview
2 Architecture
3 l Scenarios
4 l Design
5 Examples
Java
SAP Java
Connector
Function ALE
JNI Layer Module IDoc
RFC
libRFC RFC Layer
tRFC
qRFC
Java API comprises
n Dynamic metadata lookup and caching
n JCO.Function object offers ready-to-use containers for parameters and/or
tables
n Service APIs useful to build higher level applications on top
ã SAP AG 2002, SAP JCo / 5
SAP Java Connector – Architecture
RFC Middleware
n RFC Middleware uses RFC
Library through Java Native JNI Layer
Interface (JNI) Layer
RFC Library
RFC
RFC
SAP System
1 Overview
2 Architecture
3 l Scenarios
4 l Design
5 Examples
1 Overview
2 Architecture
3 l Scenarios
4 l Design
5 Examples
Performance
How to avoid extensive object creation?
n Why not using a heterogeneous buffer (e.g. one dimensional
array) divided into cells, each cell holding the field‘s value?
n Since strings are by far the most occurring field types, a
character array would be the natural choice for a buffer.
Performance
C I P X byte[] type
6 2 2 4 int[] length
0 6 8 10 int[] offset
Performance
n Metadata for functions and parameters will be fetched at first
request and stored in the repository cash
n Connection pooling
Avoids expensive connect(), disconnect() calls
Record
Field FieldIterator
1 Overview
2 Architecture
3 l Scenarios
4 l Design
5 Examples
import com.sap.mw.jco.*;
public Quicky() {
try {
// Add a connection pool for the specified system
JCO.addClientPool(SID, // alias for this pool
10, // max. number of connections
“000", // SAP client
”bbking", // userid
”lucille", // password
"EN", // language
“pwdf024", // host name
"06” // system number
);
// Create a new repository
repository = JCO.createRepository("MYRepository", SID);
} catch (JCO.Exception ex) {
System.out.println("Caught an exception: \n" + ex);
}//try
}
try {
// Get a function template from the repository
JCO.Function function = repository.getFunctionTemplate(
"BAPI_SALESORDER_GETLIST").getFunction();
import com.sap.mw.jco.*;
public QuickyServer() {
JCO.addClientPool(POOL,MAX_LISTENER,"400","tarzan","jane","EN",
"iwdf5020.wdf.sap-ag.de","T20","SPACE");
repository = JCO.createRepository("QUICKY", POOL);
}
public void startThemAll() {
for (int i = 0; i < MAX_LISTENERS; i++) {
listeners[i] = new Listener("iwdf5020", "sapgw00", ”QUICKY", repository);
try {
listener[i].start();
} catch (Exception ex) {
System.out.println("Could not start listener !\n" + ex);
}//try
}//for
}
public static void main(String[] argv) {
QuickyServer qserver = new QuickyServer();
qserver.startThemAll();
}
n No part of this publication may be reproduced or transmitted in any form or for any purpose without the express
permission of SAP AG. The information contained herein may be changed without prior notice.
n Some software products marketed by SAP AG and its distributors contain proprietary software components of other
software vendors.
n Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of
Microsoft Corporation.
n IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®,
OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®,
Informix and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries.
n ORACLE® is a registered trademark of ORACLE Corporation.
n UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group.
n Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and
other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.
n HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium,
Massachusetts Institute of Technology.
n JAVA® is a registered trademark of Sun Microsystems, Inc.
n JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented
and implemented by Netscape.
n MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.
n SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other
countries all over the world. All other product and service names mentioned are trademarks of their respective
companies.