Java Database Connectivity With IBM I - Archive

2y ago
26 Views
2 Downloads
1.13 MB
22 Pages
Last View : 22d ago
Last Download : 3m ago
Upload by : Vicente Bone
Transcription

Java Database Connectivitywith IBM iSAP on IBM i Porting TeamDorothea Stein

JDBC Interface - Java DataBase Connectivity Interface for the relational Datenbase access from Java. The Interface covers theJava packages java.sql and javax.sql. JDBC is the basis for object-relational database entrances such as EJB, JPA,JDO, The so-called JDBC API version determines the power of the interface and isdirectly coupled to the JVM/JDK version:JDK 1.4JDK 5.0JDK 6.0JDBC 3.0JDBC 3.0JDBC 4.0SAP Basis Release 6.40 and 7.0xSAP Basis Release 7.10 and 7.11SAP Basis Release 7.20 Implementation of this interface, the JDBC Driver, is typically coming fromdatabase manufactures but it could also come from third party distributors. The idea behind: Besides establishing the connection, which is configurable,programming is relatively “driver independent against the JDBC interface”.Open SQL for Java 2011 SAP AG. All rights reserved.2

JDBC on IBM i IBM offers three JDBC drivers for the access to IBM i:„IBM Toolbox for Java / JTOpen“, „IBM Native JDBC Driver“, „IBM JCC“ Third party distributors offer additional drivers, for example „HiT JDBC/400“ Toolbox and Native Driver are built and maintained by IBM Rochester. Thedrivers are optimised for IBM i. SAP on IBM i supports Toolbox and Native JDBCDriver. Toolbox / JTOpen is a type 4 driver, this means that the client side is composed100% out of Java (and it uses TCP/IP for the connection to the database server) Native Driver is a so-called type 2 driver, this means it uses native operatingsystem parts for performance optimization on the client side.Only applicable, when the client also uses IBM i as the operating systemRestrictions with Configtool (SAP Note 657117) That happens usually with 2-tier SAP installationsRestriction on such scenarios without validation of DRDA. 2011 SAP AG. All rights reserved.3

Native JDBC Driver – A To Be Discontinued Model(De-)Motivation: According to experience from the last 10 years: Java performance is notdominated by database access. Not released for SAP JVM Already mentioned limitation to 2-tier IBM i scenarios Consequence: Gradual elimination of support There has never been support for such SAP releases that run withSAP JVM 5 and higher. That means products based on SAP basis release7.1 and higher. Discontinuation of the Native Driver for old releases with migration toSAP JVM 1.4. No support for EHPI installations with target 7.0x, since EHPI is itself usingSAP JVM.We recommend that you change your driver soon! 2011 SAP AG. All rights reserved.4

Driver Portrait: Toolbox / JTOpenIBM Toolbox for Java It is delivered as a license program and already patched. Until V6R1: 57xxJC1 ("IBM Toolbox for Java„) From IBM 7.1: 57xxSS1, Option 3 („Extended Base Directory Support“) The JDBC 3.0 .jar The JDBC 4.0 /jt400.jarCaution: Identical Naming!The current IBM patch strategy: The driver is identical for all the IBM i releasesthat are in maintenance at the release time for the patch.The driver is able to connect downward-compatible to all IBM i releasessupported by IBM currently. 2011 SAP AG. All rights reserved.5

Driver Portrait: Toolbox / JTOpenJTOpen JTOpen is the codeidentical open sourceversion of the IBMToolbox Download fromhttp://jt400.sourceforge.net/ Full IBM support 2011 SAP AG. All rights reserved.6

Driver Portrait: Toolbox / JTOpenJTOpenJDBC 3.0 version:jtopen x y.zip (Default)JDBC 4.0 version:jtopen x y jdbc40 jdk6.zip 2011 SAP AG. All rights reserved.7

Driver Portrait: Toolbox / JTOpenSAP Integration For SAP basis release 7.0 is valid: SAP installations including dialoginstances use by standard the driver under/QFileSvr.400/ SAPGLOBALHOST /sapmnt/ SID /SYS/jdbc/tbx/jt400.jar SAPinst stores there a physical instance of the driver. In SAP basis release 6.40 Windows dialog instances use local copies.Also when the Toolbox is used, the PTF process is not enough!Tip: Replacing of the driver by a symbolic link on the PTFlocation on SAPGLOBALHOST :ADDLNK OBJ(' driver path /jt400.jar')NEWLNK(' SAPGLOBALHOST path /jt400.jar') 2011 SAP AG. All rights reserved.8

Driver Portrait: Toolbox / JTOpenDetermination of the Driver Version You determine the driver version in the following way from a shell:java –classpath /usr/sap/ sid /sys/jdbc/tbx/jt400.jarutilities.AboutToolboxIBM Toolbox for Java:Open Source Software, JTOpen 7.3, codebase 5770-SS1 V7R1M0.03 2011/01/14 @B5Supports JDBC version 3.0Toolbox driver version 9.4For newer SAP JEE patch levels, the driver version is described also in theconsole log of the bootstrap(/usr/sap/ sid / inst /work/jvm bootstrap.out)(For more information, see SAP Note 1164640).SAP Note 654800, section 22 („Special notes aboutindividual driver versions”) lists known driver problems. 2011 SAP AG. All rights reserved.9

Driver Portrait : Toolbox / JTOpenConfiguration Using URL Three configuration parts: Driver file: /usr/sap/ sid /sys/jdbc/tbx/jt400.jar Driver class: com.ibm.as400.access.AS400JDBCDriver URL: jdbc:as400:// Database Host ; Parameter (also iASP Info) What happens? JVM is asked to load the driver class. It therefore searches all files in the class path DBCDriver“); While the connection is being established, the DriverManager class of the JVMsearches for a driver class which fits to the URL and asks it to establish a connection tothe given target:java.sql.Connection con java.sql.DriverManager.getConnection( url , user , pwd ); 2011 SAP AG. All rights reserved.10

Driver Portrait: Toolbox / JTOpenConfiguration Using URL SAP JEE uses the already introduced URL method to establish a pool of physicaldatabase connections. The configuration of the driverclass and entrance data(URL, user, password) takesplace centrally in the SecureStore, accessible via theConfigTool.List of the currentparameters:SAP Note 654800 2011 SAP AG. All rights reserved.11

Driver Portrait : Toolbox / JTOpenConfiguration Using URL Which driver file is to be loaded, is configured in various, different placesdepending on the SAP release. In the ConfigurationsEditor per instance: Bootstrap Server Dispatcher In addition: SDM SAP Profil ConfigTool 2011 SAP AG. All rights reserved.12

Help, I Must Change My JDBC Driver!CONFIGJVM SCOPE(*JDBC) The exchanging of an existing Toolbox Driver by a new version, also a JDBC APIversion, is simple, since all configuration parameters stay the same. Changing from Native Driver to Toolbox (or reverse) is however complicated anderror-prone. In order to avoid errors caused by the conversion, CONFIGJVM is expanded forthis task for SAP releases 6.40 to 7.02. SAP Note 826449 describes the manualprocedure and also the functions of this tool. 2011 SAP AG. All rights reserved.13

Help, I Must Change My JDBC Driver!CONFIGJVM SCOPE(*JDBC), Example Prerequisites: The SAP system complies to the prerequisites mentioned in SAP Note1161275 to run CONFIGJVM SCOPE(*JDBC). Current patch level for CONFIGJVM, ILE, and/or J2EEKRN are present. The driver to be used in the future is found in /usr/sap/ sid /jdbc/tbx. Preview:CONFIGJVM SCOPE(*JDBC) ACTION(*PREVIEW) DRIVER(*TBX)From the log file configJVM dd mm yy hh mm .log in thedirectory /usr/sap/ sid / inst /j2ee/configjvm/log, the necessarychanges for the respective instance can be reconstructed. 2011 SAP AG. All rights reserved.14

Help, I Must Change My JDBC Driver!CONFIGJVM SCOPE(*JDBC), Example Conversion: Shut down SAP JEE CallCONFIGJVM SCOPE(*JDBC) ACTION(*APPLY) DRIVER(*TBX)Original configuration is exported pro instance to/usr/sap/ sid / inst /j2ee/configjvm/store and can be restored againlater using the following command:CONFIGJVM SCOPE(*JDBC) ACTION(*RESTORE)DATETIME(' dd mm yy hh mm ') Perhaps the following configuration files must be manually adjusted, becausethey do not get saved in the database:/usr/sap/ sid / inst /j2ee/cluster/instance.properties/usr/sap/ sid / inst /j2ee/cluster/instance.properties.vmprops 2011 SAP AG. All rights reserved.15

Help, I Must Change My JDBC Driver!What Can Go Wrongjava.sql.SQLException: No suitable driverSecure Store contains inconsistent data: The given driver class is found in theclasspath, but does not correspond to the indicated .access.AS400JDBCDriverjt400.jar could not be found in the classpath. Possible causes: After switching from the Native Driver to Toolbox, someone forgot to adjust theclasspath to jt400.jar jt400.jar no longer exists under the indicated position in the classpath. 2011 SAP AG. All rights reserved.16

Driver Portrait : Toolbox / JTOpenSAP JEE Connection Pool SAP JEE used the already introduced URL method to establish a pool of physicaldatabase connections. JEE applications may then logically request such aconnection without the necessity to open a physical connection. To view the settings of the connection pools, do the following: 7.10: Visual Administrator Server Nodes JDBC Connector 7.10: NetWeaver Administrator (http:// host :5 inst 00/nwa)Configuration ManagementInfrastructureApplication Resources Changes happen via the dbpool service of the ConfigTool. 2011 SAP AG. All rights reserved.17

Driver Portrait: Toolbox / JTOpenSAP JEE Connection Pool 2011 SAP AG. All rights reserved.18

Driver Portrait: Toolbox / JTOpenSAP JEE Connection Pool 2011 SAP AG. All rights reserved.19

Driver Portrait: Toolbox / JTOpenIBM i Connection Pooling Toolbox / JTOpen uses on the database side the so-called Host Servercomponent Associated jobs are called by standard QZDASOINIT and run in the subsystemQUSRWRK. As they are prestarted jobs, they can be configured as such,although that is not necessary. At least for applications, which use the pooling ofthe SAP JEE server. Changing the defaults: CHGPJE SBSD(QUSRWRK) PGM(QZDASOINIT) 2011 SAP AG. All rights reserved.20

« Homework »: Open SQL Monitors and Data Browser SAP offers a set of analysis tools for database performance and databaseproblems regarding Open SQL applications, similar to ABAP: SAP basis release 7.10:http:// Host :5 Instanz Nr 00/OpenSQLMonitors/index.html From basis release 7.10:http:// Host :5 Instanz Nr 00/nwaProblem ManagementDatabaseOpen SQL Monitors Tools: Connection Monitor – SQL statements in cache and cache hit ratio Open SQL Statistics – Performance statistics for SQL statements SQL Trace – Equivalent for ST05 Table Statistics Monitor – Modifications by table Monitoring: Central out of the ABAP DBA Cockpit (for example Solution Manager) 2011 SAP AG. All rights reserved.21

2012 SAP AG. All rights reservedNo part of this publication may be reproduced or transmitted in any form or for any purposewithout the express permission of SAP AG. The information contained herein may bechanged without prior notice.Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors.Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of MicrosoftCorporation.IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer,z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,PowerVM, Power Architecture, POWER6 , POWER6, POWER5 , POWER5, POWER,OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registeredtrademarks of IBM Corporation.Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks orregistered trademarks of Adobe Systems Incorporated in the United States and/or othercountries.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin aretrademarks or registered trademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C , WorldWide Web Consortium, Massachusetts Institute of Technology.Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license fortechnology invented and implemented by Netscape.Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, CrystalDecisions, Web Intelligence, Xcelsius, and other Business Objects products and servicesmentioned herein as well as their respective logos are trademarks or registered trademarksof Business Objects Software Ltd. Business Objects is an SAP company.Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybaseproducts and services mentioned herein as well as their respective logos are trademarks orregistered trademarks of Sybase, Inc. Sybase is an SAP company.All other product and service names mentioned are the trademarks of their respectivecompanies. Data contained in this document serves informational purposes only. Nationalproduct specifications may vary.The information in this document is proprietary to SAP. No part of this document may bereproduced, copied, or transmitted in any form or for any purpose without the express priorwritten permission of SAP AG.This document is a preliminary version and not subject to your license agreement or anyother agreement with SAP. This document contains only intended strategies, developments,and functionalities of the SAP product and is not intended to be binding upon SAP to anyparticular course of business, product strategy, and/or development. Please note that thisdocument is subject to change and may be changed by SAP at any time without notice.SAP assumes no responsibility for errors or omissions in this document. SAP does notwarrant the accuracy or completeness of the information, text, graphics, links, or other itemscontained within this material. This document is provided without a warranty of any kind,either express or implied, including but not limited to the implied warranties ofmerchantability, fitness for a particular purpose, or non-infringement.SAP shall have no liability for damages of any kind including without limitation direct,special, indirect, or consequential damages that may result from the use of these materials.This limitation shall not apply in cases of intent or gross negligence.The statutory liability for personal injury and defective products is not affected. SAP has nocontrol over the information that you may access through the use of hot links contained inthese materials and does not endorse your use of third-party Web pages nor provide anywarranty whatsoever relating to third-party Web pages.SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,StreamWork, and other SAP products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of SAP AG in Germany and othercountries. 2011 SAP AG. All rights reserved.22

JDBC on IBM i IBM offers three JDBC drivers for the access to IBM i: „IBM Toolbox for Java / JTOpen“, „IBM Native JDBC Driver“, „IBM JCC“ Third party distributors offer additional drivers, for example „HiT JDBC/400“ Toolbox and Native Driver are built and maintained by IBM Rochest

Related Documents:

IBM Developer Kit per Java IBM Developer Kit per Java è ottimizzato per l'utilizzo nell'ambiente IBM i. Esso utilizza la compatibilità della programmazione Java e delle interfacce utente consentendo così di sviluppare applicazioni IBM i. IBM Developer Kit per Java consente di creare ed eseguire programmi Java sul server IBM i. IBM

java.io Input and output java.lang Language support java.math Arbitrary-precision numbers java.net Networking java.nio "New" (memory-mapped) I/O java.rmi Remote method invocations java.security Security support java.sql Database support java.text Internationalized formatting of text and numbers java.time Dates, time, duration, time zones, etc.

Java Version Java FAQs 2. Java Version 2.1 Used Java Version This is how you find your Java version: Start the Control Panel Java General About. 2.2 Checking Java Version Check Java version on https://www.java.com/de/download/installed.jsp. 2.3 Switching on Java Console Start Control Panel Java Advanced. The following window appears:

Modi ed IBM IBM Informix Client SDK 4.10 03/2019 Modi ed IBM KVM for IBM z Systems 1.1 03/2019 Modi ed IBM IBM Tivoli Application Dependency Discovery Manager 7.3 03/2019 New added IBM IBM Workspace Analyzer for Banking 6.0 03/2019 New added IBM IBM StoredIQ Suite 7.6 03/2019 New added IBM IBM Rational Performance Test Server 9.5 03/2019 New .

2 Java Applications on Oracle Database 2.1 Database Sessions Imposed on Java Applications 2-1 2.2 Execution Control of Java Applications 2-3 2.3 Java Code, Binaries, and Resources Storage 2-3 2.4 About Java Classes Loaded in the Database 2-4 2.5 Preparing Java Class Methods for Execution 2-5 2.5.1 Compiling Java Classes 2-6

IBM 360 IBM 370IBM 3033 IBM ES9000 Fujitsu VP2000 IBM 3090S NTT Fujitsu M-780 IBM 3090 CDC Cyber 205 IBM 4381 IBM 3081 Fujitsu M380 IBM RY5 IBM GP IBM RY6 Apache Pulsar Merced IBM RY7

3. _ is a software that interprets Java bytecode. a. Java virtual machine b. Java compiler c. Java debugger d. Java API 4. Which of the following is true? a. Java uses only interpreter b. Java uses only compiler. c. Java uses both interpreter and compiler. d. None of the above. 5. A Java file with

ANNUAL REVIVAL, ANNIVERSARY, AND INSTALLATION SERVICE REVIVAL SERVICE Wednesday, November 28, 2012 – Friday, November 30, 2012 7:00 P.M. - NIGHTLY THEME: “Changing the Method, Not the Message” 1 Corinthians 9: 20-23 ANNIVERSARY AND INSTALLATION SERVICE Sunday, December 2, 2012 4:00 P.M. THEME: “Changing the Method, Not the Message” 1 Corinthians 9: 20-23 Fort Foote Baptist Church .