Hi everybody,
I have this error while deploying my EAR application:
23:29:00,500 WARN [verifier] EJB spec violation: Bean : TestSessionBean Section: 7.11.8 Warning: The local home interface of a stateless session bean must have one create method that takes no arguments.
public interface TestSessionLocalHome extends EJBLocalHome { TestSessionLocal create() throws CreateException; TestSessionLocal create(String moduleName, String className) throws CreateException; }
... public void ejbCreate() { } public void ejbCreate(String moduleName, String className) { module = ModuleLoader.instantiateModule(moduleName, className); } ...
When using stateless session beans you must have only one create method without arguments. That's because all instances of the class must be interchangeable, so if you use parameters in create method, then they became not interchangeable.