1 Reply Latest reply on Mar 2, 2007 11:10 PM by raist_majere

    EJB spec violation - not true?

    xhemjl

      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.
      


      but it's simply not true...

      this is my local home interface:

      public interface TestSessionLocalHome extends EJBLocalHome {
      
       TestSessionLocal create() throws CreateException;
       TestSessionLocal create(String moduleName, String className) throws CreateException;
      
      }


      and my bean looks like this:

      ...
       public void ejbCreate() {
       }
      
       public void ejbCreate(String moduleName, String className) {
       module = ModuleLoader.instantiateModule(moduleName, className);
       }
      ...
      


      well - I have one empty create method in my session stateless bean.

      i don't get it

      can somebody say what am i doing wrong with my TestSessionBean?

      thanks in advance
      best regards
      ?ukasz

        • 1. Re: EJB spec violation - not true?
          raist_majere

          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.