Continuing the EJAPP Top 10 countdown, it's time to talk about number 8.
Apart from leading to badly architected applications, incorrect usage of Java EE can also cause your application to perform poorly. This problem is particularly prevalent in older applications that were developed before the POJO/lightweight revolution a few years back.
Lightweight frameworks like Spring allow the developer to pick and choose the infrastructure services (transactions, security, distributed objects) that are needed. Java EE (or J2EE as we used to call it) offers all of them all of the time. Application servers are tuned to not spend a lot of CPU cycles on the infrastructure services that are not used, but some developers succumb to the temptation to use these features when they are not needed. Not helping all this are the "best practices" that came into being with the first J2EE versions, e.g. Sun's J2EE patterns.
Some of the ways in which Java EE is used incorrectly are:
There are two remedies to this problem:
Filed under Java, Performance |
I think local interfaces are useless unless you use EJB Entity Beans. But, who does still use them? I think you should not call ejbs from ejbs INSIDE the same container, use POJOs instead. So, my humble conclusion is that the use of local EJB should not be used. Am I right? wrong?
I agree that EJB is not an optimal technology to start with. But if you are determined to use EJBs, you could at least use local EJBs to lessen the impact. Local EJBs can also be a relatively quick fix for badly performing applications using EJBs.
[...] Number 8 - Incorrect usage of Java EE More information about number 8 can be found here. [...]
[...] #08 - Usage incorrecte de Java EE [...]