CN106980512A - Update the system and method for JAVA application services - Google Patents

Update the system and method for JAVA application services Download PDF

Info

Publication number
CN106980512A
CN106980512A CN201710337690.3A CN201710337690A CN106980512A CN 106980512 A CN106980512 A CN 106980512A CN 201710337690 A CN201710337690 A CN 201710337690A CN 106980512 A CN106980512 A CN 106980512A
Authority
CN
China
Prior art keywords
classloader
jar file
java application
jar
file
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
Application number
CN201710337690.3A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN201710337690.3A priority Critical patent/CN106980512A/en
Publication of CN106980512A publication Critical patent/CN106980512A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Abstract

The invention discloses a kind of system and method for renewal JAVA application services, wherein, the system includes:File acquisition module, the jar file to be updated for obtaining;Processing module is updated, the jar file is loaded for creating the first Classloader corresponding with the jar file, and by first Classloader;Wherein, first Classloader is used to load the jar file and binds set membership with JAVA Classloaders.Using the present invention, prior art can be avoided to restart the inconvenience that JAVA application servers are brought to update JAVA application services.

Description

Update the system and method for JAVA application services
Technical field
The present invention relates to field of software development and JAVA fields, more particularly, it is related to a kind of JAVA that updates and applies The system and method for service.
Background technology
The way of more universal upgrading JAVA application services is to restart server mode now, specifically, using such as Lower step:
(1) JAVA application servers are stopped.
(2) upgrading deployment JAVA application services.
(3) JAVA application servers are opened, allow newly deployed JAVA application services to come into force.
Be present many defects in this upgrading mode, illustrated below by taking China Construction Bank's problem encountered as an example.
On the one hand, in project development process, if the project be total branch's co-development pattern (for example, head office develop Overall framework and common service module, the module of exploitation branch of branch differentiation), then in System Integration Test, family more than 30 point Row is likely to change version at any time to solve test problem.Continually restart service daily, overall testing progress can be influenceed And test effect, cause project process out of control.
On the other hand, received in current system to head office, concentrate exploitation, concentrate deployment to be a trend.In agent service neck Domain, the Agent-Operation-Platform system that head office of China Construction Bank concentrates is a system for providing service in 7X24 hours.It is new when having Agent service product when reaching the standard grade, if continued by the way of server is restarted, the service quality of bank can be reduced, be unfavorable for Lift customer experience.
Another further aspect, the Agent-Operation-Platform system that head office of China Construction Bank concentrates uses total branch's co-development Pattern, head office's exploitation overall framework and common service module, the module of exploitation branch of branch differentiation.When there is new agent service During demand, differentiation exploitation is carried out for new agent service in lines, if by the way of server is restarted, needing to wait Unified time window carries out version and reached the standard grade operation, and this undoubtedly delays the production time of new product, weakens industrial competition.
The content of the invention
In view of the drawbacks described above of prior art, embodiment of the present invention provides a kind of system of renewal JAVA application services And method, it is possible to increase JAVA application services the flexibility in terms of upgrading and in terms of project development have it is many excellent Gesture.
Specifically, embodiment of the present invention provides a kind of system of renewal JAVA application services, and it includes:
File acquisition module, the jar file to be updated for obtaining;
Processing module is updated, for creating the first Classloader corresponding with the jar file, and passes through the first kind Loader loads the jar file;
Wherein, first Classloader is used to load the jar file and binds set membership with JAVA Classloaders.
Correspondingly, embodiment of the present invention additionally provides a kind of method for being used to update JAVA application services, and it includes:
Obtain jar file to be updated;
The first Classloader corresponding with the jar file is created, and the JAR is loaded by first Classloader File;
Wherein, first Classloader is used to load the jar file and binds set membership with JAVA Classloaders.
In addition, embodiment of the present invention additionally provides a kind of system of renewal JAVA application services, it includes:
Jar file service is updated, for receiving jar file and sending renewal request;
Classloader manager, is loaded for responding the request establishment first kind corresponding with the jar file that updates Device;
Wherein, first Classloader inherits JAVA Classloaders and for loading the jar file.
Using embodiment of the present invention, by creating the Classloader for loading this document for jar file to be updated, And jar file is loaded by the Classloader of establishment, restart so as to avoid prior art to update JAVA application services The inconvenience that JAVA application servers are brought.More specifically, with following beneficial effects:
(1) when team develops, during System Integration Test, present invention upgrading JAVA application services, Ke Yibao are passed through Team Member is demonstrate,proved in the JAVA application services for oneself exploitation of upgrading, the JAVA application clothes for not influenceing other members of team to be developed Business.Reach the purpose for improving testing efficiency, ensureing project process.
(2) during online implementing operation, present invention upgrading JAVA application services are passed through, it is ensured that in upgrading JAVA During application service, it is not necessary to stop JAVA application servers, allow and do not belong to JAVA applications in the range of this upgrading, being currently running Service is unaffected.Reach lifting service quality, improve the purpose of customer experience.
(3) when total branch's co-development, system are concentrated and be deployed in head office, by present invention upgrading JAVA application services, Branch can be allowed to issue the JAVA programs oneself developed by merchandising and come into force in real time.Reach quick response business demand, raising The purpose of industrial competition.
Brief description of the drawings
Fig. 1 is one of the block diagram of the system of a kind of renewal JAVA application services according to embodiments of the present invention;
Fig. 2 is one of the schematic flow sheet of the method for a kind of renewal JAVA application services according to embodiments of the present invention;
Fig. 3 is a kind of another example of the block diagram of the system of renewal JAVA application services according to embodiments of the present invention;
Fig. 4 is a kind of the another of the schematic flow sheet of the method for renewal JAVA application services according to embodiments of the present invention Example;
Fig. 5 is the schematic flow sheet that a kind of proof according to embodiments of the present invention calls JAVA programs.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described.
In some flows of description in description and claims of this specification and above-mentioned accompanying drawing, contain according to Particular order occur multiple operations, but it should be clearly understood that these operation can not herein occur according to it is suitable Sequence is performed or performed parallel, and the sequence number such as 101,102 etc. of operation is only used for distinguishing each different operation, sequence number Any execution sequence is not represented for itself.In addition, these flows can include more or less operations, and these operations can To perform or perform parallel in order.It should be noted that the description such as " first ", " second " herein, is to be used to distinguish not Same message, equipment, module etc., does not represent sequencing, it is different types also not limit " first " and " second ".
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, the every other implementation that those skilled in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Fig. 1 is a kind of block diagram of the system of renewal JAVA application services according to embodiments of the present invention.Reference picture 1, it is described System includes file acquisition module 10 and updates processing module 20, and lower mask body is illustrated.
In the present embodiment, file acquisition module 10 is used to obtain jar file to be updated.For example, by operating personnel master It is dynamic to upload jar file, automatic upload jar file or the active request jar file of file acquisition module 10, so as to obtain jar file.
In the present embodiment, updating processing module 20 is used to create the first Classloader corresponding with the jar file, and The jar file is loaded by first Classloader.Wherein, first Classloader is used to load the jar file And bind set membership with JAVA Classloaders.
The system provided using the present embodiment, is added by being created for jar file to be updated for loading the class of this document Device is carried, and jar file is loaded by the Classloader of establishment, is weighed so as to avoid prior art to update JAVA application services Open the inconvenience that JAVA application servers are brought.
Alternatively, in a kind of implementation of the present embodiment, as shown in dotted line frame in Fig. 1, updating processing module 20 can So that including pretreatment submodule, the pretreatment submodule is used to judge whether there is corresponding with the jar file second Loader, if it is present discharging second Classloader, then creates first Classloader by creation module 20 again. If it does not exist, then directly creating first Classloader.
It should be noted that " the first Classloader corresponding with the jar file " that is referred in the present invention refers to be used for Load the Classloader of the jar file;" the second Classloader corresponding with the jar file " referred in the present invention refers to The Classloader of the file before renewal for loading the jar file.Exemplarily, jar file before the update with after renewal All there is identical mark (for example, filename).
In the implementation, pretreatment submodule can be it is determined that during in the presence of the second Classloader, load to Equations of The Second Kind Device sends turn-off request, and so that the second Classloader unloads the jar file that it currently loads, (that is, described jar file is before the update File).
Alternatively, in a kind of implementation of the present embodiment, the first Classloader is used to loading and/or reloading finger Determine the jar file under path.
Fig. 2 is a kind of schematic flow sheet of the method for renewal JAVA application services according to embodiments of the present invention, reference picture 2, methods described includes:
200:Obtain jar file to be updated.
202:Create the first Classloader corresponding with the jar file.
204:The jar file is loaded by first Classloader.
In the present embodiment, first Classloader is used to load the jar file and bound with JAVA Classloaders Set membership.
The method provided using the present embodiment, is added by being created for jar file to be updated for loading the class of this document Device is carried, and jar file is loaded by the Classloader of establishment, is weighed so as to avoid prior art to update JAVA application services Open the inconvenience that JAVA application servers are brought.
Alternatively, in a kind of implementation of the present embodiment, in processing 202, after the jar file is obtained, Judge whether there is the second Classloader corresponding with the jar file;If there is second Classloader, then release Second Classloader is put, first Classloader is then created.
Exemplarily, in this implementation, when it is determined that there is Equations of The Second Kind and be mingled with device, sent out to second Classloader Turn-off request is sent to unload the jar file currently loaded so as to second Classloader.
Alternatively, in a kind of implementation of the present embodiment, the first Classloader is used to loading and/or reloading finger Determine the jar file under path.
Fig. 3 is a kind of block diagram of the system of renewal JAVA application services according to embodiments of the present invention.Because the present invention is carried The system of confession need not restart JAVA application servers when updating JAVA application services, so, the present embodiment can also be provided System be referred to as heat upgrading JAVA application service systems.Reference picture 3, the system includes updating jar file service and Classloader Manager.It is specifically described below.
In the present embodiment, updating jar file service is used to receive jar file and sends renewal request, specifically, example Such as, after the completion of jar file is received, Classloader manager is notified to load the jar file.
In the present embodiment, Classloader manager asks to create corresponding with the jar file for responding described update The first Classloader (as illustrated with the dotted box), wherein, first Classloader, which inherits JAVA Classloaders, to be simultaneously used to load The jar file.
Alternatively, in a kind of implementation of the present embodiment, the Classloader management is additionally operable to perform following processing At least one of:Classloader is preserved, Classloader is obtained, obtains class object.
Alternatively, in a kind of implementation of the present embodiment, Classloader manager can provide Classloader (including from Define Classloader) management function, these functions can include:Created for specified jar file (for example, JAR archive files) Build self defined class loader;Self defined class loader is re-created for specified JAR archive files;A self defined class is preserved to add Carry device;Obtain a self defined class loader;Obtain class object.
There is provided a kind of system of renewal JAVA application services in a kind of variation of the present embodiment, the system includes class Loader, Classloader manager and renewal jar file service, wherein, Classloader can be managed by Classloader and created, Can be obtained from third party.In addition, illustrating on various pieces, refer to the description in embodiment illustrated in fig. 3.This Place is repeated no more.
Fig. 4 is a kind of schematic flow sheet of the method for renewal JAVA application services according to embodiments of the present invention.Reference picture 4, methods described includes:
Step a:When operator needs to update (for example, upgrading) JAVA application services, jar file service is updated by calling Upload jar file.
Step b:Update jar file service to have received after jar file, notify Classloader manager to perform renewal processing.
Step c:Classloader manager is received after renewal request, is first determined whether corresponding to the jar file that request updates Self defined class loader whether there is, if it is present notifying the Classloader to discharge the Classloader after closing.
Step d:Self defined class loader is received after turn-off request, the corresponding jar file of unloading.
Step e:Classloader manager is that jar file creates a corresponding self defined class loader, and notifies such Class object in loader loading jar file.
Step f:Self defined class loader is received after load request, the specified jar file of loading, and is loaded with JAVA classes Device binds set membership.
Using method shown in Fig. 4, restarting JAVA application servers can be avoided and JAVA application services are realized more Newly, so as to solve problem caused by many JAVA application servers because of restarting.More specifically, using the present embodiment figure 1 any embodiment into embodiment illustrated in fig. 4, has but is not limited to following beneficial aspects:
(1) when team develops, during System Integration Test, present invention upgrading JAVA application services, Ke Yibao are passed through Team Member is demonstrate,proved in the JAVA application services for oneself exploitation of upgrading, the JAVA application clothes for not influenceing other members of team to be developed Business.Reach the purpose for improving testing efficiency, ensureing project process.
(2) during online implementing operation, present invention upgrading JAVA application services are passed through, it is ensured that in upgrading JAVA During application service, it is not necessary to stop JAVA application servers, allow and do not belong to JAVA applications in the range of this upgrading, being currently running Service is unaffected.Reach lifting service quality, improve the purpose of customer experience.
(3) when total branch's co-development, system are concentrated and be deployed in head office, by present invention upgrading JAVA application services, Branch can be allowed to issue the JAVA programs oneself developed by merchandising and come into force in real time.Reach quick response business demand, raising The purpose of industrial competition.
Fig. 5 is the schematic flow sheet that a kind of proof according to embodiments of the present invention calls JAVA programs.The embodiment can be with System and the feasibility of method for proving the renewal JAVA application services that the present invention is provided.
Reference picture 5, when calling JAVA programs, using following steps:
Step A:When some class in the JAR archive files in JAVA programs heat upgrading category, (that is, JAR texts are called in application Some class in part) when, the acquisition class object method of the JAVA routine call Classloader managers.
Step B:Classloader manager is received after the request for obtaining class object, first determines whether that the corresponding class of jar file adds Carry device whether there is, if it does not exist, then creating a Classloader for jar file, and notify the Classloader to load JAR texts Class object in part.
Step C:Self defined class loader is received after the load request that Classloader management is sent, specified by loading Jar file, and bind set membership with JAVA Classloaders.
Step D:Classloader manager is found after the corresponding self defined class loader of jar file, applies for called class Object.
Step E:Self defined class loader, which is received, to be called after application, apllied class is returned to, if apllied class is not deposited Then attempting to apply and return from parent loader.
Calling for JAVA programs can be achieved in the method provided using the present embodiment, also demonstrates present invention The system and the feasibility of method of the renewal JAVA application services of offer.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description, The specific work process of module, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Understood based on such, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Order is to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Method described in some parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (11)

1. a kind of system of renewal JAVA application services, it is characterised in that the system includes:
File acquisition module, the jar file to be updated for obtaining;
Processing module is updated, for creating the first Classloader corresponding with the jar file, and is loaded by the first kind Device loads the jar file;
Wherein, first Classloader is used to load the jar file and binds set membership with JAVA Classloaders.
2. the system as claimed in claim 1, it is characterised in that the renewal processing module also includes:
Submodule is pre-processed, for judging whether there is the second Classloader corresponding with the jar file, if there is Second Classloader, then discharge second Classloader, and then creating the first kind by the renewal processing module adds Carry device.
3. system as claimed in claim 2, it is characterised in that
The pretreatment submodule sends to close to second Classloader and asked when it is determined that there is second Classloader Ask so that second Classloader unloads the jar file currently loaded.
4. system as claimed in claim 1 or 2, it is characterised in that
First Classloader can load and/or reload the jar file under specified path.
5. a kind of method of renewal JAVA application services, it is characterised in that methods described includes:
Obtain jar file to be updated;
The first Classloader corresponding with the jar file is created, and the JAR texts are loaded by first Classloader Part;
Wherein, first Classloader is used to load the jar file and binds set membership with JAVA Classloaders.
6. method as claimed in claim 5, it is characterised in that establishment first kind loading corresponding with the jar file Device, including:
After the jar file is obtained, judge whether there is the second Classloader corresponding with the jar file;
If there is second Classloader, then second Classloader is discharged, then create first Classloader.
7. method as claimed in claim 6, it is characterised in that establishment first kind loading corresponding with the jar file Device, including:
When it is determined that there is second Classloader, turn-off request is sent so as to the Equations of The Second Kind to second Classloader The jar file that loader unloading is currently loaded.
8. the method as any one of claim 5 or 6, it is characterised in that
First Classloader can load and/or reload the jar file under specified path.
9. a kind of system of renewal JAVA application services, it is characterised in that the system includes:
Jar file service is updated, for receiving jar file and sending renewal request;
Classloader manager, asks to create the first Classloader corresponding with the jar file for responding described update;
Wherein, first Classloader inherits JAVA Classloaders and for loading the jar file.
10. system as claimed in claim 9, it is characterised in that the Classloader management is additionally operable to perform in following processing At least one:
Classloader is preserved, Classloader is obtained, obtains class object.
11. system as claimed in claim 9, it is characterised in that the Classloader manager is additionally operable to:
Judge whether there is the second Classloader corresponding with the jar file, add if it is present discharging the Equations of The Second Kind Device is carried, first Classloader is then created.
CN201710337690.3A 2017-05-15 2017-05-15 Update the system and method for JAVA application services Pending CN106980512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710337690.3A CN106980512A (en) 2017-05-15 2017-05-15 Update the system and method for JAVA application services

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710337690.3A CN106980512A (en) 2017-05-15 2017-05-15 Update the system and method for JAVA application services

Publications (1)

Publication Number Publication Date
CN106980512A true CN106980512A (en) 2017-07-25

Family

ID=59343732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710337690.3A Pending CN106980512A (en) 2017-05-15 2017-05-15 Update the system and method for JAVA application services

Country Status (1)

Country Link
CN (1) CN106980512A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532037A (en) * 2019-08-16 2019-12-03 杭州云徙科技有限公司 A kind of Java operation method, system and terminal
CN113656057A (en) * 2021-08-26 2021-11-16 深圳市天天来玩科技有限公司 JAVA file updating method, network equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141919B (en) * 2010-01-28 2013-03-13 北京邮电大学 Modularized java application software online updating system and method
CN105068852A (en) * 2015-09-22 2015-11-18 普元信息技术股份有限公司 System and method for realizing Java class on-line hot updating in cloud computing environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141919B (en) * 2010-01-28 2013-03-13 北京邮电大学 Modularized java application software online updating system and method
CN105068852A (en) * 2015-09-22 2015-11-18 普元信息技术股份有限公司 System and method for realizing Java class on-line hot updating in cloud computing environment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532037A (en) * 2019-08-16 2019-12-03 杭州云徙科技有限公司 A kind of Java operation method, system and terminal
CN113656057A (en) * 2021-08-26 2021-11-16 深圳市天天来玩科技有限公司 JAVA file updating method, network equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3182678B1 (en) Method for upgrading network function virtualization application, and related system
CN105429776B (en) Method and system for managing functions of virtual network
CN106301876B (en) Physical machine upgrade method, business migration method and device
CN108255592A (en) A kind of Quartz clusters timing task processing system and method
CN109857423A (en) Program version update method, device, server and readable storage medium storing program for executing
CN115292022B (en) Workflow engine system, implementation method, storage medium and computer equipment
US20220121458A1 (en) Dynamic remediation actions in response to configuration checks in an information processing system
CN107222340A (en) A kind of fault handling method and device based on cloud platform
CN110347494A (en) Context information management method, apparatus, system and computer readable storage medium
CN107239313A (en) The upgrade method and storage medium of Spring application services
CN106980512A (en) Update the system and method for JAVA application services
EP1782598A1 (en) Dynamical reconfiguration of distributed composite state machines
CN108664343B (en) State calling method and device for micro-service
US20020112231A1 (en) Software distribution at a multi-processor telecommunications platform
CN107092528A (en) A kind of distributed task dispatching method, apparatus and system
CN108334374A (en) The method and apparatus of component dynamic load and execution
US20070038979A1 (en) Method and system for transparently controlling the behavior of service methods in a service oriented architecture
CN113746676B (en) Network card management method, device, equipment, medium and product based on container cluster
CN106843917A (en) Driver loading method and device
CN115421847A (en) Management method and equipment for research, development, operation and maintenance platform and CICD (common information carrier) assembly line supporting multiple engines
Liu et al. New model of SaaS: SaaS with tenancy agency
CN114168438A (en) Visual operation and maintenance control arrangement method and system realized in low-code mode
CN108228192A (en) A kind of implementation method of the dynamic management of service-oriented Airborne Software
US9753789B2 (en) Distributed system for scheduling action requests
CN105843742A (en) Regression testing method and system

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

Application publication date: 20170725

RJ01 Rejection of invention patent application after publication