thành phần để làm cho đồ họa tùy chỉnh, nhưng nó là chậm cho hình ảnh động và các hiệu ứng hình ảnh khác từ phía máy chủ. Ngoài ra, kể từ khi Ajax4jsf sử dụng vòng đời tương tự như JSF thường xuyên, đã nộp tất cả các thông tin trạng thái JSF trong mỗi cuộc gọi AJAX. Đó là kết quả trong quá | 378 Simpo PDF MergeW Split UnregisteredVersion - http region name _default_ attribute name maxNodes 5000 attribute attribute name timeToLiveSeconds 1000 attribute region region name Person attribute name maxNodes 10 attribute attribute name timeToLiveSeconds 5000 attribute region region name FindQuery attribute name maxNodes 100 attribute attribute name timeToLiveSeconds 5000 attribute region config attribute mbean server In addition to caching entity bean instances we can use the regions to cache the EJB3 query results. For instance the following code caches the query result in the FindQuery cache region. For the query cache to be effective you must cache the entity bean of the query result as well. In this case we must cache the Person entity bean List Person fans select p from Person p .setHint FindQuery .getResultList For more information on using second-level database cache in JBoss EJB3 refer to the JBoss documentation. Using Database Transactions Carefully In Chapter 11 we discussed both database transactions and a nontransactional extended persistence context. Without a transaction manager we typically flush the persistence context at the end of the conversation and send all database updates in a batch. That offers two performance advantages to the transactional approach From the Library of sam kaplan Simpo PDF Merge and Split Unregistered Version - h ttp 79 The database updates are flushed in a batch at the end of the conversation instead of being flushed at the end of each request response cycle . at the end of a thread . That reduces unnecessary database roundtrips during the conversation. The nontransactional database update is significantly faster than a transactional one. Of course the drawback of this approach is that if the database or connection to the database fails in the middle of the update batch the database is only partially updated. A good compromise is to .