Web middleware switching (was cut tomcat)

Source: Internet
Author: User

One, data source migration:
① is the data source configured in the Web container or the project itself?
Choose to configure the Web container to avoid developing a compromised database password based on the development and production separation principles.

② Database Password encryption
Original was data source directly in the console control, password is ciphertext, more secure. If Tomcat is normal, it is configured in clear text and should be changed to ciphertext. There are two scenarios: one is to inherit the connection pool factory class Basicdatasourcefactory and write some methods, and the second is to modify the Basicdatasourcefactory source code directly. Choose the first way.
A new jar package, Datasource.jar, is deployed to%tomcat%/lib with Uppapi.jar.


Second, the process of migration
① to keep the project directory structure unchanged, direct javasource refers to the source directory instead of Src,web root directory using webcontent instead of Webroot.
② deletes the class of the introduced IBM-related jar package.
The JDK version is identical to the original version when the ③ compiler is in place.
④ the basic use of JMX is to be re-developed, since the Tomcat-based JMX extension is completely different from was.
⑤ using IBM's Jsse for SSL/TLS secure communications should be changed to Sun Jsse.
⑥ used some of the IBM JCE encryption algorithms, such as DES, because the sun and IBM key production differences resulting in the final decryption failure, the interface system should be as far as possible not to let the sales system change key and jar package upgrade, or they will be killed, So what to do is to use the sun's JCE provider to IBM's provider;
(1) Key two-line procedure:
Java.security.Security.addProvider (New Com.ibm.crypto.provider.IBMJCE ());
keygenerator kg = keygenerator.getinstance ("DES", "Ibmjce");
(2) java.security file: Security.provider.1=com.ibm.crypto.provider.ibmjce
(3)%java%\lib\ext import Ibmjceprovider.jar, Ibmpkcs.jar package
(4) Security export restrictions:%java%\lib\security replacement Local_policy.jar, Us_export_policy.jar
⑦ Modify the configuration files and directories, and let the Configurator synchronize the library.
⑧ load class priority based on Tomcat you can override the original Jar package class by web-inf/classes the new class to keep the jar package intact, and the class loader takes precedence over the class under Web-inf/classes.


Three, parameter setting
The tomcat parameters are configured based on the was production data. Includes HTTPS configuration.


Iv. Apache
IHS for APACHE,TOMCAT cluster using MOD_JK mode, session sharing.


Five, some performance parameters collection
Sample data for later performance optimizations, TPS, throughput, concurrency, transaction response time, request response time, CPU, disk, AVG Rps, successful request, failed request, database connections, database response time, request queuing queue, thread pool data, persistent connection, JVM parameters, Traffic statistics, Apache throughput, number of concurrent connections.





Web middleware switching (was cut tomcat)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.