With the increase in the size and complexity of the software system, the choice of software architecture has become a more important factor than the choice of data structure and algorithm, and the three-layer client / server architecture provides a good framework for the integration of enterprise resource planning. It is the best choice for establishing an enterprise management information system. With the development of the architecture, the software framework structure is also continuously developed. At present, there are different solutions for the implementation of Java technology and .NET technology in multi-layer application structures, which have advantages and disadvantages, which are suitable for different sizes. The requirements of the system. This paper will combine the implementation of the telecommunications plan construction management information system, describe the architecture of the three-layer mode, introducing the distributed component technology of the application system based on the three-tier mode, and explains the application of the J2EE frame structure to implement the implementation method of the application system. I. Selection of system structure 1. Disadvantages of traditional two-layer C / S structure conventional two-layer client / server mode is more suitable for small size, fewer users, single database and in safe, fast network environments (such as local area networks) run. However, as the scale of the application system continues to expand, complexity is increasing in multi-user, multi-database and non-secure network environments (for example,: Internet), the application model of this two-layer structure will not be adapted. Moreover, the traditional two-layer structure has the following defects: (1) It is a single server and is centered on the LAN, so it is difficult to extend to large enterprise wide area network or intranet; (2) is limited by the supplier, the upgrade maintenance of the program must Suppliers re-development; (3) soft, hardware combination and integration ability limited; presenting fat clients on the software, users must install specific client applications on the client, and the business logic of the company is written in customers In the end application, the program maintenance is difficult, and the program upgrade requires every client to install a new client application. At the same time, for the program developer, the reuse of the program module is relatively independent; (4) c / S mode is difficult to manage a large number of clients. Based on the above reasons, the traditional C / S mode has not adapted to development needs. With the popularity of network technology and the further improvement of user demand, the three-layer Web mode came into being. 2, the advantages of the three-layer Web structure Three-layer client / server mode (hereinafter referred to as three-layer mode) increases the new level based on two layers of mode. This model is logically divided into three layers: customer display layer, business logic layer, data layer. The customer display layer is a graphical interface that provides the application service to help users understand and efficient location application services. The business logic layer is located between the display layer and the data layer, providing a clear level specifically for realizing the business logic of the company, encapsulating the application model associated with the system in this level, and separates the user to the database code. This level provides contact between client applications and data services. The main feature is to perform application policies and package application modes, and present the packaged mode to the client application. The data layer is the bottom layer in the three-layer mode, and he is used to define, maintain, access, and update data and manage and meet the application service request. The main advantages of the three-layer mode are: 1 Good flexibility and scalability. For the case where the environment and application conditions are often changed, the purpose can be achieved as long as the corresponding change is performed on the application layer. 2 shareability. A single application server can provide services to client applications in different platforms, which save development time and capital investment; 3 better security. In this configuration, the client application cannot directly access the data, but the application server can control which data can be controlled and accessed, but also control data change and access. 4 Enhance the repetitive availability of corporate objects. "Business Object" means an object that encapsulates the logical program code and can perform a specific function. With the development of component technology, this reusable component pattern is increasingly accepted by software development. 5 Three-layer mode becomes a "thin client" in the true sense, there is high stability, ductility, and execution calibration.
6 The three-layer mode can be managed together to manage the service, unify the client, thereby has good fault tolerance and load balancing capabilities. Three-layer architecture
The telecommunications plan construction management information system is a unified management of the subordinate telecommunications company. All business logic is concentrated in the management and development of provincial companies, and the management of data is responsible for data, and the user's distribution, data Centralized treatment, so it is fully considering the advantages and disadvantages of various architectures when designing, and the three-layer Web mode is selected. Second, the selection of the architecture 1. DCOM distributed technology and CORBA distributed technology Microsoft's distributed COM (DCOM) technology is to expand the development of object model technology COM, which is the computer object on the LAN, WAN, and even the Internet. Communication provides full support. By using a DCOM user, you can achieve true distribution at any network location, thereby meeting the needs of customer applications. The overall structure is shown below:
The public object proposed by OMG is a CORBA object, which is currently more popular. It is also a component implementation specification. The main goal is to enable objects that can be reused, portable and interoperable in distributed environments. CORBA The overall structure is shown below:
The above two distributed structures can be implemented in a unified specific environment, and the implementation of the local area network is more popular, but the two are lack of flexibility for applications of different platforms and Internet applications. 2, J2EE architecture introduction J2EE architecture is divided into three levels, namely customer representation, intermediate logic and data management and application systems. This structure has a cross-platform characteristic, three hierarchicals in the structure can be in different platforms; because the customer represents a different client program, there is a good distribution, which can accommodate distributed management. Requirements; in the background application system integration, the enterprise can be integrated into this structure, so that the existing resources can not be damaged. The core framework of the web service implemented based on J2EE is shown below:
Web services developed with J2EE-based architecture also have the following advantages: 1 can communicate across the intermediate firewall. Because the web service uses HTTP's most transported media, the intermediate layer uses web services, you can call the intermediate layer component directly from the customer interface without having to create a page. 2 Integration of application systems. It is necessary to integrate a lot of developments that are written in different languages in different languages. The standard method can be exposed using a standard approach to use in other programs. 3 All corporate logic and services are integrated into reused, portable EJB components, so system maintenance and reusability. 4 Middleware code can be concentrated on processing business logically without considering data representation. Because the business logic and data processing rules of this telecommunications plan construction management information system are all managed by the group companies and provincial companies, data and procedures are concentrated in unified servers, and the server running platform is different from the client's running platform, so The frame structure of J2EE is solved is suitable. Third, the system design and implementation passes the application of Java technology as the application technology of this system design, and our design of the system is as follows: The front desk user display layer implements JSP and servlets on the browser In the middle, use the EJB component to implement corporate business logic, the background database uses the Sybase database. The specific enterprise application structure is as follows:
Among them, the middleware uses the BEA's WebLogic 7.0, the development tool uses JBuilder9.0, and the database uses the Sybase database. During the user login process, because users used throughout the client are more, we use the connection pool to process. The specific connection pool is achieved as follows:
class DBConnectionPool {public DBConnectionPool (String name, String URL, String user, String password) {this.name = name; this.URL = URL; this.user = user; this.password = password; this.maxConn = maxConn;} private void createPools (Properties props) {private Hashtable pools = new Hashtable ();. String poolName = props.getProperty ( "poolname") trim ();. String url = props.getProperty (poolName ". url") trim () String user = props.getProperty (poolname ".user"); string password = props.getProperty (poolname ".password"); string maxconn = props.getProperty (Poolname ".maxconn", "0"); Int Max; dbconnectionpool pool = new dbconnectionpool (poolname, url, user, password); utility.log (pool.tostring ()); pools.put (poolname, pool); utility.log ("successfully created connection pool" poolname In order to use the sessionBean to log in to confirmation processing, the user's login time is listened with the listening function of the bean, and the user's login connection is automatically cut off, allowing the user to log in. In the application system, the permission control after the user logs in is a key point. In the process of using the J2EE frame structure, the filtering function of the servlet is used to control the control, the specific implementation structure is as follows:
The definition of the filter is as follows:
On the business logic processing, we decompose each business and then implement the EJB components for each business logic. After the customer makes a request, then call each business module to handle logic after using the servlet processing. After the EJB component accesses the database, returning the processed result set back to the servlet, and then collected to the client to display, for the user to query and use. Fourth, summarizing the system structure of the B / S mode proposed in this paper has applied a telecommunications plan construction management information system. Due to actual needs, a device interface thread is added to the request processing layer, which is used to obtain information of network devices through the SNMP protocol. . Compared to traditional CGI patterns, this system structure has a significant advantage, with higher system efficiency, especially suitable for constructing complex web applications. In addition, it is also possible to be strengthened, such as further research, automatically created and revoking new database operating threads.