Some suggestions deployed by J2EE applications (3)

zhaozj2021-02-16  54

Originally from http://www.onjava.com/pub/a/onjava/2003/06/11/j2ee_deployment.html?page=1

Pick up the second article:

2.2.1

R Resource Binding (Other Type Static Resources)

Resource Bundles (AND Other Types of Static Resources)

Let us consider it, in some web applications, some files containing some information (as resource bindings), depending on the relationship between the class loader and the isolated level, usually there are three ways to place these resources. file

1. Put the copy of the resource into the web-inf / class directory of each WAR file, this is also a shortcoming, that is, if someone decides the information he needs to modify these files, he must enter each WAR files and each of them makes the same modification, which is easy to cause errors, at least so.

2. Put the resource bindings into a directory that can be identified by the system's CalssPath, which solves the disadvantages of the first point, that is, no need to modify multiple copies under the same folder. However, this can also be Limit your ability to deploy Application (RE-deploy). Because resources loaded by the system ClassLoader can only load (reload) by restarting JVM. In this case some changes you do will not be implemented in you Before restarting Application Server, high practical availability in the J2EE solution is more important, which will result in more complex system maintenance.

2.2.2

Third-Party Libraries

: Usually in the J2EE project, the software contains completely third-party software is uncommon (such as apache log4j). In this case, it is generally best to put the JAR files of those libraries into an EAR file of the developed address. If the library has been used by Application Server, it is best to change or upgrade or upgrade the demand for those libraries. If you decide to put the universal library into The interior of the EAR module, this is a must ensure that the third party library must be loaded (EG / lib OR / EXT) This will make the lookup and handle more convenience, by identifying the internal components dependent modules. Because There are strict restrictions between different ClassLoaders, you must put the path of the third party library into the Meanifest file or make the J2EE module. Include WAR files and EJB files

2.3 Other suggestions

J2EE can develop highly upgraded performance and highly reliable projects through very simple development, so a J2EE development architecture must make decisions after careful consideration of upgrading performance and reliability.

2.3.1

Scalability can be upgraded

In our second article, the Application is broken down into multiple units in the uncorrible (tiers) will give us a higher upgradeable highly high-speed and reliable module. However, you must carefully consider It is necessary to ensure the balance between particle size and modularity and flexibility and performance performance.

2.3.2

Maintainability and hot deployment

Hot deployment and maintenanceability

Thermal deployment refers to not need to stop or restart Application to deploy and redeploy. If your Application requires hot deployment, you must ensure that Application's resources, relying on third-party libraries, or other Enterprise modules that are packaged in itself. Avoid establishing any modules with system ClassPath to ensure that every Enterprise Application module may need to pack something in the same EAR file.

2.3.3

Security security

. Depending on the security of Application, such as (SSL, VPN, J2EE Module Declarative Security Model) can be performed between different layers, thus providing the security level we need. Although J2EE specifications say security requirements It is provided by AppLiaCation Server. But there is no designation to provide something security, so security requirements can be illustrated by vendors. Your application needs to be identified through security identity in different security management domains. (Such as distributed security), then you need no doubt that you will negotiate with your provider. In some cases, there will be restrictions, then you need to limit your selection in the deployment frame 2.3.4

Deployment Automation Automatic deployment

In the ideal case, administrators you have encountered are very familiar with J2EE and Application Server. However, perhaps find out that there is a proficient Unix or Winodws system administrator, he or she doesn't know what It is J2EE. So, for those who may deploy and manage this J2EE system, there is a clear deployment step documentation is the best. That will be more convenient than providing documents that provide those that are automatically deployed. Many Application Server manufacturers are now providing people who are specialized in manufacturers or the general staff's management console, or through Java management extensions, (JMX) API (such as a BEA WebLogic Management API) However, based on different deployment mechanisms of different manufacturers, you need Create a corresponding platform to adapt.

Future Direction Future Direction

More and more J2EE Application's publishing, determining that the generic standard deployment and packaging a J2EE application becomes more and more important. However, how to deploy a J2EE application still without standards can follow.

The purpose of JSR is to determine a standard API to allow any deployment tool to deploy any J2EE Application Server J2EE module. That takes some of the following criteria.

1. Installation: Deploy a pre-package component to the capacity in Container

2. Configuration: The ability to re-configure the configuration of the mechanism using standard configuration

3. Uninstall deployment: Uninstall a deployment from a container

From this perspective, JSR will contain J2EE 1.4 specification, accompanied by new API, an Application Manufacturer can create a deployment tool or script, so you don't have to worry about deploying his own Application. To different Application Server. But there are still some parts of the area that are not taken into account by JSR.

4.J2EE resource deployment and configuration: deployment and configuration of J2EE resources, such as DB connection, DB, JMS, etc., these still have to rely on the manufacturer's

5. Security configuration: J2EE module supports a clear security module by allowing security role specifications and descriptors in deployments.

However, if security information changes during deployment, the system administrator still relies on the mechanism provided by the manufacturer to make changes.

The independence of the module: Although the new standard allows the independence of the module by deploying the descriptor, independence is not tracked, when uninstalling deployment, the resources required by the module will not be revoked automatically.

IV: Summary: Deployment or a lot of J2EE developers are not very familiar, if the deployment details are not considered when designing architecture, you will make you change your architecture, in summary, usually there are many beginnings. The place to be considered to meet the performance, reliability of your Application.

转载请注明原文地址:https://www.9cbs.com/read-22863.html

New Post(0)