CN102325180A - Component management method and system - Google Patents

Component management method and system Download PDF

Info

Publication number
CN102325180A
CN102325180A CN201110264398A CN201110264398A CN102325180A CN 102325180 A CN102325180 A CN 102325180A CN 201110264398 A CN201110264398 A CN 201110264398A CN 201110264398 A CN201110264398 A CN 201110264398A CN 102325180 A CN102325180 A CN 102325180A
Authority
CN
China
Prior art keywords
mbean
service
server
registered
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201110264398A
Other languages
Chinese (zh)
Other versions
CN102325180B (en
Inventor
陈芳芳
刘耀
刘民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANDONG CIVIC SE COMMERCIAL MIDDLEWARE Co.,Ltd.
Original Assignee
CVIC Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201110264398.6A priority Critical patent/CN102325180B/en
Publication of CN102325180A publication Critical patent/CN102325180A/en
Application granted granted Critical
Publication of CN102325180B publication Critical patent/CN102325180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a component management method and system. The method is based on a JMX (Java Management Extensions) agent platform, the JMX agent platform is internally provided with an MBean (Manageable Bean) server, the method comprises the following steps of: loading a component and analyzing the metadata file of the component to acquire the file data in the metadata file; packaging the component to a dynamic MBean (management component) according to the acquired file data; registering the dynamic MBean to a statement-type framework service; and monitoring the state of the service, registering the MBean corresponding to the service into the MBean server according to different states of the service and carrying out a management on the MBean. According to the component management method and system provided by the application, a JMX management capacity is possessed without realizing a particular interface of the component; a development process is simplified; and an update of the managed capacity of the component is possessed.

Description

A kind of component management method and system
Technical field
The application relates to OSGI framework field, particularly relates to a kind of method and system of managing based on the long-distance structural components of JMX.
Background technology
Statement formula service is a kind of service-oriented component programming model of in the OSGI framework, simplifying, and the extensibility of this model, provides the advantages such as simplified way of service to enjoy developer's favor.Statement formula service provides the mode of services component in a kind of brand-new exploitation OSGI environment; Its uses the mode of statement formula to issue, search the service with binding O SGI; This mode is simplified the non-functional requirement that causes because of the management dynamic environment in the services component realization, thereby the functional service logic that makes the developer be absorbed in oneself more realizes.
When using statement formula method of service to carry out component development, relate to the problem of how member being carried out local and remote administration; Usually use JMX to be managed to managing resource; The local and remote administration of services component, the management component according to the described principle exploitation of JMX standard is called Manageable Bean (MBean); The structure of MBean must be followed by described pattern and the relevant interface of relating to of JMX standard, can guarantee that so all MBean can provide by the resource apparatus of managing with the form of standard.
For member is possessed by the ability of JMX management; The developer need be familiar with the related content of JMX; And member need be realized special interface (standard MBean, DynamicMBean etc.), indicates oneself object for being managed, and can make like this and develop the relative complex that becomes; And member can load, unloads and replace during operation on statement formula service framework, if member just should not possessed the ability of being managed by unloading, the state how to be managed according to the different conditions real time altering also is a major issue to be studied.
Summary of the invention
For solving the problems of the technologies described above, the application embodiment provides a kind of component management method and system, need not member and realizes special interface and possess the JMX managerial ability, has simplified development process; And possesses the ability that new structural member is more managed.
Technical scheme is following:
A kind of component management method, said method are provided with the MBean server based on a JMX agent platform in the said JMX agent platform; Said method comprises:
The meta data file that said member is loaded and resolves said member obtains the file data in the said meta data file;
According to the said file data that obtains said member is encapsulated as dynamic MBean (Manageable Bean, management component);
Register said dynamic MBean as statement formula framework services;
Monitor the state of said service, according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.
Above-mentioned method, preferred, the MBean in the said MBena of the being registered to server managed comprise:
Read and the property value of rewriting again among the MBean;
Carry out the interface method that defines among the MBean;
Obtain the notification event object that sends among the MBean.
Above-mentioned method, preferred, said monitoring service state according to the different conditions of said service, is registered to the corresponding MBean of said service in the said MBean server and comprises:
Said service state changes and said service state is when serving loading when monitoring obtains, and corresponding MBean is registered in the MBean server with said service.
Above-mentioned method, preferred, said monitoring service state according to the different conditions of said service, is registered to the corresponding MBean of said service in the said MBean server and comprises:
Said service state changes and said service state is when serving unloading when monitoring obtains, with corresponding counter being registered in the MBean server of MBean of said service.
A kind of component management system, said system is provided with the MBean server based on a JMX agent platform in the said JMX agent platform; Said system comprises:
Loading unit is used for said member is loaded;
Resolution unit, the meta data file that is used for resolving said member obtains the file data of said meta data file;
Encapsulation unit is used for according to the said file data that obtains said member being encapsulated as dynamic MBean (Manageable Bean, management component);
Registering unit is used for registering said dynamic MBean as statement formula framework services;
Administrative unit is used to monitor the state of said service, and according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.
Above-mentioned system, preferred, said administrative unit comprises:
Rewrite subelement, be used for reading and the property value of rewriting MBean again;
Carry out subelement, be used for carrying out the interface method that MBean defines;
Obtain subelement, obtain the notification event object that sends among the MBean.
Above-mentioned system, preferred, said administrative unit comprises:
The registration subelement is used for obtaining that said service state changes and said service state when loading for service when monitoring, and the MBean of said service correspondence is registered in the MBean server.
Above-mentioned system, preferred, said administrative unit comprises:
Anti-registration subelement is used for obtaining that said service state changes and said service state during for the service unloading, with counter being registered in the MBean server of MBean of said service correspondence when monitoring.
Technical scheme by above the application embodiment provides is visible, and component management method and system provided by the invention based on the JMX agent platform, are provided with the MB server in said JMX platform; The member of needs management is loaded, resolve the file data in the said member meta data file, said member is encapsulated as dynamic MBean according to said file data; Register said dynamic MBean as statement formula framework services; Monitor the state of said service, according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.Component management method and system provided by the invention provide the mode of metadata statement or the mode of explaining to come the configuration management ability, and the user need not be concerned about the defined content of JMX standard like this, only needs to be concerned about the managerial ability of member; In addition; The invention provides the life cycle ability of maintenance component management; Can the dynamic tracking member state of bundle in framework at place, do relevant treatment according to the different conditions of management component, thereby the management that has realized member is only in effective dynamic management ability of runtime.
Description of drawings
In order to be illustrated more clearly in the application embodiment or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiment that put down in writing among the application, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The flow chart of a kind of component management method that Fig. 1 provides for the application embodiment one;
The method flow diagram of the loading management component that Fig. 2 provides for the application embodiment one;
The method flow diagram of the unloading management component that Fig. 3 provides for the application embodiment one;
The MBean telemanagement sketch map that Fig. 4 provides for the application embodiment one;
The structural representation of a kind of component management system that Fig. 5 provides for the application embodiment two;
The another structural representation of a kind of component management system that Fig. 6 provides for the application embodiment two.
Embodiment
In order to make those skilled in the art person understand the application's scheme better.To combine the accompanying drawing among the application embodiment below, the technical scheme among the application embodiment is carried out clear, intactly description, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all should belong to the scope of the application's protection.
Embodiment one
The flow chart of a kind of component management method that the application embodiment provides is as shown in Figure 1; Said method is based on a JMX agent platform; Said JMX agency by MBean server, one group of MBean, agency service, also have formation such as protocol adaptor (connector) assembly of etc.ing; These agents level objects serve as the bridge between management and application program and the managed resource, direct managing controlled resource, and managed resource can be communicated by letter with management and application program through connector or protocol adaptor; When services component is moved on this statement formula service platform; Can carry out dynamic load, unloading and replacement; The method that the application embodiment provides has increased the service monitoring mechanism of member, when the services component state changes, but the information that real-time listening changes to service state;
Said method comprises:
Step S101: the meta data file that said member is loaded and resolves said member obtains the file data in the said meta data file;
Step S102: said member is encapsulated as dynamic MBean according to the said file data that obtains;
Management component is loaded into statement formula framework and is in state of activation, and statement formula service framework is responsible for resolving the meta data file of management component, according to the data of meta data file it is encapsulated as dynamic MBean; The method that the application embodiment provides has defined the schema file of the meta data file of configuration management member; Management component need be packaged as some attribute informations of MBean according to this schema file configuration; And the attribute Property and the method Method information that expose; Wherein the Property element is used to define the attribute that MBean exposes field, and the Method element is used to define the attribute of MBean process for exposing;
Step S103: register said dynamic MBean as statement formula framework services;
Registering dynamic MBean is the manageable service of statement formula service framework, and the method that the application embodiment provides has been owing to increased the service monitoring mechanism, listen to this service registry after, just can obtain this service through framework;
Step S104: monitor the state of said service, according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed;
After obtaining service through framework, whether the attribute information identification through service is the MBean object, if MBean object not is registered to this MBean among the MBeanServer; Through the realization to the MBeanRegistration interface, management component can add MBean registration and the cancellation control on opportunity;
Be registered to after the MBean server, just can in program, read and the property value of rewriting again on the MBean, carry out MBean and go up the interface method of definition and obtain the notification event object that sends on the MBean;
The MBean server is responsible for the life cycle control of MBean, and when the service state that listens to management component changes (load, unloading, replacement), the method that the application embodiment provides will be done relevant treatment according to these states; When services component loaded, registration MBean object was in the MBean server; When services component unloads, the anti-MBean object of registering; When services component was replaced, anti-earlier registration MBean object was registered the MBean object more again in the MBean server; And before and after registration/anti-registered events of MBean, whether the MBean server all can realize the MBeanRegistration interface by dynamic chek " management component ", if return results is true, the MB service promptly can be called corresponding call back function; Fig. 2 that the flow chart of loading management component that the application embodiment provides and unloading management component provides like the application embodiment respectively and shown in Figure 3:
As shown in Figure 2, comprising:
Step S201: the encapsulation manager member is dynamic MBean;
Step S202: register the service that dynamic MBean is a framework;
Step S203: the services component state of monitoring framework;
Step S204: monitor service state and whether change; As change execution in step S205; Otherwise, return execution in step S203;
Step S205: monitor service state and whether register, as registered, execution in step S206;
Step S206: obtain the ObjectName title through obtaining Service Properties, register this MBean in MBeanServer.
Shown in Figure 3, comprising:
Step S301: the services component state of monitoring framework;
Step S302: monitor service state and whether change; As execution in step S301 is returned in change, otherwise, execution in step S303;
Step S303: instead whether listening state registration; As anti-registration, execution in step S304;
Step S304: obtain the ObjectName title through obtaining Service Properties, counter this MBean that registers is in MBeanServer.
The operation principle to the member telemanagement that the application embodiment provides is: through corresponding connector service end (connector server) is sent request; A telemanagement application program can connect with the JMX agency, just can call the operation that long-range MBean provides through its local connector client (connector client) subsequently; Typically, a remote client passes through the interface method subclass of MBeanServer, and this subclass is from the defined method collection of father's interface (parent interface) of MBeanServer interface.
Among the application embodiment; Sketch map for telemanagement MBean is as shown in Figure 4, and the connector client is specified the role of the long-range representative of MBean server, and hypervisor is sent the method call of getState to it; The dynamic call of this mode is normally cooperated with (introspection) mechanism of examining oneself of MBean; Through examining oneself of MBean, can find community set method collection and other all MBean characteristics of objects that management interface provides dynamically, to local with long-range all the same;
Agent object is produced by the MBean class usually automatically; Management and application program directly proposes the call request of getState method to agent object; Agent object relies on the connector client again and sends this request to long-range JMX Agent layer; Pass to target MBean at last, request responding is then passed back with opposite path.
For aforesaid method embodiment; For simple description; So it all is expressed as a series of combination of actions, but those skilled in the art should know that the present invention does not receive the restriction of described sequence of movement; Because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
Embodiment two
To above method embodiment, the application embodiment also provides a kind of component management system, and said system is provided with the MBean server based on a JMX agent platform in the said JMX agent platform; Its structural representation is as shown in Figure 5, comprising:
Loading unit 401, resolution unit 402, encapsulation unit 403, registering unit 404 and administrative unit 405;
Wherein:
Loading unit 401 is used for said member is loaded;
Resolution unit 402, the meta data file that is used for resolving said member obtains the file data of said meta data file;
Encapsulation unit 403 is used for according to the said file data that obtains said member being encapsulated as dynamic MBean (Manageable Bean, management component);
Registering unit 404 is used for registering said dynamic MBean as statement formula framework services;
Administrative unit 405 is used to monitor the state of said service, and according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.
The application embodiment also provides another structural representation of component management system as shown in Figure 6, and wherein administrative unit 405 comprises:
Rewrite subelement 406, be used for reading and the property value of rewriting MBean again;
Carry out subelement 407, be used for carrying out the interface method that MBean defines;
Obtain subelement 408, obtain the notification event object that sends among the MBean.
In the administrative unit that the application embodiment provides, also comprise:
Registration subelement 409 is used for obtaining that said service state changes and said service state when loading for service when monitoring, and the MBean of said service correspondence is registered in the MBean server.
Anti-registration subelement 410 is used for obtaining that said service state changes and said service state during for the service unloading, with counter being registered in the MBean server of MBean of said service correspondence when monitoring.
For system embodiment, because it is basically corresponding to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses all is the difference with other embodiment.The above only is the application's a embodiment; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the application's principle; Can also make some improvement and retouching, these improvement and retouching also should be regarded as the application's protection range.

Claims (8)

1. a component management method is characterized in that, said method is provided with the MBean server based on a JMX agent platform in the said JMX agent platform; Said method comprises:
The meta data file that said member is loaded and resolves said member obtains the file data in the said meta data file;
According to the said file data that obtains said member is encapsulated as dynamic MBean (Manageable Bean, management component);
Register said dynamic MBean as statement formula framework services;
Monitor the state of said service, according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.
2. method according to claim 1 is characterized in that, the MBean in the said MBena of the being registered to server is managed comprise:
Read and the property value of rewriting again among the MBean;
Carry out the interface method that defines among the MBean;
Obtain the notification event object that sends among the MBean.
3. method according to claim 1 is characterized in that, said monitoring service state according to the different conditions of said service, is registered to the corresponding MBean of said service in the said MBean server and comprises:
Said service state changes and said service state is when serving loading when monitoring obtains, and corresponding MBean is registered in the MBean server with said service.
4. method according to claim 1 is characterized in that, said monitoring service state according to the different conditions of said service, is registered to the corresponding MBean of said service in the said MBean server and comprises:
Said service state changes and said service state is when serving unloading when monitoring obtains, with corresponding counter being registered in the MBean server of MBean of said service.
5. a component management system is characterized in that, said system is provided with the MBean server based on a JMX agent platform in the said JMX agent platform; Said system comprises:
Loading unit is used for said member is loaded;
Resolution unit, the meta data file that is used for resolving said member obtains the file data of said meta data file;
Encapsulation unit is used for according to the said file data that obtains said member being encapsulated as dynamic MBean (Manageable Bean, management component);
Registering unit is used for registering said dynamic MBean as statement formula framework services;
Administrative unit is used to monitor the state of said service, and according to the different conditions of said service, corresponding MBean is registered in the said MBean server with said service, and said MBean is managed.
6. method according to claim 5 is characterized in that, said administrative unit comprises:
Rewrite subelement, be used for reading and the property value of rewriting MBean again;
Carry out subelement, be used for carrying out the interface method that MBean defines;
Obtain subelement, obtain the notification event object that sends among the MBean.
7. method according to claim 5 is characterized in that, said administrative unit comprises:
The registration subelement is used for obtaining that said service state changes and said service state when loading for service when monitoring, and the MBean of said service correspondence is registered in the MBean server.
8. method according to claim 5 is characterized in that, said administrative unit comprises:
Anti-registration subelement is used for obtaining that said service state changes and said service state during for the service unloading, with counter being registered in the MBean server of MBean of said service correspondence when monitoring.
CN201110264398.6A 2011-09-07 2011-09-07 Component management method and system Active CN102325180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110264398.6A CN102325180B (en) 2011-09-07 2011-09-07 Component management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110264398.6A CN102325180B (en) 2011-09-07 2011-09-07 Component management method and system

Publications (2)

Publication Number Publication Date
CN102325180A true CN102325180A (en) 2012-01-18
CN102325180B CN102325180B (en) 2015-01-07

Family

ID=45452849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110264398.6A Active CN102325180B (en) 2011-09-07 2011-09-07 Component management method and system

Country Status (1)

Country Link
CN (1) CN102325180B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108964987A (en) * 2018-06-15 2018-12-07 平安科技(深圳)有限公司 Data monitoring method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221498A (en) * 2007-01-08 2008-07-16 华为技术有限公司 System and method for managing service modules
CN102158490A (en) * 2011-04-07 2011-08-17 山东中创软件商用中间件股份有限公司 Service switching method based on OSGi and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221498A (en) * 2007-01-08 2008-07-16 华为技术有限公司 System and method for managing service modules
CN102158490A (en) * 2011-04-07 2011-08-17 山东中创软件商用中间件股份有限公司 Service switching method based on OSGi and device thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108964987A (en) * 2018-06-15 2018-12-07 平安科技(深圳)有限公司 Data monitoring method, device, computer equipment and storage medium
WO2019237592A1 (en) * 2018-06-15 2019-12-19 平安科技(深圳)有限公司 Data monitoring method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN102325180B (en) 2015-01-07

Similar Documents

Publication Publication Date Title
US11159411B2 (en) Distributed testing service
US8250521B2 (en) Method and apparatus for the design and development of service-oriented architecture (SOA) solutions
US20210081271A1 (en) Dynamic tracing control
Kircher et al. Pattern-oriented software architecture, patterns for resource management
Distefano et al. A utility paradigm for IoT: The sensing Cloud
US8996714B2 (en) State-dependent entity based implementation of a service oriented architected application
US10440138B2 (en) Provisioning IaaS services
US8239505B2 (en) Progressively implementing declarative models in distributed systems
US9535754B1 (en) Dynamic provisioning of computing resources
US20110196957A1 (en) Real-Time Policy Visualization by Configuration Item to Demonstrate Real-Time and Historical Interaction of Policies
WO2022007638A1 (en) Data processing method, apparatus, device and system
US11327816B2 (en) Monitoring components in a service framework
US20120110545A1 (en) Abstracting transformation for model driven architecture
CN112685020A (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
CN112256406A (en) Operation flow platformization scheduling method
CN113296758B (en) Front-end component library construction method and device and storage medium
CN102325180A (en) Component management method and system
Ceccarelli et al. A service discovery approach for testing dynamic SOAs
CN108197005B (en) Method, medium, equipment and system for monitoring bottom layer operation performance of IOS application
Schmieders et al. Architectural runtime models for privacy checks of cloud applications
US20110023018A1 (en) Software platform and method of managing application individuals in the software platform
US20240111588A1 (en) Intelligent Process Management in Serverless Workflow Cloud Environments
CN112596929B (en) Micro-service registration and calling method based on command event conversion and related device
US20240028360A1 (en) Systems, apparatus, articles of manufacture, and methods for schedule-based lifecycle management of a virtual computing environment
Bałos et al. Open interface for autonomic management of virtualized resources in complex systems—construction methodology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211209

Address after: 250014 No. 41-1 Qianfo Shandong Road, Lixia District, Jinan City, Shandong Province

Patentee after: SHANDONG CIVIC SE COMMERCIAL MIDDLEWARE Co.,Ltd.

Address before: 250014 No. 41-1 Qianfo Shandong Road, Jinan City, Shandong Province

Patentee before: SHANDONG CVIC SOFTWARE ENGINEERING Co.,Ltd.

Patentee before: Shandong Zhongchuang software commercial middleware Co., Ltd

TR01 Transfer of patent right