Gauging ADF Application Performance: Instrumenting Your Code

Similar documents
Build a Mobile App in 60 Minutes with MAF

Mobilize Your Users Now with Oracle Mobile Application Framework (MAF)

Build Mobile Cloud Apps Effectively Using Oracle Mobile Cloud Services (MCS)

To Cache or not to Cache; and How?

Build a Mobile App in 60 Minutes with MAF

Apex 5.1 Interactive Grid and Other New features

What s Old is New Again:

Exploring Edition-Based Redefinition

NYC Metro Area Oracle Users Group Day

J2EE Development Best Practices: Improving Code Quality

Quick Web Development using JDeveloper 10g

FILE XML DATABASE DEVELOPERS ORACLE 11G MANUAL EBOOK

Thank you for joining us for today s webinar:

New Features in PL/SQL for Oracle 11g

Peter Moskovits Principal Product Manager Oracle Corporation. Sue Vickers Group Manager Oracle Corporation

Rhapsody Interface Management and Administration

Software Engineering

Whitepaper Measuring, Analyzing, Tuning, and Controlling the Performance of Oracle ADF Applications

Spice Up Your iseries Applications with ABLE. By Jake Kugel - IBM

Oracle Fusion Middleware 11g: Build Applications with ADF I

Speech 2 Part 2 Transcript: The role of DB2 in Web 2.0 and in the IOD World

NetBeans IDE Field Guide

JDeveloper. Read Lotus Notes Data via URL Part 4

3 Getting Started with Objects

Take Your Oracle Forms on the Road Using ADF Mobile. Mia Urman, OraPlayer & Denis Tyrell, Oracle Corporation

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Introducing Oracle R Enterprise 1.4 -

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

The Evolution of Java Persistence

BEAJRockit Mission Control. Method Profiling

Using Microsoft Visual Studio to Create a Graphical User Interface

Object-Oriented Software Engineering Practical Software Development using UML and Java

Apex 5.1 Interactive Grid and Other New features

ADF Code Corner How-to further filter detail queries based on a condition in the parent view using ADF BC. Abstract: twitter.

Supports 1-1, 1-many, and many to many relationships between objects

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

Oracle Fusion Middleware 11g: Build Applications with ADF I

INF 111 / CSE 121. Homework 3: Code Reading

Developing, Debugging, and Optimizing GPU Codes for High Performance Computing with Allinea Forge

Agenda Birds Do It: Migrating Forms to Java EE Web A Case Study

Developing Applications with Business Intelligence Beans and Oracle9i JDeveloper: Our Experience. IOUG 2003 Paper 406

Oracle Standard Management Pack

CS 580 Client-Server Programming Fall Semester, 2005 Doc 12 Configuration Files & Logging Contents

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Contract Information Management System (CIMS) Technical System Architecture

Protection! User Guide. A d m i n i s t r a t o r G u i d e. v L i c e n s i n g S e r v e r. Protect your investments with Protection!

Where Do We Go From Here? Why Many IT Staff are Living in the Past

Oracle JDeveloper/Oracle ADF 11g Production Project Experience

Software Engineering

MAKING THE BUSINESS CASE MOVING ORACLE FORMS TO THE WEB

CS211 Lecture: The User Interface

CPS122 Lecture: The User Interface

Oracle Developer Day

The one bit everyone forgets: with JUnit. John Stegeman Xchanging

Web Application Expectations

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

BEAWebLogic Server. Introduction to BEA WebLogic Server and BEA WebLogic Express

Question No: 1 In which file should customization classes be specified in the cust-config section (under mds-config)?

Oracle Data Integrator 12c: Integration and Administration

Using SQL Developer. Oracle University and Egabi Solutions use only

VA Smalltalk Update. John O Keefe Principal Smalltalk Architect Instantiations, Inc. Copyright, Instantiations, Inc.

Expanding an ICM SQL Database

Artix Orchestration Release Notes. Version 4.0, June 2006

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

Title: Using BPEL with ESB for Loose Coupling of Business Process

May 22, 2013 Ronald Reagan Building and International Trade Center Washington, DC USA

Just Get it Written: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console. Don t get it right, just get it written.

JAVA Programming Practice Course Overview Lecture Schedule Today s Task Contact

Facilitator Guide: Programme X x time

LOAN IQ DIAGNOSTIC TOOLS Topic of the Month FusionBanking Loan IQ

ORACLE DATA SHEET KEY FEATURES AND BENEFITS ORACLE WEBLOGIC SUITE

Don t get it right, just get it written.

Senior Technical Specialist, IBM. Charles Price (Primary) Advisory Software Engineer, IBM. Matthias Falkenberg DX Development Team Lead, IBM

Using Thick Database Principles to Leverage Oracle SQL and PL/SQL Part III:

Java Programming Lecture 7

Seminar report Software reuse

De La Salle University Information Technology Center. Microsoft Windows SharePoint Services and SharePoint Portal Server 2003

Implement an ADT while using Subversion

CIO 24/7 Podcast: Tapping into Accenture s rich content with a new search capability

Chapter 15: Using GemStone/S 64 Bit in a VMware Appliance

What's Perking? An Introduction to Java John Jay King King Training Resources, USA

Introduction to IOUG Calgary Oracle Users Group Meeting 2012

How to instrument your code easy and effectively

Cloverleaf Education Webinar Debugging your translations with the Cloverleaf Translate Debugger

Audio is in normal text below. Timestamps are in bold to assist in finding specific topics.

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Oracle Middleware 12c: Build Rich Client Applications with ADF Ed 1 LVC

ADF Code Corner. 65. Active Data Service Sample Twitter Client. Abstract: twitter.com/adfcodecorner

EclipseLink. Solutions Guide for EclipseLink Release 2.6. June Beta Draft

7 Tips for Raising The Quality Bar With Visual Studio 2012

Manipulating Database Objects

Oracle 12c New Features For Developers

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

1 Introduction to Oracle WebLogic Server

Just Get it Written: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console. Don t get it right, just get it written.

AMIS on Fusion Middleware

Oracle Forms Modernization Through Automated Migration. A Technical Overview

Oracle Warehouse Builder 10g Runtime Environment, an Update. An Oracle White Paper February 2004

Table of Contents VSSI VMware vcenter Infrastructure...1

Transcription:

Gauging ADF Application Performance: Instrumenting Your Code Presented by: John Jay King Download this paper from: http://www.kingtraining.com 1

Session Objectives Learn how Oracle and Oracle WebLogic server support tuning instrumentation Be able to instrument ADF to track performance Use performance tracking data to improve ADF application performance 2

Who Am I? John King Partner, King Training Resources Oracle Ace Director Member Oak Table Network Providing training to Oracle and IT community for over 25 years http://www.kingtraining.com Techie who knows Oracle, ADF, SQL, Java, and PL/SQL pretty well (along with other topics) Member of AZORA, ODTUG, IOUG, and RMOUG 3

Planes Have Instruments: Why? Most of us have been aircraft passengers (probably recently) Aren t you glad the plane s crew had instruments to monitor things? Would you trade the cost/complexity of the instruments for the loss of information? 4

Code Instrumentation Instrumentation is the thoughtful act of creating code that allows monitoring and measurement of execution to facilitate debugging and performance improvement Instrumentation provides: Meaningful information about what, where, and why something is happening Timing information in useful increments Logs are a key tool used to provide instrumentation output 5

Instrumentation Advocates Two (among many) Oracle performance experts who advocate instrumentation: Cary Millsap https://method-r/fogbuz.com/default.asp?w265 Tom Kyte http://tkyte.blogspot.com/2005/06/ instrumentation.html 6

Tracking How do you know if your application is running properly? Correctness of input/output processing Execution speed within user targets When is the cost too high? Tracking everything all the time provides mountains of not-very-useful data and can impede normal execution Maybe; tracking should be switchable to be enabled when needed and disabled when not 7

Tuning What is acceptable performance? Have your users provided reachable targets? If something takes too long it s important to know where time is spent Instrumentation must provide meaningful information about when processes begin, when they end, and how long the activities being performed last Once problem areas are highlighted specific issues may be addressed 8

Instrumentation Strategies You need a strategy Too little instrumentation; can t use it Too much instrumentation; masses of data that are hard to use How will instrumentation take place? Home-grown? Using Oracle built-in facilities? Using vendor-provided facilities? some combination of the above? 9

Say No to System.out.println Many Java developers use console output via System.out.println for rudimentary instrumentation during testing Production system consoles are often unmonitored Production system consoles (today) are often part of a virtualized server; never to be seen Instrumentation needs to survive the ups and downs of the JVM and be broadly available; logging provides many options 10

Logging You shouldn t use online debug in production Traditionally, IT uses logging as a preferred method for collecting information about application effectiveness and efficiency ADF exists in the Java world where several logging tools are available including: Java SE java.util.logging Log4J Apache Commons Logging ADFLogger built into ADF 11

Planning for Logs Where will logs go? (console/xml/text/etc.) What level of Detail/Content? Name of package & name of module Name of method/procedure/function Variable and parameter values in use at time Applicable error messages/codes (Messages and/or codes?) Date and time Who will consume the log? Is translation needed? (user/admin/dba/support) 12

ADFLogger Oracle s ADF team recognized the need for instrumentation and provided ADFLogger ADFLogger provides a log mechanism fully integrated with ADF via java.util.logging under the covers with added functionality ADFLogger works effectively both within JDeveloper and from Enterprise Manager ADFLogger may be switched on and off without restart 13

ADFLogger Levels Like most logging tools; ADFLogger divides log entries into several classifications: SEVERE (fewest log entries) WARNING INFO CONFIG FINE FINER FINEST (most log entries) 14

Useful ADFLogger Methods ADFLogger provides some methods of its own in addition to those inherited from java.util.logging; including: begin() end() log() severe(), warning(), info(), config(), fine(), finer(), finest() 15

ADFLogger Complexity Several ADFLogger methods and constructors require HashMap input parameters It is probably simplest to create a utility method, interface and/or superclass class for your team rather than having everyone build basic logging logic themselves 16

ADF & WebLogic ADF is fully integrated into WebLogic; including ADFLogger and its tooling A logging.xml file describe ADFLoggers, their default level, and the handlers used for them JDeveloper has dialog-based configuration via Oracle Diagnostics Logging Configuration JDeveloper also has Oracle Diagnostic Log Analyzer tool to review log output Production support via Enterprise Manager (farm->weblogicdomain->appcluster->yourserver->logs) 17

JDeveloper Logging: 1 First open Window->Application Servers if it is not already open (11g: View-> Application Server Navigator) 18

JDeveloper Logging, 2 Next use IntegratedWebLogicServer s context menu (right-click) and choose Configure Oracle Diagnostics Logging 19

JDeveloper Logging, 3 ADFLogger is configured with logging.xml file; click the source tab to manipulate the XML or use the panel displayed (preferred) 20

Add Custom Logger, 1 To add your own logger click the green plus sign icon and choose whether to create a persistent or transient logger Persistent logger Stays after WebLogic shutdown Transient logger Available until WebLogic shutdown 21

Add Custom Logger, 2 Name the logger; if you enter a Java class name the class name and its package name will be used to identify log entries 22

Add Custom Logger, 3 You may also use a textual name; take time to plan what serves you best Choose the default level for messages associated with this logger 23

Adding Custom Logger, 4 Custom logger(s) show in the configuration dialog with the Oracle-provided loggers 24

Enable Built-In Loggers Oracle has instrumented just about everything; probably too many choices A good base set is oracle.adf, oracle.adfinternal, and oracle.jbo (set level) 25

Step No Longer Needed? When using the built-in configuration tool; a runtime setting is automatically set; in earlier versions of ADF this required a restart of WebLogic (sometime still useful) 26

Built-In Log Analyzer, 1 Use the Tools menu and select the Oracle Diagnostic Log Analyzer to open 27

Built-In Log Analyzer, 2 Choose which loggers and levels to view: 28

Using Tracking Data, 1 Select By ADF Request for details, times, and percentages 29

Using Tracking Data, 2 Select By Log Message to see very detailed specifics 30

Using Tracking Data, 3 31

Save Logs to File Use JDeveloper s preferences to save logs to a file in text form (probably increase maximum log lines, default is 300) JDeveloper->Preferences->Environment->Log (11g: Tools->Preferences->Environment->Log) 32

Log File Output ADF generates a text file that looks like: 33

SQL Statement Log Default oracle.jbo logging shows SQL 34

Custom Logging Here is some code added to view object implementation class when salary changes private static ADFLogger mylogger = ADFLogger.createADFLogger(EmpImpl.class); public void setsal(bigdecimal value) { mylogger.info("salary for employee " + this.getempno().tostring() } + " changed to " + value.tostring()); setattributeinternal(sal, value); 35

Enable Custom Logging Use Oracle Diagnostics Logging Config. 36

Custom Logging Output 37

Related Output Use drop-down to select related output 38

Custom Timing Entries When the built-in instrumentation isn t what you need; you can add timing yourself 39

Custom Timing, 2 Checking if Logging enabled public void executequery() { Long startmillis = System.currentTimeMillis(); Long endmillis = 0L; Long elapsedmillis = 0L; super.executequery(); if (mylogger.isloggable(level.info)) { } endmillis = System.currentTimeMillis(); elapsedmillis = endmillis - startmillis; mylogger.log("sql execution + elapsedmillis); } 40

Enterprise Manager Support When executing in production environments; Enterprise Manager provides the ability to view WebLogic s logging data: 1. Open the server farm 2. Select WebLogicDomain 3. Select appcluster 4. Choose the desired WebLogic server 5. Select logs to see options to turn logging on/off or to view logs 41

Use Make Buy Instrumentation is easy, we have 3 choices: Use Oracle s built-in logging is vast and provides great detail Make Use ADFLogger to grow your own (use superclasses to make it reusable) Buy Frank Houweling from Amis has created an ADF Performance Monitor Tool (I have not tested it thoroughly; but it seems to work well) More information is available at: http://www.amis.nl/adfperformancemonitor 42

Wrapping it all Up Instrumentation is the key to debugging, tracking, and tuning ADF applications ADFLogger provides comprehensive logging ability out of the box JDeveloper provides GUI-based support for ADFLogger configuration and use Occasionally, it will be useful to create a home-grown ADFLogger; but, the built-in tools will work with that too 43

RMOUG Training Days 2016 February 9-11, 2016 (Tuesday-Thursday) Denver Convention Center 44

COLLABORATE 16 IOUG Forum April 10 14, 2016 Mandalay Bay Las Vegas, NV 45

46

Please Complete Session Evaluations Session 779 Gauging ADF Application Performance: Instrumenting Your Code To contact the author: John King King Training Resources P. O. Box 1780 Scottsdale, AZ 85252 USA 1.800.252.0652-1.303.798.5727 Email: john@kingtraining.com Today s slides are on the web: http://www.kingtraining.com 47 Thanks for your attention!

End 48