facebook

xdoclet ejb interface generation question

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #228052 Reply

    sheenmicro
    Member

    Hi,
    I’m develoing an EAR App (j2ee 1.4) using MyEclipse. If I create a session bean , eg MySessionBean.java, when I run xdoclet to generate the interfaces I get the usual home, local and remote interfaces plus a MySessionBeanSession.java – the ‘session layer interface’ according to the javadoc in the source. Is this a new interface in the 1.4 spec-I’m studying for J2ee 1.3 certification at the moment – or what?
    Thanks

    #228075 Reply

    Riyad Kalla
    Member

    I am researching this…

    #228195 Reply

    sheenmicro
    Member

    @support-rkalla wrote:

    I am researching this…

    thanks

    #228767 Reply

    Jason
    Member

    I’m curious about this too.

    #228790 Reply

    Greg
    Member

    Both 1.3 and 1.4 specs say there must be a implementation file that implements the SessionBean interface. This is the file that is specified as the ejb-class in the deployment descriptor. The xdoclet ejb module is generating the Session wrapper file that extends your implementation file for you and has all of the necessary methods to make sure the session class meets all the spec requirements. If you notice the Session file that is generated extends the class that you wrote and all of the methods in it just call super.xxx(). So you can think of the generated Session file as a wrapper that provides a safety measure for when deploying to the appserver.

    #228800 Reply

    Jason
    Member

    Greg,

    Thanks for the reply. That makes sense. But, the required SessionBean methods also must be implemented in the bean class because it implements the SessionBean interface. So, I don’t see how the wrapper class really helps. Also, by default, the xdoclet jndi reference goes into the bean class (not the wrapper), so this is the class that is pointed to in the generated config files. The wrapper class is never used (that I can see).

    Am I missing something?

    Thanks,
    ~j.

    #228801 Reply

    Jason
    Member

    Whoops, scratch that last part. The ejb-jar.xml does use the wrapper. My mistake. Still unclear about the benefit, though, given that the SessionBean interface methods must be implemented in both classes.

    ~j.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: xdoclet ejb interface generation question

You must be logged in to post in the forum log in