Tip Bank

DevX

Writing a Parameterized SQL Query in EJB 3.0

protected EntityManager manager;…String ejbqlDelete = “delete from ClientTicket p where ” + “p.closed = :paramClosed and ” + “p.department = :paramDepartment and ” + “p.ticketUserID = :paramTicketUserID and ” +

DevX

Avoid Object Instantiation Within Loops

Avoid defining new objects within loop structures. Doing so hampers performance significantly, due to object creation overhead. Instead, define objects outside the loop and then use them inside the loop.

DevX

Measuring A Program’s Speed

The simplest way to measure the performance of a block of code (or an entire program) is to obtain the elapsed time. This tip shows you how. ‘At the top