Skip to main content
Last updated June 22, 2015 09:03, by thomas merten
Feedicon  
<meta name="description" content="Thomas Merten, Siebel, Java, Java Enterprise, CRM, Mobile, IT Architect,Software, LoadBalancer"/> <meta name="author" content="Thomas Merten"/> <meta name="keywords" content="Thomas Merten,Siebel, Java, Java Enterprise, CRM, Mobile, IT Architect,Software, LoadBalancer, loadbalancing,Web, Servlet, Filter, loadbalancing,calibration,j2ee,beanbox, beanbuilder"/> <meta name="robots" content="1"/> ; <small> <h3>Diagnostic & Calibration Java Enterprise Web Applications - Performance Management for individual Best Fit Deployments</h3> :<p><h5>by Thomas Merten, Enterprise Systems Integration</h5></p> <center>[[image:java_loadbalancer_design.png]] </center> <table style="border:0;" > <tr valign="bottom"> <td width="84%"> </td> <td align="right" valign="bottom" ><i><small> "Ad majorem Dei gloriam."</small></i> <br/><i><small>Saint Ignatius of Loyola</small></i></td> </tr> </table> <p>&nbsp; </p> <h4>SUN Java Management Extensions (JMX) Technology - Java SE Core Component</h4> :<p> The JMX technology provides tools and API for building distributed, Web-based, modular and dynamic solutions for managing and monitoring devices, applications, and service-driven networks. By design, this SUN standard is suitable for adapting legacy systems, implementing new management and monitoring solutions, and plugging into those of the future. </p> <p>&nbsp; </p> <h4>Java MX Calibration Services Project on java.net</h4> :<p> Based on Java Management Extensions API Java MX Calibration Services implements Diagnostic & Calibration functionality in Java EE Web Applications as part of Performance Management for individual Best Fit Deployments and essential Visibility into Java Web Transactions across your infrastructure. You identify performance problems and balance your Java Web Server remote at runtime via JMX supported Tools. Java Server Performance depends on CPU & Memory allocation. Tuning Performance is a calibration Process in reference to stability. JMX Calibration Services addresses this with Monitoring and Run-time Customizing of key parameters. Fail-over strategies are implemented and customizable while calibration process. JMX Calibration Services are pure J2EE Web Component for high traffic environments. By architecture, it runs on all Java Web Containers without any modification and requires a Servlet Specification 2.3 or later. JMX Calibration Services supports HTTP and JMX Monitoring and JMX Run-time Customizing. Log-Profiling is supported via file logging using the java.util.logging facility. Using JMX Calibration Services no hardware or software architecture changes required. The Implementation takes care about the relationships between Java Server Threads and the Java Memory Model(JMM) in multi core hardware environments. </p> <p> </p> </small> <small> __TOC__ </small> <p>&nbsp; </p> ====Java MX Calibration Services Technology==== <p>&nbsp; </p> =====Nonfunctional System Components===== :<small> <p>Java Calibration Services are pluggable over loadbalancer.jar registration in Web-Inf/lib directory of the Java EE Web Application and administrated using web.xml registration and configuration. Nonfunctional System Components are configured as filter and mapped via url-mapping to a specific critical Ressource. So critical Thread Informations are available over his standard JMX Components and associated with Java Calibration Services MX Beans which are registered on MBeanServer with ObjectName: <b>j2ee.loadbalancer:type=NNN</b>. </p> </small> :[[image:NonfunctionalSystemComponents.png]] <small> :<p> {|- border="0" |- |<b>nonfunctional MX Beans:</b> |j2ee.loadbalancer:type=RechnerBalancer |} </p> </small> <p>&nbsp; </p> =====Sequence Diagram(nonfunctional)===== :<small> <p> Java MX Calibration Services Sequence Diagram: </p>[[image:java_ee_loadbalancer.png]] </small> <p>&nbsp; </p> =====Functional System Components===== :<small> <p>Here we demonstrate use of JMX Channnel Technology to remote control the Flow of a long running Java Server Face Task in a J2EE Web Container Environment. The Demo runs in Tomcat Web Container without any changes and demonstrates customized JMX realtime Profiling & Monitoring of Java EE LoadBalancer Parameters & JSF-CDI Bean Properties using SUN JConsole. Run-time Customizing of “Long running Tasks” is based on CurrentThreadId and registered as MXBeans with ObjectName: <b>jsf.cdi.jmx.monitoring:type=NNN</b>. </p> <p><b>Java Server Faces Demo Web Application using Java MX Calibration Services: </b>[https://java.net/projects/j2ee-loadbalancer/downloads/download/JSF_JMX_MONITORING.zip Download]</p> </small> :[[image:FunctionalSystemComponents.png]] <small> :<p> {|- border="0" |- |<b>functional MXBeans Operations:</b> |jsf.cdi.jmx.monitoring:type=RechnerBeanCDI.cancelOperation |} </p> </small> <p>&nbsp; </p> =====UML Class Diagram(functional)===== :<small> <p> Java MX Calibration Services UML Class Diagram: </p> [[image:Functional-NonFunctional-Relation.png]] </small> <p>&nbsp; </p> =====Calibration of Nonfunctional Components===== :<small> <p> MX Beans Attributes Runtime Customizing is used for Calibration of Nonfunctional Components </p> [[image:FunctionalSystemComponents2.png]] <p> {|- border="0" |- |<b>nonfunctional MXBeans Attributes:</b> |j2ee.loadbalancer:type=RechnerBalancer.EndPointMaxThreadPool |} </p> </small> <p>&nbsp; </p> =====Run-time Customizing of Java MX Calibration Services Parameters(nonfunctional)===== :<small> <p>JMX Run-time Customizing of Semaphores Parameter to get the Best Fit profiling for your environment is supported. Set the parameter values for <b>MAX_THREAD_COUNT</b> and <b>THREAD_BLOCKING_TIME</b> to change configuration and Run-time Behavior in real-time to find Best Fit Settings for EAI Endpoint and System. </p> <p>Monitor system changes in relation to your new Attribute settings (in Attribute Chart mode): <ul> <li><b>CurrentEndpointAllocatedBytes</b>:[Information Readonly] <p>CurrentEndpointAllocatedBytes returns an approximation of the total amount of memory, in bytes, allocated in heap memory for the last current Endpoint thread(while current jconsole jmx interval). Requires Java SE 1.7 .</p> </li> <li><b>CurrentEndpointAllocatedBytesRelative</b>:[Information Readonly] <p>CurrentEndpointAllocatedBytesRelative returns an approximation of the relative amount of memory, in percent, allocated in heap memory for the last current Endpoint thread (while current jconsole jmx interval) in relation to the total amount of memory allocated in heap memory for all live Threads. Requires Java SE 1.7 .</p> </li> <li><b>EndpointTotalAllocatedBytes</b>:[Information Readonly] <p>EndpointTotalAllocatedBytes returns an approximation of the total amount of memory, in bytes, allocated in heap memory for all Endpoint Threads based on the specified EndPoint URL-Pattern (while current jconsole jmx interval). Requires Java SE 1.7 .</p> </li> <li><b>EndpointTotalAllocatedBytesRelative</b>:[Information Readonly] <p>EndpointTotalAllocatedBytes returns an approximation of the total amount of memory, in percent, allocated in heap memory for all Endpoint Threads based on the specified EndPoint URL-Pattern (while current jconsole jmx interval) in relation to the total amount of memory allocated in heap memory for all live Threads. Requires Java SE 1.7 .</p> </li> <li><b>EndPointTotalCpuTime</b>:[Information Readonly] <p>EndPointTotalCpuTime is the total CPU time over all Endpoint threads(while current jconsole jmx interval) have executed in user mode plus system mode in nanoseconds. CPU time(all Endpoint threads) = user time(all Endpoint threads) + system time(all Endpoint threads)</p> </li> <li><b>EndPointTotalUserTime</b>:[Information Readonly] <p>EndPointTotalUserTime is the total CPU time over all Endpoint threads(while current jconsole jmx interval) have executed in user mode(running your application's own code) in nanoseconds. </p> </li> <li><b>EndPointTotalSystemTime</b>:[Information Readonly] <p>EndPointTotalSystemTime is the total CPU time over all Endpoint threads(while current jconsole jmx interval) have executed in system mode(running OS code on behalf of your application (such as for I/O)) in nanoseconds. user time(all Endpoint threads) = CPU time(all Endpoint threads) - user time(all Endpoint threads)</p> </li> <li><b>EndPointCountRelative</b>:[Information Readonly] <p>Amount of all Endpoint threads in relation to all JVM threads. </p> </li> <li><b>CurrentEndPointCpuTime</b>: [Information Readonly] <p>CurrentEndPointCpuTime is the amount of time that the last current Endpoint thread(while current jconsole jmx interval) has executed in user mode plus system mode in nanoseconds.Total time spent using a CPU for your application. CPU time = user time + system time <br/><b>That means: </b>Server Application processing time used to serve the last current request. </p> </li> <li><b>Waiting_Thread_Count</b>:[Information Readonly] <p>Amount of all Endpoint threads waiting(THREAD_BLOCKING_TIME) until the Request-pool has new free thread resources</p> </li> <li><b>Current_Thread_Pool_Count</b>:[Information Readonly] <p>Amount of free Endpoint thread resources. Running Endpoint Threads = MAX_THREAD_COUNT-Current_Thread_Pool_Count</p> </li> </ul> </p> </small> ====Prerequisites==== :<small> <p><b>Java MX Calibration Services requires:</b></p> <ul> <li>Java Servlet Engine(Tomcat,...) with Servlet Specification 2.3 or later</li> <li>Java SE 1.5</li> <li>For Profiling & Runtime Customizing[Best Fit Calibration]: enabled JMX connection</li> <li>Some Features like Endpoint Heap Memory Allocation Measuring requires Java SE 1.7</li> <li>Integration & Development Thread JMX Beans based on Java Memory Model(JMM) Engineering</li> <li>Implementation takes care about the relationships between Java Server Threads and the Java Memory Model(JMM) in multi core hardware environments. </li> <li>Java MX Calibration Services Beans are pluggable over loadbalancer.jar registration in Web-Inf/lib directory of your Java EE Web Application and administrated using web.xml registration and configuration. Is configured as filter and mapped via url-mapping to specific individual critical Ressource. So critical Thread Informations are available over his standard JMX Components and associated with Java MX Calibration Services JMX Beans.</li> </ul> <p/> </small> ====Benefit==== :<small> <ul> <li>Individual Diagnostic & Calibration functionality for Java EE Web Applications</li> <li>Standard Performance Management for individual Best Fit Deployments</li> <li>Essential Visibility into Java Web Transactions across your infrastructure</li> <li>Identify performance problems and balance your Java Web Server via JMX supported Tools</li> <li>Monitoring and Run-time Customizing with build-in:</li> <nowiki>- functional user components MXBeans</nowiki> <br/><nowiki>- nonfunctional system components MXBeans </nowiki> <br/> <li>SUN Standard Path: JMX API & JMX Tools =>Part of IBM/SUN Java SE >2008</li> <li>SUN JConsole pluggable JMX Calibration Services MXBeans </li> <li>Integration without hardware or software architecture changes</li> <li>Fail-over functionality</li> <li>Usability in development, test & runtime environments</li> <li>URL - or Thread-Id based connectors</li> </ul> </small> ====Cooperation Community==== :<small> <p>In the cooperation community with our clients, we will established an ideal basis to react to the concurrence of current changes on the online markets platform[Java EE => Java Ondemand Platform]. That is why the joint development of the JMX Calibration Services solutions as OpenSource Platform, meeting ever-changing requirements, contributes sustainably to the competitive edge of our business clients. </p> <p> Moreover, we offers company-specific Quality Assurance process consultation with an ideal IT implementation within the cooperation community. Our expert knowledge, our implementation expertise and our experience from long-time cooperation with many e-commerce & high technology industry companies make us your ideal business partner. </p> </small> ====Lizenz==== :<small> <p>Java MX Calibration Services is open source but not free.</p> <ul> <li>Use in Test and Development Environment is for free - with the requirement that any copy acknowledges the original product and its developers.</li> <li>For use in Production Environment get in touch with us([mailto:thomas.merten@java.net Thomas Merten])</li> </ul> <p> © 2014 Thomas Merten. Alle Rechte vorbehalten. Alle Warenzeichen sind Eigentum ihrer jeweiligen Inhaber. Angaben in diesem Dokument dienen nur der Produktbeschreibung und stellen keine zugesicherten Eigenschaften im Rechtssinn oder Garantien dar. Garantien bedürfen einer ausdrücklichen und schriftlichen Bestätigung. Änderungen und Anpassungen vorbehalten.</p> <p> Limited warranty: Java MX Calibration Services Software and Documentation are "as is" without any warranty as to their performance, merchantability or fitness for any particular purpose. The licensee assumes the entire risk as to the quality and performance of the software. In no event shall Java MX Calibration Services or anyone else who has been involved in the creation, development, production, or delivery of this software be liable for any direct, incidental or consequential damages, such as, but not limited to, loss of anticipated profits, benefits, use, or data resulting from the use of this software, or arising out of any breach of warranty. This includes, but is not limited to, interruption of service, loss of classroom time or loss of consulting profits from the use of these programs. </p> <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </p> </small> ====Contact==== :<small> <p> <b>Thomas Merten</b> <p> [[image: thomasmerten_icon.jpg]] </p> <p> My professional activities currently concentrate on Java EE Profiling and Monitoring & SaaS Architectures.I am also interested in EAI/EIM Software Systems Integration. Previously, I worked in the ICT industry as Siebel Core Consultant. Presently I am working as a freelance consultant and software engineer in Europe. I am always looking for new and interesting projects, and you can hire me. Check out my profile and references to see if I may be able to help you. I contribute to the Java Platform with the Java EE LoadBalancer Project at SUN Source. </p> <p>&nbsp;</p> <p> [https://java.net/projects/j2ee-loadbalancer/pages/Contact Contact]<br/> [mailto:thomas.merten@java.net thomas.merten@java.net]<br/> </p> </p> <p>&nbsp;</p> </small> ====Resources & References==== :<small> <ul> <li>Tomcat Copyright &copy;&nbsp; 1999-2011, The Apache Software Foundation</li> <li>java.net Copyright &copy;&nbsp; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</li> <li>Axis2 Copyright &copy;&nbsp; 2004-2011 The Apache Software Foundation. All Rights Reserved.</li> <li>JConsole, JDK, Java &copy;&nbsp; 2010, Oracle Corporation and/or its affiliates</li> <li>LiveGraph This product includes software developed by the LiveGraph project and its contributors. (http://www.live-graph.org) Copyright &copy;&nbsp;2007 G. Paperin. All rights reserved.</li> <li>SoapUI &copy;&nbsp; 2011 SmartBear Software. All rights reserved.</li> <li>The Java Memory Model ([http://www.cs.umd.edu/~pugh/java/memoryModel/ William Pugh])</li> <li>Article: How to get CPU, system, and user time for benchmarking ([http://nadeausoftware.com/articles/2008/03/java_tip_how_get_cpu_and_user_time_benchmarking David R. Nadeau, Ph.D. ])</li> </ul> </small> ---- :<small> <p> <a href="https://java.net/projects/j2ee-loadbalancer">[[image:jmx-calibration-services.png]]</a>&nbsp;&nbsp;&nbsp;Java MX Calibration Services Project &copy;&nbsp; 2014 Thomas Merten.<br/> </p> </small>
 
 
Close
loading
Please Confirm
Close