SelfDiagnose “who is to blame” ernest micklei, April 2007.

Slides:



Advertisements
Similar presentations
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
Advertisements

JSP and web applications
Web Development with Karsten Schulz Terp-Nielsen Master Principal Sales Consultant Oracle Denmark.
Oracle Fusion Middleware 11g Abhishek Khanolkar. What is Oracle Fusion? “Oracle Fusion Middleware is a ‘preintegrated’ portfolio of customer- proven software.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
Basics of JNDI Alessio Bechini June Naming and Directory Services: Rationale A fundamental element in every application is the capability to find.
Current Topics in Programming Languages Lecture 15_1 George Koutsogiannakis SUMMER
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
ECE356 – Database Systems Lab 1 – Building a Web Project with NetBeans Tiuley Alguindigue Lab Instructor – University of Waterloo, E & CE Dept. Fall 2013.
Using Ant to build J2EE Applications Kumar
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
Java Frameworks Indy Java Users Group January 29, 2003.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 Lecture 22 George Koutsogiannakis Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
Presented by Robert Zaremba.  Remote messages must be sent to a message queue so that components are decoupled  Both sides of a communication must be.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
AUTOBUILD Build and Deployment Automation Solution.
Tomcat Spencer Uresk. Notes This is a training NOT a presentation Please ask questions This is being recorded
Message-Driven Beans and EJB Security Lesson 4B / Slide 1 of 37 J2EE Server Components Objectives In this lesson, you will learn about: Identify features.
Java Server Pages A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format,
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
第十四章 J2EE 入门 Introduction What is J2EE ?
LogBox Enterprise Logging Brad Wood
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
Running Kuali: A Technical Perspective Ailish Byrne - Indiana University Jay Sissom - Indiana University Foundation.
Presented by: SIF3 Framework Install - Java Joerg Huber Install & Verify Instructions and Exercise.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
Java Server Pages An introduction to JSP. Containers and Components Several clients – one system.
Ibm.com /redbooks © Copyright IBM Corp All rights reserved. WP07 ITSO iSeries Technical Forum WebSphere Portal Express– Installation, Configuration.
CODELABOR Shin Sang Jae Template Guide (codelabor-flex-lcds-template)
Running Kuali: A Technical Perspective Ailish Byrne (Indiana University) Jonathan Keller (University of California, Davis)
Java Enterprise Edition Programming Page 1 of 9Configuring Servlets Web Application Context Name  In multiple web applications, a “context name” is used.
Enterprise Java v090125Dev Env Overview1 Enterprise Java ( ) Development Environment Overview.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Test it! Unit, mocking and in-container Meet Arquillian! Ivan St. Ivanov.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Chapter 12© copyright Janson Industries Java Server Faces ▮ Explain the JSF framework ▮ SDO (service data objects) ▮ Facelets ▮ Pagecode classes.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Advanced Java Session 5 New York University School of Continuing and Professional Studies.
Enterprise JavaBeans: Fundamentals. EJB Fundamentals(c)CDAC(Formerly NCST)2 Contents Introduction Technology Overview EJB Architecture EJB Specification.
IBM Express Runtime Quick Start Workshop © 2007 IBM Corporation Deploying a Solution.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Using Ant in Eclipse Dwight Deugo Nesa Matic
IBM Software Group ® WebSphere ® Support Technical Exchange Transactions in WebSphere Process Server Lalitha Chandran.
#SummitNow Dynamic Data List Driven Constraints in Share November 14 th, 2013 Tony Parzgnat – Technology Services Group.
CS320 Web and Internet Programming Introduction to Java Servlets Chengyu Sun California State University, Los Angeles.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
CS3220 Web and Internet Programming Introduction to Java Servlets
RAD – 255 Certification Overview
z/Ware 2.0 Technical Overview
Web Services-JAX-RPC JAX-RPC enables a Web Service endpoint to be developed using either a Java Servlet or Enterprise JavaBeans (EJB) component model.
Knowledge Byte In this section, you will learn about:
J2EE Application Development
J2EE Lecture 13: JMS and WebSocket
WebSphere & EJB’s Experiences, Deployment & Best Practices
Plug-In Architecture Pattern
Presentation transcript:

SelfDiagnose “who is to blame” ernest micklei, April 2007

selfdiagnose.sourceforge.net Overview  Motivation  Introduction  Demo  Quick steps  Expert use

selfdiagnose.sourceforge.net Motivation  Some application problems are related to: Configuration Availability  Logging not always pinpoints the cause level (debug) exception encapsulation “only when it happens”

selfdiagnose.sourceforge.net Problem causes  Non-matching names in JNDI  Absent properties, files  Missing bindings in JNDI  No access to database,queue,host  Missing classes on runtime classpath  Missing System properties  ….

selfdiagnose.sourceforge.net Problem revealings  An error has occurred  SEVERE Could not start /myapp  DB2 SQL-ERROR  Log4j shutting down

selfdiagnose.sourceforge.net Who wants to know?  Development Is my configuration correct?  Application Server admin Is their configuration correct? Is my deployment script correct?  Maintenance Are all (detectable) resources available?  Functional Maintenance

selfdiagnose.sourceforge.net SelfDiagnose  SelfDiagnose is a library of diagnotistic tasks that can verify the availability of resources  Application “itself” runs diagnose  Open-source Java project since 2006 selfdiagnose.sourceforge.net

Task  A DiagnosticTask verifies the availability of a resource required for the execution of an application  Availability Deployment (configuration only) Runtime (execution only)

selfdiagnose.sourceforge.net Example: Property  Configuration key present? does value matches pattern?  Availability classpath,JNDI <checkresourceproperty name="environment.properties" property="ProviderStoreDB4O.bin" />

selfdiagnose.sourceforge.net Example: Datasource  Configuration JNDI name, Driver, User, Access  Available host reachable?, connectable? <checkdatasourceconnectable name="jdbc/oracle/ubs_userBeheerService-ubsDs"/>

selfdiagnose.sourceforge.net Example: Table exists  Configuration Table name  implies CheckDatasourceConnectable <checkdatabasetableexists name="UBS_CONTEXT" datasource="jdbc/oracle/ubs_userBeheerService-ubsDs“ database=“oracle” />

selfdiagnose.sourceforge.net Example: JMS  JMS Queue Configuration  JNDI name, Queue name, CCSID Availability  connectable? <checkjndibinding name="jms/mq/ubs_userBeheerServiceQCf" class="javax.jms.QueueConnectionFactory"/>

selfdiagnose.sourceforge.net Example: URL  Host reachable? Glue servlet mailserver other Webservice …

selfdiagnose.sourceforge.net Example: JMX  Managed Bean property value set? does value matches pattern?  Dangerous (if accessible at all) <checkmbeanproperty mbeanfactory="com…..AdminServiceFactory" query="WebSphere….ontvangenBLIBerichtLp,*" method="isStarted" pattern="true" />

selfdiagnose.sourceforge.net Example: MDB  EJB Message Driven Bean Configuration  JNDI Availability  process running?  (currently IBM WebSphere 5+ only)

selfdiagnose.sourceforge.net Design  DiagnosticTask  Configuration  Reporting

selfdiagnose.sourceforge.net DiagnosticTask  Initialize Load configuration parameters  Setup Verifiy parameters  Run Execute check using parameters Report to DiagnosticTaskResult

selfdiagnose.sourceforge.net Configuration  XML  Java private final static String MAPS_URL = Check.property(“environment.properties”, “google.maps.url”’); <selfdiagnose xmlns=" xmlns:xsi=" xsi:schemaLocation= "

selfdiagnose.sourceforge.net Reporting  Log4j  SelfDiagnoseServlet remote invocation of SelfDiagnose.run() Formats: HTML,XML,plain 2007-Apr-16 11:03: […] INFO SelfDiagnose - JNDI binding [url/config/ubs_userBeheerService/config] of type [java.net.URL] is available in naming server - /appl/was00t/WebSphere/AppServer/installedApps/was00tcell /ubs_userBeheerService.ear/ubs_UserBeheerServiceWeb.war/ selfdiagnose.xml

selfdiagnose.sourceforge.net Reporting II  for each result Task name Status {passed,failed,error} Message Requestor  = what component added the task

selfdiagnose.sourceforge.net Quickstart  Add Maven dependency  Add Servlet to Web Descriptor  Define selfdiagnose.xml

selfdiagnose.sourceforge.net Maven dependency  project.xml com.philemonworks selfdiagnose 1.0 jar true

selfdiagnose.sourceforge.net Servlet Descriptor selfdiagnose com.philemonworks.selfdiagnose.SelfDiagnoseServlet selfdiagnose /selfdiagnose

selfdiagnose.sourceforge.net selfdiagnose.xml (example) <checkdatasourceconnectable name="jdbc/oracle/ubs_userBeheerService-ubsDs"/> <checkdatabasetableexists name="UBS_CONTEXT" datasource="jdbc/oracle/ubs_userBeheerService-ubsDs"/> <checkjndibinding name="jms/mq/ubs_userBeheerServiceQCf" class="javax.jms.QueueConnectionFactory"/>

selfdiagnose.sourceforge.net Expert use  Variables  Custom Reports  Custom task

selfdiagnose.sourceforge.net Variables  Capture result of a task  Do other checks on that result <checkjndibinding name="url/config/ubs_userBeheerService/config" class="java.net.URL" var="config"/>

selfdiagnose.sourceforge.net Custom Reporting  XML report + custom XSL /selfdiagnose?format=xml&xsl=xsl/selfdiagnose.xsl

selfdiagnose.sourceforge.net Custom Task package com.mybusiness.myproduct; public class MyTask extends DiagnosticTask { public String getDescription() { … } public void initialize(Attributes attributes) { … } public void run(ExecutionContext ctx, DiagnosticTaskResult result) { … } } <task class=“com.mybusiness.myproduct.MyTask”> my-parameter1=“my-value1” />

selfdiagnose.sourceforge.net Example: CheckWSDL public class CheckWSDL extends DiagnosticTask { private String url; public String getDescription(){ return “checks that an URL refers to a WSDL”; } public void initialize(Attributes attributes) { url = attributes.getValue(“url”); } public void run(ExecutionContext ctx, DiagnosticTaskResult result) { URL newURL = new URL(url); URLConnection newCon = newURL.openConnection(); … result.setPassedMessage( "URL ["+newURL+"] is reachable and ” + “WSDL content could be retrieved."); }

selfdiagnose.sourceforge.net CheckWSDL config <task class=“CheckWSDL”> url=“/context/Money4NothingService.wsdl” />

selfdiagnose.sourceforge.net Testing SelfDiagnose  Is my configuration correct?  Add SelfTest class to your TestSuite

selfdiagnose.sourceforge.net Wrapup  SelfDiagnose provides simple means for: Auto check of configuration Auto check availability of resources On demand report on “condition” of application

selfdiagnose.sourceforge.net Contribute  Improve tasks + new  Documentation  More tests  Dashboard mailto:

selfdiagnose.sourceforge.net UML