1.

What Are Common Optimizing Practices For Ejb?

Answer»

• Use Local interfaces that are available in EJB2.0 if you deploy both EJB Client and EJB in the same EJB Server.
• Use Vendor specific pass-by-reference implementation to make EJB1.1 remote EJBs as Local EJBs if you deploy both EJB Client and EJB in the same EJB Server.
• Wrap entity beans with session beans to reduce network calls and to promote declarative transactions. Optionally, make entity beans as local beans where appropriate.
• Make coarse grained session and entity beans to reduce network calls.
• Control serialization by modifying unnecessary data variables with 'transient' key WORD to avoid unnecessary data transfer over network.
CACHE EJBHome REFERENCES to avoid JNDI lookup overhead.
• Avoid transaction overhead for non-transactional methods of session beans by declaring 'NotSupported' or 'Never' transaction attributes that avoid further propagation of transactions.
• Set proper transaction age(time-out) to avoid large transaction.
• Use clustering for scalability.
• Tune thread count for EJB Server to increase EJB Server capacity.
• Choose servlet's HttpSession object rather than Stateful session bean to maintain client state if you don't require component architecture and services of Stateful session bean.
• Choose best EJB Server by testing with ECperf tool KIT.
• Choose normal java object over EJB if you don't want built-in services such as RMI/IIOP, transactions, security, persistence, resource pooling, thread SAFE, client state etc..

• Use Local interfaces that are available in EJB2.0 if you deploy both EJB Client and EJB in the same EJB Server.
• Use Vendor specific pass-by-reference implementation to make EJB1.1 remote EJBs as Local EJBs if you deploy both EJB Client and EJB in the same EJB Server.
• Wrap entity beans with session beans to reduce network calls and to promote declarative transactions. Optionally, make entity beans as local beans where appropriate.
• Make coarse grained session and entity beans to reduce network calls.
• Control serialization by modifying unnecessary data variables with 'transient' key word to avoid unnecessary data transfer over network.
• Cache EJBHome references to avoid JNDI lookup overhead.
• Avoid transaction overhead for non-transactional methods of session beans by declaring 'NotSupported' or 'Never' transaction attributes that avoid further propagation of transactions.
• Set proper transaction age(time-out) to avoid large transaction.
• Use clustering for scalability.
• Tune thread count for EJB Server to increase EJB Server capacity.
• Choose servlet's HttpSession object rather than Stateful session bean to maintain client state if you don't require component architecture and services of Stateful session bean.
• Choose best EJB Server by testing with ECperf tool kit.
• Choose normal java object over EJB if you don't want built-in services such as RMI/IIOP, transactions, security, persistence, resource pooling, thread safe, client state etc..



Discussion

No Comment Found