<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:lang="en" xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns:mml="http://www.w3.org/1998/Math/MathML"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <title>CMI service management</title>
  </info>
    <section><info><title>Introduction</title></info></section>
    
      <para>CMI relies on JMX for its management. It provides a set of MBeans for retrieving
      management informations and performing some operations such as modifying the load-balancing logic.</para>
    
      <para>All the CMI management is done at the server side and changes are propagated to the clients in a 
      transparent way for the operator.</para>
    
       <para>The CMI parameters are dynamic, the changes are taken into account in a near real-time (at the next
       refresh configuration period).</para>
    
    <section><info><title>jonasAdmin console</title></info>
    
       <para>jonasAdmin provides a CMI management page which is accessible from any member in the CMI cluster by clicking 
       on the server node in the navigation tree and by selecting the CMI tab.</para>

       	<mediaobject>
       		<imageobject>
       			<imagedata align="center"
                     		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_tab.png"
                     		   width="80%" scalefit="1">
       			</imagedata>
   			</imageobject>
   		</mediaobject>
   		
   		<para>The page contains the following elements:</para>
     	<itemizedlist>
        	<listitem>
        	  <para>
          	    <emphasis>Global/Refresh time</emphasis>: specifies the client configuration refresh time period. When a policy changes or a parameter such as
          	    the load factor, the parameter indicates the maximum propagation delay to the client side.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Servers for each protocol</emphasis>: lists the servers in the cluster and the enabled protocols. More detailed information is
          	    delivered on the links.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Providers/Blacklist</emphasis>: disables smoothly a server in the cluster, i.e. new connections are refused
          	    whereas existing one are still served.          
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Clusters</emphasis>: lists the different cluster names. 'System' is a reserved cluster name gathering internal objects and is
          	    reserver for maintenance or advanced uses.
          	  </para>
          	</listitem>
       	</itemizedlist>	
       	
   		<para>When selecting a cluster name in the bottom list, a new tab shows the clustered EJBs associated with this logical name:</para>

      	<mediaobject>
       		<imageobject>
       			<imagedata align="center"
                     		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.png"
                     		   width="80%" scalefit="1">
       			</imagedata>
   			</imageobject>
   		</mediaobject>
   		
   		<para>And then you can access to an object information page by clicking on a clustered EJB in the list: </para>

      	<mediaobject>
       		<imageobject>
       			<imagedata align="center"
                     		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_object_info.png"
                     		   width="80%" scalefit="1">
       			</imagedata>
   			</imageobject>
   		</mediaobject>
   		
   		<para>The page contains the following elements:</para>
     	<itemizedlist>
        	<listitem>
        	  <para>
          	    <emphasis>Global/Name</emphasis>: JNDI name of the clustered object.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Global/Cluster name</emphasis>: Cluster name associated with the clustered object.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Global/Interface</emphasis>: Interface class name of the clustered object.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Deployed server</emphasis>: List of servers where the clustered object is deployed.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Load-balancing infos</emphasis>: Policy and strategy of the clustered object.
          	  </para>
          	</listitem>
        	<listitem>
        	  <para>
          	    <emphasis>Pool infos</emphasis>: Parameters of the stub pool associated with the clustered object.
          	  </para>
          	</listitem>
       	</itemizedlist>	
       	
    </section>
    <section><info><title>Dynamic update of the load-balancing parameters</title></info>
 
    	<section><info><title>Policy and strategy</title></info>
    
  	     <para>Policies and strategies can be updated dynamically from jonasAdmin console.</para>

  	     <para>From the clustered object information page, you can select another policy :</para>

  	     	<mediaobject>
    	   		<imageobject>
     	  			<imagedata align="center"
        	             		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_policies.png"
        	             		   width="80%" scalefit="1">
       				</imagedata>
   				</imageobject>
   			</mediaobject>
   		
  	     <para>or strategy :</para>

      	 	<mediaobject>
    	   		<imageobject>
      	 			<imagedata align="center"
      	               		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_strategies.png"
       	              		   width="80%" scalefit="1">
       				</imagedata>
   				</imageobject>
   			</mediaobject>
   		
   			<para>Refer to the <xref linkend="cmi.ejb.parameters" /> section for more information.
   			</para>
   		
   		</section>
    	<section><info><title>Load-factor</title></info>
   		
     	  <para>Load-factor can be updated dynamically by clicking on a server in the CMI tab page :</para>

       		<mediaobject>
       			<imageobject>
       				<imagedata align="center"
                  	   		   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_servers.png"
                   	  		   width="80%" scalefit="1">
       				</imagedata>
   				</imageobject>
   			</mediaobject>  
   				
       		<para>The server information page contains a <emphasis>load-factor</emphasis> which can be modified dynamically:</para>

       		<mediaobject>
       			<imageobject>
       				<imagedata align="center"
                     			   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_server_info.png"
                     			   width="80%" scalefit="1">
       			</imagedata>
   				</imageobject>
   			</mediaobject>  		
   		</section>
   
	</section>

    <section><info><title>MBeans</title></info>
    
    	<para>CMI provides a MBean for management whose name is: 
    	<literal>&lt;domain name&gt;:type=cmi,name=CMIServer,J2EEServer=&lt;JOnaS instance name&gt;</literal>
    	</para>
       		<mediaobject>
       			<imageobject>
       				<imagedata align="center"
                     			   fileref="../../../../resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.png"
                     			   width="80%" scalefit="1">
       			</imagedata>
   				</imageobject>
   			</mediaobject>  
   				   		
     </section>
 </section>
