CRITICAL
Rule Definition
Best practices recommend that Entity beans only use Local Interface methods to expose their functions. So since, EJB 2.0, remote interface should not be used. Instead, opt for local interface as part of session façade implementation. This avoids the need for the JNDI lookup, which improves the performance
Remediation
Review the source code and have the EJB Entities accessed through their local Interface instead of their remote Interface.
Violation Code Sample
package employee; import employee.EmpRecord; import javax.ejb.EJBObject; import java.rmi.RemoteException; public interface Employee extends EJBObject { public EmpRecord getEmployee (int empNumber) throws java.sql.SQLException, RemoteException; }
Reference
Enterprise Java Programming with IBM WebSphere - page 508
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.