- Java EE 8 High Performance
- Romain Manni Bucau
- 298字
- 2021-06-30 19:14:30
Ensure you know your application
In case it was not explicit enough before, it is crucial to know what the server does for your application. It is already key in development, but when you start working on performances, it is a must. This means that you need to know the application good enough to know which part of the server it will use and which implication it will have on your performances.
In other words, you will need to fully understand the use case of your application but also what technology was used to implement it. A simple example is if your application used RESOURCE_LOCAL mode for JPA but you see a lot of JTA use, then you will need to identify why. If you don't have this kind of insight, you will just think the application uses JTA and that it is ok. Yet, this kind of fact can mean something is not well configured, which can not only impact the application's behavior, but also its raw performances and even its scalability.
It is also very important to know what part of the specifications is used. To illustrate it we'll use JPA again here. JPA is integrated with Bean Validation. This means that each time you will persist/merge an entity, the entity will be validated to ensure it passes the model constraints. This is a great feature but if you validate your model on the outbounds of your application (JAX-RS for instance) then you rarely (never in theory, if the application is done correctly) need to revalidate it internally (JPA). This means that the Bean Validation layer is useless here and can be disabled. This particular example is done by updating the persistence.xml and adding the validation-mode tag in the right persistence unit:
<validation-mode>NONE</validation-mode>
- 電腦組裝與系統(tǒng)安裝
- WordPress Mobile Web Development:Beginner's Guide
- 精解Windows 8
- 曝光:Linux企業(yè)運(yùn)維實(shí)戰(zhàn)
- 構(gòu)建可擴(kuò)展分布式系統(tǒng):方法與實(shí)踐
- 嵌入式應(yīng)用程序設(shè)計綜合教程(微課版)
- Linux自動化運(yùn)維:Shell與Ansible(微課版)
- STM32庫開發(fā)實(shí)戰(zhàn)指南:基于STM32F4
- Delphi Programming Projects
- ElasticSearch Cookbook
- Kali Linux高級滲透測試
- VMware Horizon View Essentials
- INSTANT Galleria Howto
- Learning Continuous Integration with Jenkins(Second Edition)
- iOS 10快速開發(fā):18天零基礎(chǔ)開發(fā)一個商業(yè)應(yīng)用