Best-practices and common pitfalls when using J2EE for web applications