Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/DesignDocs/332312"

m (Extensibility Support)
 
(31 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
| Michael O'Brien
 
| Michael O'Brien
 
| 1.0 Initial draft started
 
| 1.0 Initial draft started
 +
|-
 +
| 20151004
 +
| Lukas Jungmann
 +
| 1.1 Revisited initial draft
 
|}
 
|}
  
Line 20: Line 24:
 
*There are two issues to this enhancement that separately deal with management and diagnostics reporting.   
 
*There are two issues to this enhancement that separately deal with management and diagnostics reporting.   
 
====Management API====
 
====Management API====
*Our existing runtime JMX management API that is exposed through the services MBean in any of the SUN JConsole, JRockit JRMC, Oracle JRF Enterprise Manager or JBoss web based console is sufficient but needs to be enhanced.
+
*Our existing runtime JMX management API that is exposed through the services MBean in any of the JConsole, Java Mission Control (JMC), Oracle JRF Enterprise Manager or JBoss web based console is sufficient but needs to be enhanced.
 
====Diagnostics API====
 
====Diagnostics API====
*Our existing runtime performance monitoring API could be enhanced with more JVM reporting - ideally that would not itself add overhead.  This type of monitoring is currently done with JRockit - however it does not specifically target the JPA runtime API.
+
*Our existing runtime performance monitoring API could be enhanced with more JVM reporting - ideally that would not itself add overhead.  This type of monitoring is currently done with Java Mission Control - however it does not specifically target the JPA runtime API.
  
 
==Scope==
 
==Scope==
Line 37: Line 41:
 
===L2 Cache===
 
===L2 Cache===
 
===JDBC Database Configuration===
 
===JDBC Database Configuration===
===Extensibility and Multitenancy===
+
===Extensibility and Multi-Tenancy===
*Management of shared schemas
+
*Management of shared schemas at design-time and runtime including DDL generation support for modified schemas.
 +
*We need to integrate with work done for [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy] - which is a specific implementation of the Extensibility API
 +
*We need to integrate with work done for [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility] - which is a general API for extending a schema at static (design-time) or dynamic(run-time). Multi-Tenancy is one implementation of this API.
  
 
==Requirements==
 
==Requirements==
Line 60: Line 66:
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=266016 266016: JMX: MBeans: Add session and metadata runtime modification capability to runtime services mbeans]
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=266016 266016: JMX: MBeans: Add session and metadata runtime modification capability to runtime services mbeans]
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=317991 317991: JMX: initializeIdentityMap(className) requires unset EMPTY_STRING input validation handler to avoid ClassNotFoundException]
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=317991 317991: JMX: initializeIdentityMap(className) requires unset EMPTY_STRING input validation handler to avoid ClassNotFoundException]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=320431 320431: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=320431 320431: JMX: Merge Core and SDO support for the JMX MBean API ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=320684 320684: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=320684 320684: JMX: Add reflective API as backup for module/application name derivation via classloader toString parsing ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=321229 321229: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=321229 321229: JMX: Add documentation for new MBean jmx.moduleName/jmx.applicationName persistence unit property override ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=322288 322288: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=322288 322288: JPA: GlassFish V3 tutorial requires completion for Eclipse 3.6 and NetBeans 6.9 IDEs]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=325893 325893: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=325893 325893: JMX: no descriptions for TopLink MBean attributes & operations ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=325901 325901: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=325901 325901: JMX:java.rmi.UnmarshalException when invoking "getObjectsInIdentityMap" and "getObjectsInIdentityMapSubCacheAsMap" ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=326004 326004: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=326004 326004: JMX: invalidateIdentityMaps() and InitializeIdentityMaps() are grayed out on WebLogic for SUN JRE (jconsole) only - JRockit is OK ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=330095 330095: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=330095 330095: JMX: Add MBean support for new [eclipselink.logging.parameters] parameter binding log/exception hiding security feature ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333160 333160: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333160 333160: JMX: ModuleName string extraction code does not handle -1 not found index in 3 of 5 cases ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333161 333161: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333161 333161: JMX: Automated server testing of MBean attributes specifically application and module name ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333197 333197: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333197 333197: Container testing requires multiple DI/Bootstrap application/container-managed EAR(EJB/WAR with SSB)/EAR(WAR only) test applications ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=334468 334468: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=334468 334468: WebLogic Server 10.3.4: Update all JTA container managed JPA 2.0 wiki/bug/newsgroup-question content ]
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333368 333368: ]
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=333368 333368: Server Test: container managed apps require Security Manager enabled testing for GlassFish,WebLogic, WebSphere, JBoss ]
 +
*[http://bugs.eclipse.org/337029 337029]: Provide interface to Performance Monitor API
 +
*[http://bugs.eclipse.org/337030 337030]: Provide interface to Data Partitioning API
 +
*[http://bugs.eclipse.org/337031 337031]: Provide interface to Extensibility API
 +
*[http://bugs.eclipse.org/337032 337032]: Provide interface to Extensibility API
 +
*[http://bugs.eclipse.org/337033 337033]: Provide interface to Metamodel API
  
 
===Requirements Details===
 
===Requirements Details===
Line 81: Line 92:
 
**R2.2: Expand support for JMX management of JPA based applications to JEE6 EJB3.1 container managed deployments
 
**R2.2: Expand support for JMX management of JPA based applications to JEE6 EJB3.1 container managed deployments
 
**R2.2: ''(WebLogic)'' Integration points for weblogic.management.runtime '''WLSRuntimeMBeans'''
 
**R2.2: ''(WebLogic)'' Integration points for weblogic.management.runtime '''WLSRuntimeMBeans'''
 +
**R2.3: Expand support for JMX management of JPA based applications to JEE7
 
*R3: Manageability Requirements
 
*R3: Manageability Requirements
 
**R3.1: Make MBeans change session aware - may not be an issue unless we are classified as configuration MBeans
 
**R3.1: Make MBeans change session aware - may not be an issue unless we are classified as configuration MBeans
Line 86: Line 98:
 
**R3.3: Identify Key metrics?
 
**R3.3: Identify Key metrics?
 
*R4: Performance Tracking Requirements
 
*R4: Performance Tracking Requirements
**R4.1: ''(WebLogic)'' JRockit Mission Control Integration
+
**R4.1: Java Mission Control Integration
**R4.2: ''(WebLogic)'' JRMC Flight Recorder integration
+
**R4.2: JMC Flight Recorder integration
 
**R4.3: ''(WebLogic)'' Oracle Diagnostics Logging ([http://download.oracle.com/docs/cd/E14571_01/core.1111/e10105/logs.htm#ASADM217 ODL]) usage/integration
 
**R4.3: ''(WebLogic)'' Oracle Diagnostics Logging ([http://download.oracle.com/docs/cd/E14571_01/core.1111/e10105/logs.htm#ASADM217 ODL]) usage/integration
 
**R4.4: Expose Runtime monitoring through a new MBean or the new generic PerformanceProfiler MBean
 
**R4.4: Expose Runtime monitoring through a new MBean or the new generic PerformanceProfiler MBean
 
***This MBean would be exposed in EM?
 
***This MBean would be exposed in EM?
**R4.4: Multicore utilization or thread parallelism API
+
**R4.5: Multicore utilization or thread parallelism API
 
*R5: Performance Analytics Requirements
 
*R5: Performance Analytics Requirements
 
**R5.1: ''(WebLogic)'' JRMC Runtime Analyser integration - to interpret JRMC-FR results
 
**R5.1: ''(WebLogic)'' JRMC Runtime Analyser integration - to interpret JRMC-FR results
Line 113: Line 125:
  
 
*R20: Extensibility Management (20110321)
 
*R20: Extensibility Management (20110321)
**R20.1: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy]
+
**R20.1: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy] - a specific implementation of the [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility] API
**R20.2: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility]
+
**R20.2: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility] - a generic API for Descriptor and Schema changes at design-time or run-time
 
+
* R21: Performance Monitor Integration
 +
**Add API to work with the new [http://wiki.eclipse.org/EclipseLink/DesignDocs/321763 321763 Performance Monitor] introduced in EclipseLink 2.2
 
*Introduce Admin Role MBeans
 
*Introduce Admin Role MBeans
 
*Investigate Scripting support for configuration changes (WLS for WebLogic, Python for WebSphere, ? for JBoss, ? for GlassFish)
 
*Investigate Scripting support for configuration changes (WLS for WebLogic, Python for WebSphere, ? for JBoss, ? for GlassFish)
*
+
* R22: Data Partitioning Integration
 +
**Provide interface for the [http://bugs.exlipse.org/328937 328937]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/328937 Data Partitioning] API in EclipseLink 2.2
 +
* R23: Expose Metamodel API via JMX
 +
**See [http://bugs.eclipse.org/337033 337033]
 
====WebLogic Specific Requirements====
 
====WebLogic Specific Requirements====
 
*WebLogic Server has several monitoring API join points that we can use either at the WebLogic MBean level or through events exposed to JRMC for servers running on the JRockit JVM.  We will need to work closely with the WLS team to finalize the interfaces between EclipseLink and WLS.
 
*WebLogic Server has several monitoring API join points that we can use either at the WebLogic MBean level or through events exposed to JRMC for servers running on the JRockit JVM.  We will need to work closely with the WLS team to finalize the interfaces between EclipseLink and WLS.
Line 132: Line 148:
 
*Ideally, any new API should be available to all supported EE servers (not just WebLogic) and optionally SE clients.
 
*Ideally, any new API should be available to all supported EE servers (not just WebLogic) and optionally SE clients.
 
*R: Expose PerformanceProfiler/PerformanceMonitor events through a new MBean generic to all EE servers
 
*R: Expose PerformanceProfiler/PerformanceMonitor events through a new MBean generic to all EE servers
 +
*R: Expose PerformanceProfiler/PerformanceMonitor events through a Java Flight Recorder API/Events
  
 
===Constraints===
 
===Constraints===
Line 215: Line 232:
 
*What exactly is the magic number of virtual machines that are needed for a particular application in order that a performance gain will happen if we switch to an L2 cache.
 
*What exactly is the magic number of virtual machines that are needed for a particular application in order that a performance gain will happen if we switch to an L2 cache.
 
*Does warming of the cache improve read performance.
 
*Does warming of the cache improve read performance.
 +
===Performance Monitor===
 +
*Provide interface for the [http://wiki.eclipse.org/EclipseLink/DesignDocs/321763 321763 performance monitor] changes in EclipseLink 2.2
 +
===Data Partitioning===
 +
*Provide interface for the [http://bugs.exlipse.org/328937 328937]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/328937 Data Partitioning] API in EclipseLink 2.2
 +
 
===Multi-Tenancy Support===
 
===Multi-Tenancy Support===
 
*R20.1: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy] - which is a specific implementation of the Extensibility API
 
*R20.1: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy] - which is a specific implementation of the Extensibility API
Line 220: Line 242:
 
===Extensibility Support===
 
===Extensibility Support===
 
*R20.2: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility] - which is a general API for extending a schema at static (design-time) or dynamic(run-time). Multi-Tenancy is one implementation of this API.
 
*R20.2: Integrate with work for [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility] - which is a general API for extending a schema at static (design-time) or dynamic(run-time). Multi-Tenancy is one implementation of this API.
 +
*For example see the section in the [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601#Example_2 Use case] where the user of the Extensibility API makes changes at runtime to the existing schema by adding a relationship via to be determined set of new attributes or functions in the JMX management interface.
 +
*Currently the '''Add''' action is supported.  '''Delete''' and '''Update''' are not supported yet without an application shutdown.
 +
====Extensibility via Flex Columns====
 +
*Any new JMX API introduced into EclipseLink will follow the API exposed by the <font color="red">'''ExtensionManager'''</font> in the [http://wiki.eclipse.org/EclipseLink/DesignDocs/340192 340192 design document].
 +
 +
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 +
! JMX API function
 +
! Extensibility API function
 +
! Notes
 +
|-
 +
| addExtension(seqId, owningEntity, name, type )
 +
| addExtension(ExtensionProperty)
 +
| -
 +
|-
 +
| addExtension(seqId, owningEntity, name)
 +
| addExtension(ExtensionProperty)
 +
| Let EclipseLink auto choose the approprate data type
 +
|-
 +
| getExtension(id)
 +
| ?(?)
 +
| - this function lists an extension added via ''addExtension'', propagated from another client or added automatically at session creation time (possibly from persisted extensions in a previously passivated session or via '''@FlexExtension''' and '''@FlexColumn''' annotations at design time)
 +
|-
 +
| getExtensions()
 +
| getExtensionFields()
 +
| - this function lists extensions added via ''addExtension'', propagated from another client or added automatically at session creation time (possibly from persisted extensions in a previously passivated session)
 +
|-
 +
| getAvailableExtensionFields()
 +
| getAvailableExtensionFields()
 +
| - return remaining available ext fields
 +
|-
 +
| <font color="orange">''removeExtension(name)''</font>
 +
| removeExtension(name)
 +
| no effect until a redeploy
 +
|-
 +
| <font color="orange">''updateExtension(name)''</font>
 +
| -
 +
| no effect until a redeploy
 +
|}
 +
 +
*Q) It is stated that remove and update are not supported at runtime without a redeploy.  Do we mean they are supported but do not take effect until a redeploy?
 +
===R23: JPA 2.0 Metamodel Exposure via JMX===
 +
*20110321: After a quick discussion with Peter on exposing the [http://wiki.eclipse.org/EclipseLink/DesignDocs/340192#API Extensibility API] via JMX - it may be a better solution to expose the entire [http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api Metamodel] which would include any '''Extensible''' relationships added dynamically to the schema.
 +
*See [http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_108:_20110321:_Expose_JPA_Metamodel_with_Extensible_API_relationships_via_JMX_Management_API Design Issue # 108] of the [http://bugs.eclipse.org/266912 JPA 2.0 Metamodel API]
 +
*See tracking bug# [http://bugs.eclipse.org/337033 337033]
 +
====Analysis R23====
 +
*The Metamodel is generated during the predeploy of the EntityManagerFactory for the persistence unit at runtime.  There currently is internal API that can be used to regenerate the Metamodel in the case where dynamic relationships have been added to the model post-design-time.  We will need to refactor this code to support viewing new mappings that were added via th Extensibility and Multi-Tenancy API's.
 +
<source lang="java">
 +
// EntityManagerFactoryImpl.java
 +
    /**
 +
    * INTERNAL: Convenience function to allow us to reset the Metamodel in the
 +
    * possible case that we want to regenerate it. This function is outside of
 +
    * the JPA 2.0 specification.
 +
    *
 +
    * @param aMetamodel
 +
    * @since Java Persistence 2.0
 +
    */
 +
    public void setMetamodel(Metamodel aMetamodel) {
 +
        if (!this.isOpen()) {
 +
            throw new IllegalStateException(ExceptionLocalization.buildMessage("operation_on_closed_entity_manager_factory"));
 +
        }
 +
        this.setupImpl.setMetamodel(aMetamodel);
 +
    }
 +
 +
// User code
 +
emf.setMetamodel(null); // clear Metamodel
 +
emf.getMetamodel(); // regenerate Metamodel
 +
</source>
 +
 +
=====JPA dependency in Core=====
 +
*If we are going to store the actual '''Metamodel''' JPA 2.0 specification object in core/foundation on the session then we will need to introduce new dependency API.  We may just need to copy out the types into our own proprietary native collection of types stored on the session.
 +
*We will instead recreate the Metamodel maps for Entities, MappedSuperclasses and Embeddables as separate Maps on the session.
  
 
==Implementation==
 
==Implementation==
Line 226: Line 320:
 
*Get new MBean integration poinsts possible with JRockit
 
*Get new MBean integration poinsts possible with JRockit
 
*Get new MBean integration points possible with SpringSource
 
*Get new MBean integration points possible with SpringSource
 +
*[http://bugs.eclipse.org/337029 337029]: Provide interface to Performance Monitor API
 +
*[http://bugs.eclipse.org/337030 337030]: Provide interface to Data Partitioning API
 +
*[http://bugs.eclipse.org/337031 337031]: Provide interface to Extensibility API
 +
*[http://bugs.eclipse.org/337032 337032]: Provide interface to Multi-Tenant API
 +
 
==Testing==
 
==Testing==
 
*[http://wiki.eclipse.org/EclipseLink/Examples/Distributed Distributed EE Test Framework]
 
*[http://wiki.eclipse.org/EclipseLink/Examples/Distributed Distributed EE Test Framework]
  
 
==References==
 
==References==
 +
*[http://bugs.eclipse.org/321763 321763] [http://wiki.eclipse.org/EclipseLink/DesignDocs/321763 Performance Monitor] - EclipseLink 2.2
 +
*[http://bugs.exlipse.org/328937 328937]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/328937 Data Partitioning]
 
*[http://bugs.eclipse.org/335601 335601]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility]
 
*[http://bugs.eclipse.org/335601 335601]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 Extensibility]
 +
*[http://bugs.eclipse.org/340192 340192]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/340192 Extensibility through Flex Columns]
 
*[http://bugs.eclipse.org/337323 337323]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy]
 
*[http://bugs.eclipse.org/337323 337323]: [http://wiki.eclipse.org/EclipseLink/DesignDocs/Multi-Tenancy Multi-Tenancy]
 +
*Java Mission Control
 +
** [http://hirt.se/blog/?p=444 Creating Custom JFR Events]
 +
** [http://hirt.se/blog/?p=446 Using the Flight Recorder Parsers]
 +
** [http://hirt.se/blog/?p=459 Parsing Flight Recordings – an Example]
  
 
==Competitive Intelligence==
 
==Competitive Intelligence==

Latest revision as of 21:48, 4 October 2015

Contents

EclipseLink Application Management, Analytics, Diagnostics and Performance

Warning2.png
Work in progress
This analysis is in progress.


Document History

Date Author Version Description & Notes
20110214 Michael O'Brien 1.0 Initial draft started
20151004 Lukas Jungmann 1.1 Revisited initial draft

Problem Statement

  • This enhancement details work that will be done to enhance our basic JMX management API and add additional support for diagnostics and analytics reporting. We will also look at adding features that will enable developers to more accurately capture runtime performance and diagnostics information, as well as tools to interpret that data.
  • There are two issues to this enhancement that separately deal with management and diagnostics reporting.

Management API

  • Our existing runtime JMX management API that is exposed through the services MBean in any of the JConsole, Java Mission Control (JMC), Oracle JRF Enterprise Manager or JBoss web based console is sufficient but needs to be enhanced.

Diagnostics API

  • Our existing runtime performance monitoring API could be enhanced with more JVM reporting - ideally that would not itself add overhead. This type of monitoring is currently done with Java Mission Control - however it does not specifically target the JPA runtime API.

Scope

  • The scope of this issue is limited to the primary EE application servers that we currently support via JMX. These are WebLogic, WebSphere, GlassFish and JBoss. We may also extend support to SE applications and EJB 3.1 Lite containers running exclusively in the web container.

Session Management

Unified Metadata

  • Metadata mappings from Annotations and ORM XML
  • JPA 2.0 Metamodel

Session Cache

Query Cache

Dependency Injection Reference

  • Spring, Session, Message-Driven and Singleton beans that reference or have injections of EMFs or EMs

L1 Cache

L2 Cache

JDBC Database Configuration

Extensibility and Multi-Tenancy

  • Management of shared schemas at design-time and runtime including DDL generation support for modified schemas.
  • We need to integrate with work done for Multi-Tenancy - which is a specific implementation of the Extensibility API
  • We need to integrate with work done for Extensibility - which is a general API for extending a schema at static (design-time) or dynamic(run-time). Multi-Tenancy is one implementation of this API.

Requirements

  • Before we can decide on how and where we will enhance our management, analytics and diagnostics support we need to answer the following questions.
    • Q1) What do we currently provide
    • Q2) What are we going to with existing enhancment requests and how will we merge these with new requirements.
    • Q3) What new features can we provide to leverage new or existing management, performance and analytics tools that ship with the latest application server releases
    • Q4) What new features can we provide on top of Q1-Q3 that are specific to EclipseLink that go beyond what is currently available.

Existing Enhancement Requests

Requirements Details

  • Official high level requirements
  • R1: Address critical open issues general to all application servers
  • R2: Expand platforms that we support JMX management on
    • R2.1: Expand support for JMX management of JPA based applications to SE clients
    • R2.2: Expand support for JMX management of JPA based applications to JEE6 EJB3.1 container managed deployments
    • R2.2: (WebLogic) Integration points for weblogic.management.runtime WLSRuntimeMBeans
    • R2.3: Expand support for JMX management of JPA based applications to JEE7
  • R3: Manageability Requirements
    • R3.1: Make MBeans change session aware - may not be an issue unless we are classified as configuration MBeans
    • R3.2: (WebLogic EM) Provide discovery MBean with EM target types
    • R3.3: Identify Key metrics?
  • R4: Performance Tracking Requirements
    • R4.1: Java Mission Control Integration
    • R4.2: JMC Flight Recorder integration
    • R4.3: (WebLogic) Oracle Diagnostics Logging (ODL) usage/integration
    • R4.4: Expose Runtime monitoring through a new MBean or the new generic PerformanceProfiler MBean
      • This MBean would be exposed in EM?
    • R4.5: Multicore utilization or thread parallelism API
  • R5: Performance Analytics Requirements
    • R5.1: (WebLogic) JRMC Runtime Analyser integration - to interpret JRMC-FR results
    • R5.2: EclipseLink Performance Profiler analysis tool?
  • R6: Scripting Requirements
    • R6.1: (WebLogic) WLST jython scripting required?
    • R6.2: WSADMIN (python) and OJBST scripting required?
  • R7: Security Requirements
    • R7.1: Verify security manager support for MBeans in WebSphere and JBoss
    • R7.2: Determine how JConsole local access can be secured (remote access is via password or port control)
  • R8: Localization
    • R8.1: Command labels and messages must be I18N enabled.
  • R9: Cache Integration (EclipseLink, Coherence, ehCache, Terracotta)
    • R9.1: Expose MBean spanning multiple servers (no L2 cache)?
    • R9.2: Expose multiple MBeans from multiple L1 EclipseLink caches
    • R9.2: Expose MBean spanning multiple L2 caches
  • R10: Third Party Integration
    • R10.1: Spring Hyperic integration
    • R10.2: Spring Insight integration
  • R20: Extensibility Management (20110321)
    • R20.1: Integrate with work for Multi-Tenancy - a specific implementation of the Extensibility API
    • R20.2: Integrate with work for Extensibility - a generic API for Descriptor and Schema changes at design-time or run-time
  • R21: Performance Monitor Integration
  • Introduce Admin Role MBeans
  • Investigate Scripting support for configuration changes (WLS for WebLogic, Python for WebSphere, ? for JBoss, ? for GlassFish)
  • R22: Data Partitioning Integration
  • R23: Expose Metamodel API via JMX

WebLogic Specific Requirements

  • WebLogic Server has several monitoring API join points that we can use either at the WebLogic MBean level or through events exposed to JRMC for servers running on the JRockit JVM. We will need to work closely with the WLS team to finalize the interfaces between EclipseLink and WLS.

GlassFish Specific Requirements

WebSphere Specific Requirements

JBoss Specific Requirements

Spring TC Specific Requirements

Tomcat Specific Requirements

Generic Server Requirements

  • Ideally, any new API should be available to all supported EE servers (not just WebLogic) and optionally SE clients.
  • R: Expose PerformanceProfiler/PerformanceMonitor events through a new MBean generic to all EE servers
  • R: Expose PerformanceProfiler/PerformanceMonitor events through a Java Flight Recorder API/Events

Constraints

  • non-WebLogic EE servers may not benefit from performance tracking provided by JRockit out of the box. These servers (WebSphere, JBoss and GlassFish) can however use the JRockit JVM with minimal configuration changes.

Assumptions

Analysis

  • Our analysis will take two phases.
    • 1) What do we currently provide?
      • Specifically from EclipseLink (like our PerformanceProfiler)
      • Via our JMX MBean.
      • Or generically via the SUN JVM bin tools
      • Or specifically via the JRockit JVM and JRMC (JRockit Mission Control and Flight Recorder).
    • 2) What can we enhance or expose through API?
      • What runtime properties can be added to our JMX MBean.
      • What runtime properties can be tracked via existing or new WLSRuntimeBeans.
      • What other 3rd party performance tracking and analytic tools can be integrated with.

Current EclipseLink PerformanceProfiler

Current EclipseLink Runtime MBean

Current JRockit JRMC Integration Points

Environment

  • WebLogic 10.3.4.0 20110115 version
    • Running JRockit (32-bit on 64-bit)
    • Oracle JRockit(R) (build R28.1.1-14-139783-1.6.0_22-20101206-0241-windows-ia32, compiled mode)
    • Running EclipseLink 2.3 trunk replaces 2.1.2 shipped with WebLogic 10.3.4
  • EE application is the Collatz distributed EE application with 6 external JVM's running various IA64, IA32 and UltraSparc implementations.

JRockit Real Time

JRMC EclipseLink MBean method and attribute usage

JRMC EclipseLink MBean Trigger Rules

  • An example would be a trigger on Number of Objects In All Identity Maps. In my [distributed case study] after running the server for 24 hours we reach around 26000 objects in the identity map before the map is reset back to 6000. Therefore if we put a trigger at say 26000 we should see an event once a day on a load of 1 transaction per second.

Jrockit mission control runtime mbean attribute system stats identity map 26000 range.JPG

JRMC Live Method Profiler for EclipseLink User and API classes

JRMC Live Exception Count for EclipseLink API and JPA Spec Exceptions

JRMC Diagnostic Commands for running EclipseLink user or System Threads

JRMC Processor Usage Tracking for EclipseLink MBean Attributes

JRMC Live System Statistics tracking for EclipseLink MBean Attributes

Jrockit mission control runtime mbean attribute tracking for system stats.JPG

JRMC Garbage Collection Visualization

JRMC Runtime Analyzer

JRMC Memory Leak Detector

JRMCD.exe

IBM J9 Integration

  • For users of WebSphere 6,7 and 8

Third Party Tools

Eclipse Memory Analyzer Tool (MAT)

Eclipse Memory Analyzer Tool for Java Heap Analysis.

Design

Performance Optimization

  • Available options:
    • Batch Reading
    • Batch Writing
    • Partial Attribute Query
    • Parameterized SQL
    • Bulk Update Query
    • Transformation Mappings
    • Order of SQL
    • Avoiding instanceof checks
    • Projections
    • Statement caches
    • Leverage CallableStatement
    • Cache Coordination (coordination)
    • Lazy Loading - via proxy instrumentation
    • Change Tracking - via proxy instrumentation
    • Optimizing Joins
    • L1 Cache parameters
    • L2 Cache integration
    • Sequence allocation (size)
    • In memory database
    • When to use Pessimistic Locking over Optimistic
    • Patterns for 2-phase commit - XA


Asymmetric Data Access

  • Most applications perform more reading that writing to the database. We therefore need to provide performance analysis tools that help to optimize the cache for the customer scenario.

Cache Performance

  • What exactly is the magic number of virtual machines that are needed for a particular application in order that a performance gain will happen if we switch to an L2 cache.
  • Does warming of the cache improve read performance.

Performance Monitor

Data Partitioning

Multi-Tenancy Support

  • R20.1: Integrate with work for Multi-Tenancy - which is a specific implementation of the Extensibility API

Extensibility Support

  • R20.2: Integrate with work for Extensibility - which is a general API for extending a schema at static (design-time) or dynamic(run-time). Multi-Tenancy is one implementation of this API.
  • For example see the section in the Use case where the user of the Extensibility API makes changes at runtime to the existing schema by adding a relationship via to be determined set of new attributes or functions in the JMX management interface.
  • Currently the Add action is supported. Delete and Update are not supported yet without an application shutdown.

Extensibility via Flex Columns

  • Any new JMX API introduced into EclipseLink will follow the API exposed by the ExtensionManager in the 340192 design document.
JMX API function Extensibility API function Notes
addExtension(seqId, owningEntity, name, type ) addExtension(ExtensionProperty) -
addExtension(seqId, owningEntity, name) addExtension(ExtensionProperty) Let EclipseLink auto choose the approprate data type
getExtension(id)  ?(?) - this function lists an extension added via addExtension, propagated from another client or added automatically at session creation time (possibly from persisted extensions in a previously passivated session or via @FlexExtension and @FlexColumn annotations at design time)
getExtensions() getExtensionFields() - this function lists extensions added via addExtension, propagated from another client or added automatically at session creation time (possibly from persisted extensions in a previously passivated session)
getAvailableExtensionFields() getAvailableExtensionFields() - return remaining available ext fields
removeExtension(name) removeExtension(name) no effect until a redeploy
updateExtension(name) - no effect until a redeploy
  • Q) It is stated that remove and update are not supported at runtime without a redeploy. Do we mean they are supported but do not take effect until a redeploy?

R23: JPA 2.0 Metamodel Exposure via JMX

Analysis R23

  • The Metamodel is generated during the predeploy of the EntityManagerFactory for the persistence unit at runtime. There currently is internal API that can be used to regenerate the Metamodel in the case where dynamic relationships have been added to the model post-design-time. We will need to refactor this code to support viewing new mappings that were added via th Extensibility and Multi-Tenancy API's.
// EntityManagerFactoryImpl.java
    /**
     * INTERNAL: Convenience function to allow us to reset the Metamodel in the
     * possible case that we want to regenerate it. This function is outside of
     * the JPA 2.0 specification.
     * 
     * @param aMetamodel
     * @since Java Persistence 2.0
     */
    public void setMetamodel(Metamodel aMetamodel) {
        if (!this.isOpen()) {
            throw new IllegalStateException(ExceptionLocalization.buildMessage("operation_on_closed_entity_manager_factory"));
        }
        this.setupImpl.setMetamodel(aMetamodel);
    }
 
// User code
emf.setMetamodel(null); // clear Metamodel
emf.getMetamodel(); // regenerate Metamodel
JPA dependency in Core
  • If we are going to store the actual Metamodel JPA 2.0 specification object in core/foundation on the session then we will need to introduce new dependency API. We may just need to copy out the types into our own proprietary native collection of types stored on the session.
  • We will instead recreate the Metamodel maps for Entities, MappedSuperclasses and Embeddables as separate Maps on the session.

Implementation

Work Items

  • Get MBean integration points that exist with JRockit
  • Get new MBean integration poinsts possible with JRockit
  • Get new MBean integration points possible with SpringSource
  • 337029: Provide interface to Performance Monitor API
  • 337030: Provide interface to Data Partitioning API
  • 337031: Provide interface to Extensibility API
  • 337032: Provide interface to Multi-Tenant API

Testing

References

Competitive Intelligence

Copyright © Eclipse Foundation, Inc. All Rights Reserved.