Font Size: a A A

Java Interface And ClassLoader Based Dynamic Software Module

Posted on:2008-07-27Degree:MasterType:Thesis
Country:ChinaCandidate:Z G LiFull Text:PDF
GTID:2178360212995875Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
In a long run process, software system will encounter a variety of changes, such as changes in requirements, realization and business processes etc. Most change manners the software system based on are the demands, the development of new functional or updating the old function modules, compile to form a new application system, finally plans to update the software system. But for some of the systems which need continue working such as air traffic control systems, global financial trading systems, industrial control systems, network services and so on, to stop the operation of the entire system software update will result in a major loss. It requires software system in the case of not stop running to update, this is what we usually called the dynamic evolution of the software.This paper introduces the basic concepts of dynamic evolution of the software, and then analyzes all aspects of the software evolution, including software maintenance, software development methods and software reuse etc. Then we studied the common technology to support dynamic evolution of the software including agent-based dynamic technology, dynamic programming language based on the dynamic class technology and software architecture based on the dynamic evolution of technology, and compare and analyze the theory and the problems that existed. It also highlights the dynamic evolution of component-based software framework and method andinvestigates the evolution of the three components, Wrapper, inheritance and agents. This paper also researches the common style of C2 architecture, C2 is a style based on hierarchical structure and event-driven. Its basic elements are Component and connector. By importing the concept of the explicit connector, the system releases from couple in order to help releasing the dynamic evolution of the software, then gives the C2-style formal description of the structure and discusses the features of the software and its support to the dynamic evolution.Through in-depth studying on the dynamic evolution of the software, this paper brings forward a Java-based interface, and a Class Loader Software to support the development of dynamic evolution. This model is based on micro-kernel, programs developed under this model should be arrayed by jar documents, each jar document is a module, the entire application program is composed of many such modules. Modules are installed on the micro-kernel, and the micro-kernel is the soul of the whole framework, it is the basis of all operating modules. It provides interface or tools that can be installed,updated or unloaded modules. The entire system is based on modules, the object to install, update and unload is module rather than a individual class. Each module installed on the micro-kernel is correspond to its own class loader, because the class in Java is decided by the full name of the class and the class Loader, therefore, different module can have the same name class (because they are located in different loader, it is different class), the same modulewith a different version can operate in a system, because they are loaded by different types of class loader, so they do not influence on each other.The module deployed on this micro-kernel should meet certain standards, it is necessary to achieve a Activator interface, and provide a declaration in metadata document of this module. When install a module in the micro-kernel, micro-kernel instances a new class loader and uses it to load its module, then reads the meta-information in the module and achieves the class which includes the Activator interface, finally by reflecting the instance of the class to call the methods. In this method, some of the services achieved by module can be registered on micro-kernel. In the same time, module can also preserve the context of the implementation send by start method. If this module needs some other services, it also can be inquired by the context. When user stops the module, the micro-kernel will call the Activator interface to achieve the stop method of the class, then the module will call off the registration service. In this model, module uses registration and inquiry methods to achieve services. The achievement of service (the interface in Java) achieves service by registering, it also can provide some attribute information, the people who want use the service can use it by inquiring the name of service, and the corresponding attribute information. Because the service is used by registering and inquiring, people who explore it and use it are fully separated, this is the basis of updating the dynamic software.The updating of the model in this paper is very easy, as long as install the new version of the module on the micro-kernel and stop the old one. When someone uses the inquiry service, it is the new version service. The people who still use the old service will be using the old, when all the old service has been used up (eg. the return of the original method invocation) the service in the system will be new service, then it completes a dynamic evolution of this model. In the evolutionary process, it actually used the coexistence of old and new services over the state. When a module being suspended and the users who have used the module finished, the micro-kernel will release the loader of this module, and it can be recovered for recycling. To change the structure of the system is also simple in this model, as long as define new contract modules and realize it. Then deploy the compact module and realization module to the core, when the new module can be developed based on this new contract, and the old module also can be updated to adapt to the new contract. In fact the topological structure and the relationship of the old and new modules are determined by this lease, so long as the updated continuously, the structure of the software can be partly or all fully changed.
Keywords/Search Tags:ClassLoader
PDF Full Text Request
Related items