zoukankan      html  css  js  c++  java
  • 03-12_MBean层次结构

    本文重点:

    1. Mbeans层次结构与WLST关系介绍
    2. WebLogic Mbeans的类型
    3. weblogic服务器的MBeans生命周期

       

       

       

    1. Mbeans层次结构与WLST关系介绍:
      1. WLST online提供对MBeans的简化访问,WLST使您能够以类似于浏览文件系统中文件层次结构的方式浏览MBeans层次结构。
      2. MBeans的类型和实例,都看作是目录,MBean的属性,都看作文件。
      3. 当定位到MBean实例之后,使用WLST命令与MBean进行交互。
      4. 在配置层次结构中,根目录是Domain MbeanMBean类型的每个实例都是MBean类型目录下的子目录;而MBean属性是MBean所属实例的子节点(如文件),每个MBean实例名称与MBean的名称属性的值是一致的。

       

    如图,MBeans层次结构:

       

       

       

    1. WebLogic Mbeans的类型

      MBeans的类型分为两种:配置的MBeans和运行的Mbeans

    • 运行MBeans:包含有关服务器及其资源的运行时状态的信息,它们通常只包含有关资源服务器当前状态的数据,并且不会保存这些数据。当关闭服务器实例时,运行时的MBean的所有运行时统计信息和指标都将被销毁。
    • 配置MBeans:配置MBeans包含有关服务器和资源配置的信息,它们变更都会存储在域的XML配置文件中。

       

       

    1. weblogic服务器的MBeans生命周期
      1. 运行MBean的生命周期:

        运行MBean的生命周期开始于一个server的启动, 跟随server的停止而终止。例如,当您启动一个server时,server实例化一个运行MBean,并且用当前运行时的数据填充MBean的层次, 每个资源在其运行时更新MBean中的数据,作为其状态更改。 该server停止时将销毁其运行时MBean

      2. 配置MBean的生命周期

        1、配置MBean的生命周期也开始于一个server的启动,然后将domain配置信息加载至内存中,然后实例化MBean,它的根节点也就是Domain Mbean,来展示其内存版本。如图: 配置文件与运行MBean层次结构一一对应。

        2、当要更改域配置文件的时候,JMX客户端对这些MBean配置只有只读访问权限(包括web控制台也只是JMX客户端的一种),而对于管理服务器来讲,它维护着一份单独的、可编辑的域配置文件副本,存放在域的pending目录下,利用它来实例化一系列化的MBean提供给JMX的客户端用来更改。在JMX客户端更改这些配置MBean之后,客户端请示管理服务器将修改持久化保存在配置文件中,那么管理服务器将启动一个事务进程,更新域中所有服务器实例的只读配置文档和配置MBean,并通知其他客户端来更新这些配置Mbean。

        3、配置MBeans会随着Server实例的关闭而销毁。但是其提交的更改在第二步骤就已经持久化保存在配置文件中了。

         

    2. WebLogic Server Mbean 数据模型

      weblogic服务器将其MBeans组织成反映XML文档结构的层次模型。

      例如:domain配置文档的根是<domain>,它的二级节点就是<server>和<cluster>等,每个domain单独的维护着一个DomainMBean。

       

       

    1. MBean Servers

      任何JMX客户端的核心都是MBean Server,它做为MBeans的容器。

      管理服务器的JVM的虚拟机包含了3Oracle提供的MBean Server,另外还有一个可选的由JDK本身提供的MBean ServerManaged Server(受管服务器)仅维护一个Oracle提供的MBean Server

    • Domain Runtime MBean ServerDomain运行时MBean,记录运行时信息。
    • Runtime MBean Server:运行时MBean,记录当前Server运行时的信息。如果在管理服务器上,那么就和Domain Runtime MBean Server数据相同。受管服务器中仅有Runtime MBean Server
    • Edit MBean Server:配置MBean,用来配置weblogic服务器域的配置。 它暴露了一个ConfigurationManagerMBean用来来锁定、保存和激活更改配置。 只有管理服务器才有这个MBean Server
    • The JVM's platform MBean serverJDK提供的包含JVM自身监视信息的MBean

       

       

    1. MBean命令

    命令

    描述

    WLST

    custom

    navigate to the root of custom MBEANS that are registered in the server.

    访问其他BEA MBean和自定义MBean的根

    在线模式

    domainConfig

    navigate to the last MBean to which you navigated in the domain configuration hierarchy or to the root of the hierarchy. domainMBean.

    访问到域配置层次中您上一次访问的MBean,或访问到DomainMBean根

    在线模式

    domainQustom

    navigate to the root of custom mbeans that are registered in the domain runtime mbean server.

    导航到在域运行时mbean服务器中注册的自定义mbeans的根目录

    在线模式

    domainRuntime

    navigate to the last mbean to which you navigated in the domain runtime hierarchy or to the root of the hierarchy, domainRuntimeMBean

    导航到您在域运行时层次结构中导航到的最后一个mbean,或导航到层次结构的根domainRuntimeMBean

    在线模式

    edit

    navigate to the last MBean to which you navigated in the edit configuration mbean hierarchy or to the root of the hierarchy, domainMBean.

    导航到编辑配置 MBean 层次中您上一次导航到的 MBean,或导航到层次的根 DomainMBean。此可写层次可存储表示当前域的所有配置 MBean。

    在线模式

    jndi

    navigate to the JNDI tree for the server to which WLST is currently connected

    导航到 WLST 当前所连接的服务器的 JNDI 树。

    在线模式

    serverConfig

    navigate to the last MBean to which you navigated in the configuration mbean hierarchy or to the root of the hierarchy. domainMBean.

    导航到配置 MBean 层次中您上一次导航到的 MBean,或导航到层次的根 DomainMBean。

    在线模式

    serverRuntime

    navigate to the last MBean to which you navigated in the runtime MBean hierarchy or to the root of the hierarchy, serverRuntimeMBean

    导航到运行时 MBean 层次中您上一次导航到的 MBean,或导航至此层次的根 ServerRuntimeMBean。

    在线模式

       

    MBean切换关系:

       

       

    本文官方文档:https://docs.oracle.com/cd/E13222_01/wls/docs100/config_scripting/nav_edit.html

  • 相关阅读:
    idea编辑器快捷键
    双随机系统遇到的简单样式问题
    HTTP笔记八
    HTTP笔记七
    HTTP笔记六
    HTTP笔记五
    HTTP笔记四
    HTTP笔记三
    HTTP笔记二
    HTTP笔记一
  • 原文地址:https://www.cnblogs.com/cishi/p/8344053.html
Copyright © 2011-2022 走看看