Discussions

EJB design: Session bean

  1. Session bean (3 messages)

    Hi,

    Can I have a design where in I would have abstract methods in a plain abstract java class and then have my stateless session bean extend it.

    Will there be any problem with this approach?

    Thanks
    Ash

    Threaded Messages (3)

  2. Session bean[ Go to top ]

    Yes, you can. I don't think you should have any problems.

    Bill Lasley
    Versant Corp.
    http://www.versant.com
  3. Session bean[ Go to top ]

    Hi,
    <br>

    What if I have setSessionContext etc ejb related methods in this simple Java class?

    Will it be in control of container<br>
    Ash
  4. Session bean[ Go to top ]

    Yes, you can define ejb related methods in your abstract class.

    public abstract class AbstractJunk {
    // a business method
     public abstract void execute(String s, int value);
    // an EJB method
     public abstract void setSessionContext(javax.ejb.SessionContext ctx);
    }

    Bill Lasley
    Versant Corp.
    http://www.versant.com