2 Replies Latest reply on Sep 16, 2006 2:07 PM by Laumond Christophe

    "An SLSB doesn't have a home interface anymore" ?

    Laumond Christophe Newbie

      Hi all,

      I'm using Seam1.0.1GA with the JBoss AS 4.0.4GA provided with JEMSInstaller and for testing I'm using the testng-jdk15.jar provided with the TestNG Eclipse plugin.

      I have found this article describing EJB 3.0 in general :

      Below the part this post is about :

      An SLSB doesn't have a home interface anymore?in fact, no EJB type requires it. The bean class may or may not implement a business interface. If it does not implement any business interfaces, a business interface will be generated using all the public methods.

      When I read that I think : "This is wonderful !"

      I have generated DAO class using the Hibernate tools in Eclipse.

      For example :
      public class AccountantHome {
       private static final Log log = LogFactory.getLog(AccountantHome.class);
       private EntityManager entityManager;
       public void persist(Accountant transientInstance) {
       public void remove(Accountant persistentInstance) {
       public Accountant merge(Accountant detachedInstance) {
       public Accountant findById(long id) {

      So this generated class is perfect according to what it said in the article.

      But when I deploy it I get :

      bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface

      I don't understand why this occure.
      It fails in both JBoss AS and the Microcontainer + Embeddable EJB3 of TestNG.
      I had to create an interface and add the annotation @Local to the interface in order to get a correct deploy.

      Could you tell me what I have missed please ?

      Christophe Laumond,
      M-ITC Ltd,

        • 1. Re:
          Anders Hedstrom Novice

          I haven't read the article @ javaworld you're referring to and I don't really understabd your question.

          But anyway, in EJB 3.0 the home interface is removed but still you need either a Local or Remote business interface or a web service interface to your bean class.

          here's a good place to start: http://trailblazer.demo.jboss.com/EJB3Trail/

          • 2. Re:
            Laumond Christophe Newbie

            Thanks for you feedback Anders !

            Sorry if I haven't been clear enough in my post.

            If I have well understood what is required and what is not, the generated class is not correct because it's declared as an EJB without implementing Local neither Remote interface.

            So without one of this interface, this EJB is useless.
            Can someone confirm please ?

            I will try to update the Hibernate tool Eclipse plugin and see if this change the generated class.