Category – JAVA/J2EE Best Practises 1. Avoid creating objects in a loop. 2. Use String literals instead of String objects (created using the ‘new’ keyword) if the content is same. 3. Never create objects just for accessing a method 4. …
Read more »
Category – Threads 1. Object’s wait() methods cause a thread to lose the monitor’s ownership. In contrast, Thread’s sleep() methods do not cause a thread to lose monitor ownership. That implies threads retain any held locks when they call the …
Read more »
Category – JDBC Best Practices 1. Check whether row pre fetch value has been used or not 2. Check whether connection being got from pool.To be specific check whether connection object been got from datasource 3. Check whether Result set,Statement, …
Read more »
Category – J2EE Best Practices q Use DataSources to get connection from the Database q Cache DataSources in the application to avoid a JNDI lookup q Use JMS to communicate with MQ q Use JNDI to configure MQ-JMS objects in …
Read more »
Category – Performance q Use thread pool if the application needs multi-threading. GRP component provides a ready made thread pool implementation q Avoid unnecessary synchronized code in the application q Use pooling to increase performance. GRP framework can be used …
Read more »
Category – Design Patterns q Use Singleton design pattern when only single instance of the class is needed. E.g. all manager type classes. q Use Factory pattern to abstract creation of objects. a. Abstract factory pattern should be used in …
Read more »
Category – Functional Separation q Avoid HTML code or presentation logic in Request Handlers q Avoid HTML code in EJB’s and any other value objects that the EJB uses q It is a good practice to separate the domain objects …
Read more »