Font Size: a A A

Research And Design Of J2EE Application System Exception Handling

Posted on:2015-08-25Degree:MasterType:Thesis
Country:ChinaCandidate:Y X WangFull Text:PDF
GTID:2428330488999703Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Exception handling is an important means of guaranteeing the robustness and reliability of J2EE application system.With the increasingly complex business logic and the constantly expanded scale of J2EE application system,the traditional exception handling has been unable to deal with the huge number and wide variety of exceptions in the J2EE application system for only depending on exception handling mechanism of Java,which seriously affects the robustness and reliability of J2EE application system.Thus to do a research on method of simplifying the complexity of exception handling and improving exception handling extensibility has important significance.The main research in this thesis includes the following two aspects:Firstly,for the problem of scattered exception handling and difficult extensions in the J2EE application system,an exception handling method based on the hierarchical classification is proposed in this thesis.The method uses its own hierarchical characteristic of the J2EE application system architecture to establish the exception handling hierarchy structure.In the first place,it creates a base exception class and provides a default handling way;then it creates exception base class of each layer on the base exception class;finally,it gives a level classification for the hierarchical of exception structure.When an exception occurs,it unifies exception handling through packaging the context information and throwing it to the presentation layer.The experimental shows that the exception handling method based on the hierarchical classification can effectively reduce the complexity of exception handling,realize unified and extendable exception handling and enhance the robustness and reliability of the J2EE applications system.Secondly,supplements for the exception handling method based on the hierarchical classification are given from the two aspects of recording of exception logs and exception rollback.In the first place,for the traditional recording exception logs have problems like repetitions and confusions of the exception logs,an exception log record method based on Java reflection technology is proposed in this thesis.This method takes exception log recording function as a public interface of J2EE application system,achieving unified classification records of exception log and writing the different levels of exception information to the corresponding levels of log file just with the relevant parameters being provided.In the next place,it uses transaction to deal with the exception rollback problem.By comparing with the traditional transaction methods,this thesis gives an implementation way based on Spring transaction.The experimental shows the exception log recording method based on Java reflection technology and the exception rollback method based on Spring transaction will utilize the system architecture to complete the exception log record and exception rollback of the J2EE application system,which ensures the data integrality and consistency of J2EE applications system and greatly simplifies the programmer for the handling of exception.
Keywords/Search Tags:J2EE application system, exception handing, exception hierarchy structure, log record, transaction, exception rollback
PDF Full Text Request
Related items