JPManager: A J2EE PERFORMANCE MANAGEMENT SYSTEM Jiang Guo Department of Computer Science California State University Los Angeles March 24, 2010
Background J2EE is widely used in enterprise scale application Performance management of J2EE application is a challenge issue A tool is developed to solve the problem based on Java instrumentation
Two End-to-end Monitoring Tools Non-intrusive Ghost Transaction Simulates the scenarios of user interactions intrusive Java Instrumentation Insert extra Java codes into the applications
Benefit of Java Instrumentation Collecting executing information at low level Make fine-grained measurements into the application structure
Dynamic or Static Dynamic – Java Instrumentation Can deal with third party classes from remote side Static – Aspect Programming Only deal with classes with source code
J2EE-based Enterprise Applications Browsers IE, Firefox Applets JavaScripts HTML Clients FiltersFilters Web Servers Apache, Tomcat Web Servers Servlets JSPs EJB Containers JBoss, WebLogic Application Servers EJBs JDBCs DB Servers MySQL … Legacy Systems Remote Classes
The Architecture of JPManager
Data Collection Agent of JPManager Java Virtual Machine Java Application Environment (Tomcat, JBoss, WebLogic) Target Application Servlets, JSP, EJBs, Threads Data Collection Agents Instrumenter Applicatoin Class Instrumentation Profile Metrics Information: Class Metrics Thread Metrics DCA Metric Provider
Two instrumentation methods Class Intercepting Instrument the byte code by changing the hierarchy of class inheritance. Method Hijacking Instrument the byte code by adding new methods to classes or new probe codes to the methods.
Java Virtual Machine Components Class loaders Class file verifier Execution engine
The Delegation of Class Loaders Primary Class Loader Extension Class Loader Application Class Loader User Defined Class Loader
Data Flow of the Instrumentation Modified ClassLoader Instrumentation Profile DCA Instrumenter Instrumented Classes Metrics Information DCA Metric Provider Application Classes JVM Execution Engine Dynamic Information JPManager Server JVM
Steps of the Java Instrumentation
Analysis of Java Instrumentation (1) Static Structure Consistency instrumentation : R = x, v [P.start(x) = R.start(x) v before L P.ValueOf(v) = R.ValueOf(v)] x, v [P.start(x) = R.start(x) w after L P.ValueOf(w) = R.ValueOf(w)] Dynamic Execution Consistency Object o can be described by a six-tuple = (S, s0, Mcall, T, )
Analysis of Java Instrumentation (2) is o life space S is a finite set of states of object s0 is a single start state of the object s0, this state is usually created by new. Mcall is a set of method calls T is a set of valid timestamps is a mapping
Execution of the WEB Store Application
Conclusions (1) Most commercial J2EE tools focus on service transactions database servers directory services application servers themselves
Conclusions (2) Our tool support monitoring and analyzing the J2EE components and APIs Can monitor all Java based systems
Thank you!