CN108334374A - The method and apparatus of component dynamic load and execution - Google Patents
The method and apparatus of component dynamic load and execution Download PDFInfo
- Publication number
- CN108334374A CN108334374A CN201710032926.2A CN201710032926A CN108334374A CN 108334374 A CN108334374 A CN 108334374A CN 201710032926 A CN201710032926 A CN 201710032926A CN 108334374 A CN108334374 A CN 108334374A
- Authority
- CN
- China
- Prior art keywords
- model component
- component
- classloader
- run
- model
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of method and apparatus of component dynamic load and execution, are related to component load and operation field.Method therein includes:The class to be run in the model component to be executed and the model component is set, wherein the interface of model component described in the Similar integral to be run in the model component;Create Classloader;The model component is loaded using the Classloader of establishment;Utilize class reflection mode, using the context object of the category information to be run in the model component and the model component as parameter, the service operation method of the Classloader is called to load the runnable interface in the model component to run the operation service of the model component.So that component dynamic load implemented with execution it is simpler.
Description
Technical field
The present invention relates to component load and operation field, the more particularly to methods and dress of a kind of component dynamic load and execution
It sets.
Background technology
Component is usually loaded and runs when application server starts.If component updates, generally require to restart
Application server loads the component.However, may desire to update in the case where not restarting application server sometimes
And charging assembly, i.e. dynamic load component.
OSGI (Open Service Gateway Initiative, open service gateway initiative agreement) is dynamic towards JAVA
States model system allows developer to build mobilism, modular JAVA systems.OSGI by modularization and mobilism come pair
Component carries out dynamic load and executes, wherein modularization refer to a large scale system can be decomposed into it is multiple smaller mutual
The logic unit of cooperation improves the maintainability and encapsulation of system by forcing the logical boundary between setting module.Dynamically
Change refers to the function of providing the dynamic without restarting in multiple network equipment and change construction.The function of OSGI is stronger
Greatly, however, the modular feature to utilize OSGI to provide thereby results in component the characteristics of wouling have to receive its mobilism
Dynamic load implements more complicated with operation.
Invention content
The invention solves a technical problem be:Component dynamic load implements more complicated with operation at present
Problem.
According to an aspect of the present invention, a kind of method of component dynamic load and execution is provided, including:Setting is intended to execute
Model component and the model component in the class to be run, wherein described in the Similar integral to be run in the model component
The interface of model component;Create Classloader;The model component is loaded using the Classloader of establishment;It utilizes
Class reflection mode, using the context object of the category information to be run in the model component and the model component as parameter,
The service operation method of the Classloader is called to load the runnable interface in the model component to run the model component
Operation service.
Wherein it is possible to which the model component to be executed and the model group is arranged in the interface parameters provided by serviced component
The class to be run in part.
Wherein it is possible to Classloader is created by realization URLClassLoader and heavy duty findclass methods,
In, the URLClassLoader of realization is heavily loaded for loading the file for being arbitrarily designated the model component under catalogue
Findclass methods are used for from searching the class to be run in the model component in resources bank, in the resources bank described in caching
The file of model component.
Can be that corresponding Classloader, each class is respectively created in different model components if there is multiple model components
Loader loads corresponding model component.
Component dynamic load and the method for execution further include:Before the operation service for running the model component, utilize
Class reflection mode, using the context object of the category information to be run in the model component and the model component as parameter,
The initial method of the Classloader is called to load the initialization interface in the model component to run the model component
Initialization service.
Component dynamic load and the method for execution further include:After the operation service for running the model component, utilize
Class reflection mode, using the context object of the category information to be run in the model component and the model component as parameter,
The method for cleaning of the Classloader is called to load the cleaning interface in the model component to run the clear of the model component
Reason service;The Classloader is unloaded, the resource that the Classloader occupies is discharged.
According to a further aspect of the invention, a kind of device of component dynamic load and execution is provided, which is characterized in that packet
It includes:Setup module, for the class to be run in the model component to be executed and the model component to be arranged, wherein the mould
The interface of model component described in the Similar integral to be run in type component;Creation module, for creating Classloader;Load-on module,
For being loaded to the model component using the Classloader of establishment;Module is run, for utilizing class reflection mode,
Using the context object of the category information to be run in the model component and the model component as parameter, the class is called to add
The service operation method for carrying device loads the runnable interface in the model component to run the operation service of the model component.
Wherein, the model component to be executed is arranged in the setup module, the interface parameters for being provided by serviced component
And the class to be run in the model component.
Wherein, the creation module, for being created by realization URLClassLoader and heavy duty findclass methods
Classloader, wherein the URLClassLoader of realization is for loading the file for being arbitrarily designated the model component under catalogue, weight
The findclass methods of load are used to, from the class to be run in the model component is searched in resources bank, cache in the resources bank
The file of the model component.
Wherein, the creation module for corresponding Classloader to be respectively created for different model components, also, adds
Module is carried, for loading corresponding model component respectively using each Classloader.
Component dynamic load and the device of execution further include:Initialization module, in the fortune for running the model component
Before row service, using class reflection mode, by the category information to be run in the model component and the model component up and down
Literary object calls the initial method of the Classloader to load the initialization interface in the model component to transport as parameter
The initialization service of the row model component.
Component dynamic load and the device of execution further include:Unload module, in the operation for running the model component
After service, using class reflection mode, by the context of the category information and the model component to be run in the model component
Object calls the method for cleaning of the Classloader to load the cleaning interface in the model component described to run as parameter
The cleaning service of model component;The Classloader is unloaded, the resource that the Classloader occupies is discharged.
According to another aspect of the present invention, a kind of device of component dynamic load and execution is provided, including:Memory;
And it is coupled to the processor of the memory, the processor is configured as based on the instruction being stored in the memory,
The method for executing component dynamic load and execution above-mentioned.
It is simpler that the present invention so that component dynamic load is implemented with execution through the above scheme.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art
With obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow chart of invention components dynamic load and method one embodiment of execution.
Fig. 2 is the flow chart of another embodiment of invention components dynamic load and the method for execution.
Fig. 3 is the deployment of components schematic diagram of the present invention.
Fig. 4 and Fig. 5 is the structure chart of invention components dynamic load and the device embodiment of execution.
Fig. 6 and Fig. 7 is the structure chart of invention components dynamic load and the device embodiment of execution.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes.
In the present invention, component is to refer to complete certain function and be provided out several connecing using this function
The reusable code set of mouth.The function that component internal is specified by multiple classes come cooperative achievement, while component externally exposure one
Or multiple interfaces, it is called for the external world.Plug-in unit, frame etc. belong to the scope of component.The dynamic load of component and execution refer to
Simultaneously executive module can be loaded in the case of not restarting application server.
More complicated problem is implemented for current component dynamic load and operation, proposes the present invention.The present invention is logical
After the Classloader newly created dynamically stress model component, and the service in utilization class reflection mode moving model component, make
Component dynamic load implemented with execution it is simpler.
Fig. 1 is the flow diagram of invention components dynamic load and method one embodiment of execution.As shown in Figure 1,
This method 100 includes:
The class to be run in the model component and model component to be executed is arranged, wherein is intended to transport in model component in S102
The interface of capable Similar integral model component.
A kind of method, the model component and model group that the interface parameters setting that can be provided by serviced component to be executed
The class to be run in part.
Wherein, model component refers to that the component executed will be needed to be packaged (JAR packets or ZIP packets) and be put under specified directory.
In the present invention, under model component can be put into specified directory before application server startup or after starting.Model component
Application programming interfaces (API) including being supplied to application developer allow application developer to be connect by API self-definition models
Mouth and related service.
Wherein, (these classes belong to the core of container to the class needed when including mainly component startup and operation in serviced component
Class).Serviced component is used for the dynamic load and implementation procedure of Controlling model component, for example, the decompression of model component packet, class load
Establishment, load, operation and destruction of device etc..
S104 creates Classloader.
A kind of method can be created by realization URLClassLoader and heavy duty findclass (finding class) methods
Classloader.URLClassLoader is the subclass of ClassLoader, can search for road from the URL for being directed toward jar file and catalogue
Diameter loading classes and resource, namely can be loaded by URLClassLoader in the class to memory in specified jar file, to make
The URLClassLoader that must be realized can load the file for being arbitrarily designated catalogue drag component.The side findclass of heavy duty
Method is used for from searching the class to be run in model component in resources bank, the file of cache model component, model component in resources bank
File can be stored in resources bank in a manner of URL.
Can be that corresponding Classloader, each class is respectively created in different model components if there is multiple model components
Loader loads corresponding model component.So that have good isolation between model component, the advantages of isolation pair
It is extremely important for the model component for having operating status so as to have the model component of operating status that can pay close attention to this when realizing
Model component, without excessively considering other model components, therefore so that there is the model component of operating status to implement more
Simply.
S106 loads model component using the Classloader of establishment, also i.e. by the model component under specified directory
All files recurrence be added to Classloader complete model component loading procedure.
S108, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, the runnable interface in the service operation method stress model component of Classloader is called to carry out the fortune of moving model component
Row service.
Wherein, the runnable interface for the Similar integral model component to be run in model component, so as to utilize class reflection side
The operation service of formula moving model component.
Wherein, operation service is such as including service service logic, calculation procedure, data storage.
Said program passes through the Classloader dynamically stress model component, and utilization class reflection mode operation newly created
Service in model component so that component dynamic load implements simpler with execution.
Fig. 2 is the flow diagram of another embodiment of invention components dynamic load and the method for execution.Such as Fig. 2 institutes
Show, this method 200 includes:
The class to be run in the model component and model component to be executed is arranged, wherein is intended to transport in model component in S202
The interface of capable Similar integral model component.
S204 creates Classloader.
S206 loads model component using the Classloader of establishment, also i.e. by the model component under specified directory
All files recurrence be added to Classloader complete model component loading procedure.
S207, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, the initialization interface in the initial method stress model component of Classloader is called to carry out the first of moving model component
Beginningization services.To keep the operation of program more reliable and more stable.
Wherein, the initialization interface for the Similar integral model component to be run in model component, so as to be reflected using class
The initialization service of mode moving model component.
Wherein, initialization service such as including configuration file the load of load, journal file, the load of cache information
Service.
S208, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, the runnable interface in the service operation method stress model component of Classloader is called to carry out the fortune of moving model component
Row service.
S209, after the operation service of moving model component, using class reflection mode, by what is run in model component
The context object of category information and model component calls clear in the method for cleaning stress model component of Classloader as parameter
Reason interface carrys out the cleaning service of moving model component;Unload Classloader, the resource that release Classloader occupies.To release in time
Place system resource.
Wherein, the cleaning interface for the Similar integral model component to be run in model component, so as to utilize class reflection side
The cleaning service of formula moving model component.
Wherein, cleaning service is for example including the connection of release database, cleaning memory object, cleaning temporary file, end lines
The services such as journey.
Wherein, step S202, the specific implementation of S204, S206, S208 can refer to step S102, S104, S106,
S108, which is not described herein again.
Illustrate the realization process of said modules dynamic load, execution, unloading etc. with reference to an application examples.
With reference to deployment of components schematic diagram shown in Fig. 3, deployment of components is placed on WEB-INF in J2EE application servers
Under catalogue.WEB-INF catalogues include mainly configuration file aliddin.config and catalogue module, lib.Wherein,
Aliddin.config is mainly used to the deposit position of the associated documents of designated model component, such as aliddin.config
=... WEB-INF module.Lib catalogues are used to store associated documents (such as jd-aladdin- of serviced component
) and its third party's kit etc. for using service.jar.Include mainly that component starts in jd-aladdin-service.jar
Class (these classes belong to the core classes of container) with being needed when operation, is mainly used for dynamic load and the execution of Controlling model component
Process, for example, establishment, load, operation and the destruction of decompression, Classloader etc. of model component packet.Module catalogues are used for depositing
Put the associated documents of model component, the associated documents (i.e. model component packet) of typically packed model component, such as model_
Pbs_JAR_20160613145440.jar, naming rule are, for example, model prefix _ business abbreviation _ model Packet type _ model life
At date .zip.Content after model_pbs_JAR_20160613145440.jar decompressions includes classes catalogues and lib mesh
Record.Classes catalogues are used to store class file, property file, configuration file etc., and the class to be run in model component is placed on the mesh
Under record.Lib catalogues are used for having the expanding packet used for application developer, interface packet (such as jd-aladdin- of model component
Module.jar it) is placed under the catalogue.When making model packet, need to download jd-aladdin-module.jar interface packets, and
According to the interface exploitation application program that interface packet provides, model file is then broken into jar packets or zip packets, is put into specified
Catalogue under, specified catalogue is configured in aliddin.config files.
Based on the good component of above-mentioned deployment, then the operations such as following component dynamic load, execution, unloading can be carried out.
First, invocation component building method ModuleLoaderManage (String moduleName) settings are intended to execute
Model component moduleName, moduleName be for example set as model_pbs_JAR_20160613145440.jar.
Then, decompression model method unzipModule () is called to decompress model component packet model_pbs_JAR_
20160613145440.jar.Wherein, the jar packets in model component packet (for example, interface packet jd-aladdin-module.jar)
It is put under lib catalogues, the non-jar packets (such as class file, property file, configuration file etc.) in model component packet are put into
Under classes catalogues.Whether this method can be extracted with inspection model component packet, and the model component packet that solution presses through will not repeat
Decompression and load.
Then, Classloader creation method createModuleClassLoader () is called to create a new class load
Device.As previously mentioned, this method can be by realizing that simultaneously heavy duty findclass methods load URLClassLoader to create class
Device, and all files recurrence of the model component under specified directory is added to the load that the Classloader completes model component
Journey.
Then, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, initial method runInitService (the String runClass, String of Classloader are called
Params) the initialization interface initModule in stress model component (ModuleContext context) carrys out moving model
The initialization service of component such as loads SPRING, initialization caching and database.
Wherein, initial method runInitService (String runClass, String params) is used for running
The initialization service of model component, parameter runClass are the complete trails title for the class to be run, the Similar integral mould to be run
The initialization interface of type component, parameter params are the context object of model component.
Wherein, initialization interface initModule (ModuleContext context) is used for carrying out just model component
Beginningization, parameter context are the context object of model component.
Then, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, service operation method runExeService (the String runClass, String of Classloader are called
Params) the runnable interface runService in stress model component (ModuleContext context) carrys out moving model group
The operation service of part executes specific model manipulation.
Wherein, service operation method runExeService (String runClass, String params) is used for running
The operation service of model component, parameter runClass are the complete trails title for the class to be run, the Similar integral model to be run
The runnable interface of component, parameter params are the context object of model component.Its specific code is:
Wherein, runnable interface runService (ModuleContext context) is used for moving model service, parameter
Context is the context object of model component.
Then, using class reflection mode, by the context object of the category information to be run in model component and model component
As parameter, the method for cleaning runFinishModule (String runClass, String params) of Classloader is called
Cleaning interface finishModule (ModuleContext context) in stress model component carrys out the clear of moving model component
Reason service, such as release caching, release database connection etc..
Wherein, method for cleaning runFinishModule (String runClass, String params) is used for running mould
The cleaning service of type component, parameter runClass are the complete trails title for the class to be run, the Similar integral model group to be run
The cleaning interface of part, parameter params are the context object of model component.
Wherein, cleaning interface finishModule (ModuleContext context) is used for carrying out model component clear
Reason, parameter context are the context object of model component.
Finally, uninstallClassLoader () method is called to unload Classloader, the money that release Classloader occupies
Source.To timely free system resources.
Fig. 4 and Fig. 5 is the structural schematic diagram of invention components dynamic load and the device embodiment of execution.Such as Fig. 4 and Fig. 5
Shown, which includes:
Setup module 402, for the class to be run in the model component and model component to be executed to be arranged, wherein mould
The interface for the Similar integral model component to be run in type component;
Creation module 404, for creating Classloader;
Load-on module 406, for being loaded to model component using the Classloader of establishment;
Module 408 is run, for utilizing class reflection mode, by the category information to be run in model component and model component
Context object calls the runnable interface in the service operation method stress model component of Classloader to run mould as parameter
The operation service of type component.
Wherein, setup module 402, for being provided by serviced component interface parameters setting the model component to be executed with
And the class to be run in model component.
Wherein, creation module 404, for being created by realization URLClassLoader and heavy duty findclass methods
Classloader, wherein the URLClassLoader of realization is heavily loaded for loading the file for being arbitrarily designated catalogue drag component
Findclass methods are used for from searching the class to be run in model component in resources bank, the text of cache model component in resources bank
Part.
Wherein, creation module 404 for corresponding Classloader to be respectively created for different model components, also, load
Module 406, for loading corresponding model component respectively using each Classloader.
As shown in figure 5, the device 500 further includes:Initialization module 507, for the operation service in moving model component
Before, using class reflection mode, using the context object of the category information to be run in model component and model component as parameter,
The initialization interface in the initial method stress model component of Classloader is called to carry out the initialization service of moving model component.
As shown in figure 5, the device 500 further includes:Unload module 509, for moving model component operation service it
Afterwards, it is adjusted using the context object of the category information to be run in model component and model component as parameter using class reflection mode
With the cleaning interface in the method for cleaning stress model component of Classloader come the cleaning service of moving model component;Unloading class adds
Carry device, the resource that release Classloader occupies.
Fig. 6 is the structure chart of one embodiment of the device of invention components dynamic load and execution.As shown in fig. 6, should
The device 600 of embodiment includes:Memory 610 and the processor 620 for being coupled to the memory 610, processor 620 are configured
Based on the instruction being stored in memory 610, to execute component dynamic load and the execution in any one aforementioned embodiment
Method.
Wherein, memory 610 is such as may include system storage, fixed non-volatile memory medium.System stores
Device is such as being stored with operating system, application program, Boot loader (Boot Loader) and other programs.
Fig. 7 is the structure chart of another embodiment of the device of invention components dynamic load and execution.As shown in fig. 7,
The device 700 of the embodiment includes:Memory 610 and processor 620 can also connect including input/output interface 730, network
Mouth 740, memory interface 750 etc..Can for example it lead between these interfaces 730,740,750 and memory 610 and processor 620
Cross the connection of bus 760.Wherein, input/output interface 730 is display, the input-output equipment such as mouse, keyboard, touch screen provide
Connecting interface.Network interface 740 provides connecting interface for various networked devices.Memory interface 750, which is that SD card, USB flash disk etc. are external, to be deposited
It stores up equipment and connecting interface is provided.
Those skilled in the art should be understood that the embodiment of the present invention can be provided as method, system or computer journey
Sequence product.Therefore, complete hardware embodiment, complete software embodiment or combining software and hardware aspects can be used in the present invention
The form of embodiment.Moreover, the present invention can be used in one or more wherein include computer usable program code calculating
Machine can use the meter implemented on non-transient storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of calculation machine program product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It is interpreted as to be realized by computer program instructions each in flowchart and/or the block diagram
The combination of flow and/or box in flow and/or box and flowchart and/or the block diagram.These computer journeys can be provided
Sequence instruct to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor with
Generate a machine so that the instruction generation executed by computer or the processor of other programmable data processing devices is used for
Realize the dress for the function of being specified in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes
It sets.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (13)
1. a kind of method of component dynamic load and execution, which is characterized in that including:
The class to be run in the model component to be executed and the model component is set, wherein is intended to transport in the model component
The interface of model component described in capable Similar integral;
Create Classloader;
The model component is loaded using the Classloader of establishment;
Using class reflection mode, the context object of the category information to be run in the model component and the model component is made
For parameter, the service operation method of the Classloader is called to load the runnable interface in the model component to run the mould
The operation service of type component.
2. the method as described in claim 1, which is characterized in that the interface parameters setting provided by serviced component to be executed
The class to be run in model component and the model component.
3. the method as described in claim 1, which is characterized in that by realizing URLClassLoader and heavy duty findclass
Method creates Classloader, wherein the URLClassLoader of realization is arbitrarily designated the model group under catalogue for loading
The file of part, heavily loaded findclass methods are used for from searching the class to be run in the model component, the money in resources bank
The file of the model component is cached in the library of source.
4. the method as described in claim 1, which is characterized in that corresponding class load is respectively created for different model components
Device, each Classloader load corresponding model component.
5. the method as described in claim 1, which is characterized in that further include:
Before the operation service for running the model component, using class reflection mode, by what is run in the model component
The context object of category information and the model component is called as parameter described in the initial method load of the Classloader
Initialization interface in model component runs the initialization service of the model component.
6. the method as described in claim 1, which is characterized in that further include:
After the operation service for running the model component, using class reflection mode, by what is run in the model component
The context object of category information and the model component calls the method for cleaning of the Classloader to load the mould as parameter
Cleaning interface in type component runs the cleaning service of the model component;
The Classloader is unloaded, the resource that the Classloader occupies is discharged.
7. a kind of device of component dynamic load and execution, which is characterized in that including:
Setup module, for the class to be run in the model component to be executed and the model component to be arranged, wherein the mould
The interface of model component described in the Similar integral to be run in type component;
Creation module, for creating Classloader;
Load-on module, for being loaded to the model component using the Classloader of establishment;
Module is run, for utilizing class reflection mode, by the category information to be run in the model component and the model component
Context object as parameter, call the operation that the service operation method of the Classloader loads in the model component to connect
Mouthful run the operation service of the model component.
8. device as claimed in claim 7, which is characterized in that the setup module connects for what is provided by serviced component
The class to be run in model component and the model component that mouth parameter setting to be executed.
9. device as claimed in claim 7, which is characterized in that the creation module is realized for passing through
URLClassLoader and heavy duty findclass methods create Classloader, wherein the URLClassLoader of realization is used for
Load is arbitrarily designated the file of the model component under catalogue, and heavily loaded findclass methods from resources bank for searching institute
The class to be run in model component is stated, the file of the model component is cached in the resources bank.
10. device as claimed in claim 7, which is characterized in that
The creation module is used for corresponding Classloader, also, load-on module to be respectively created for different model components
In loading corresponding model component respectively using each Classloader.
11. device as claimed in claim 7, which is characterized in that further include:
Initialization module is used for before the operation service for running the model component, using class reflection mode, by the model
The context object of the category information and the model component to be run in component calls the initial of the Classloader as parameter
Change method loads the initialization interface in the model component to run the initialization service of the model component.
12. device as claimed in claim 7, which is characterized in that further include:
Unload module is used for after the operation service for running the model component, using class reflection mode, by the model group
The context object of the category information and the model component to be run in part calls the cleaning side of the Classloader as parameter
Method loads the cleaning interface in the model component to run the cleaning service of the model component;The Classloader is unloaded,
Discharge the resource that the Classloader occupies.
13. a kind of device of component dynamic load and execution, which is characterized in that including:
Memory;And
It is coupled to the processor of the memory, the processor is configured as based on the instruction being stored in the memory,
The method for executing the component dynamic load and execution as described in any one of claim 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710032926.2A CN108334374A (en) | 2017-01-18 | 2017-01-18 | The method and apparatus of component dynamic load and execution |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710032926.2A CN108334374A (en) | 2017-01-18 | 2017-01-18 | The method and apparatus of component dynamic load and execution |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108334374A true CN108334374A (en) | 2018-07-27 |
Family
ID=62922631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710032926.2A Pending CN108334374A (en) | 2017-01-18 | 2017-01-18 | The method and apparatus of component dynamic load and execution |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108334374A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684089A (en) * | 2018-12-18 | 2019-04-26 | 创新奇智(广州)科技有限公司 | A kind of method for scheduling task based on prediction model, system and electronic equipment |
CN110096315A (en) * | 2019-03-22 | 2019-08-06 | 华为技术有限公司 | A kind of component loading method and device |
CN113253990A (en) * | 2020-02-13 | 2021-08-13 | 北京沃东天骏信息技术有限公司 | Method, device, equipment and computer readable medium for updating software |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354696A (en) * | 2008-09-08 | 2009-01-28 | 北京航空航天大学 | Data integration and application service system based on electric communication field sharing information model |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN104536737A (en) * | 2014-12-16 | 2015-04-22 | 深圳市金证科技股份有限公司 | Program development framework based on assemblies |
CN105404524A (en) * | 2014-09-15 | 2016-03-16 | 阿里巴巴集团控股有限公司 | Class loading and isolating method and apparatus in Java application |
CN106201862A (en) * | 2015-05-25 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Web services method for testing pressure and device |
-
2017
- 2017-01-18 CN CN201710032926.2A patent/CN108334374A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354696A (en) * | 2008-09-08 | 2009-01-28 | 北京航空航天大学 | Data integration and application service system based on electric communication field sharing information model |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN105404524A (en) * | 2014-09-15 | 2016-03-16 | 阿里巴巴集团控股有限公司 | Class loading and isolating method and apparatus in Java application |
CN104536737A (en) * | 2014-12-16 | 2015-04-22 | 深圳市金证科技股份有限公司 | Program development framework based on assemblies |
CN106201862A (en) * | 2015-05-25 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Web services method for testing pressure and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684089A (en) * | 2018-12-18 | 2019-04-26 | 创新奇智(广州)科技有限公司 | A kind of method for scheduling task based on prediction model, system and electronic equipment |
CN109684089B (en) * | 2018-12-18 | 2020-08-18 | 创新奇智(广州)科技有限公司 | Task scheduling method and system based on prediction model and electronic equipment |
CN110096315A (en) * | 2019-03-22 | 2019-08-06 | 华为技术有限公司 | A kind of component loading method and device |
CN113253990A (en) * | 2020-02-13 | 2021-08-13 | 北京沃东天骏信息技术有限公司 | Method, device, equipment and computer readable medium for updating software |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111258609B (en) | Upgrading method and device of Kubernetes cluster, electronic equipment and medium | |
CN108958796B (en) | Service request processing method and device and service request processing system | |
CN104714828B (en) | Using installation, operation method and device | |
CN111324571B (en) | Container cluster management method, device and system | |
CN102411506B (en) | Java-system business-unit plug-in type managing system and dynamic business-function changing method | |
US10303450B2 (en) | Systems and methods for a policy-driven orchestration of deployment of distributed applications | |
CN104750528B (en) | A kind of assembly management method and apparatus in Android program | |
CN111984269B (en) | Method for providing application construction service and application construction platform | |
CN107463432A (en) | Server production environment dispositions method, device, electronic equipment and storage medium | |
CN105224466A (en) | A kind of integration test method based on Docker and system | |
US10594800B2 (en) | Platform runtime abstraction | |
WO2022037612A1 (en) | Method for providing application construction service, and application construction platform, application deployment method and system | |
CN107885551A (en) | A kind of service arrangement method, apparatus, computer-readable recording medium and storage control | |
CN104834541B (en) | Function module hanging method, carry system and the method for updating carry system | |
US8499294B2 (en) | Persisting the changes for managed components in an application server | |
CN103353845A (en) | Method and device for uploading and pushing script | |
CN106569880B (en) | Method and system for dynamically sharing resources between Android applications | |
CN103942281A (en) | Method and device for operating object persistently stored | |
US20080229274A1 (en) | Automating Construction of a Data-Source Interface For Component Applications | |
US9122559B2 (en) | Extensible dependency management framework and method | |
JP2017091533A (en) | Bi-directional synchronization of data between product lifecycle management (plm) system and source code management (scm) system | |
CN108334374A (en) | The method and apparatus of component dynamic load and execution | |
CN116783581A (en) | Deploying software release on a data center configured in a cloud platform | |
CN114675934A (en) | Method and system for deploying chain code in alliance chain | |
CN114675935A (en) | Method and system for deploying chain code in alliance chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180727 |