- This topic has 6 replies, 4 voices, and was last updated 19 years, 8 months ago by Jason.
-
AuthorPosts
-
sheenmicroMemberHi,
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
Riyad KallaMemberI am researching this…
sheenmicroMember
JasonMemberI’m curious about this too.
GregMemberBoth 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.
JasonMemberGreg,
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.
JasonMemberWhoops, 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.
-
AuthorPosts