aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Need understanding of Session Bean's Business and Remote Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Need understanding of Session Bean Watch "Need understanding of Session Bean New topic
Author

Need understanding of Session Bean's Business and Remote Interfaces

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

EJB 3.1 Specification


4.9.7 Session Bean's Business Interface

The following are the requirements for the session bean’s business interface:

1.The interface must not extend the javax.ejb.EJBObject or javax.ejb.EJBLocalObject interface.
4.The bean class must implement the interface or the interface must be designated as a local or
remote business interface of the bean by means of the Local or Remote annotation or in the
deployment descriptor


As per my understanding of the above paragraph,a buisness interface must not extend the javax.ejb.EJBObject or javax.ejb.EJBLocalObject interface and should be designated as a Local or Remote Interface.

4.9.9 Session Bean's Remote Interface

The following are the requirements for the session bean’s remote interface:

1.The interface must extend the javax.ejb.EJBObject interface.


The above text says that Session Bean Remote Interface must extend the javax.ejb.EJBObject interface.

Suppose there is business interface Advise.Then(as per section 4.9.7),it must not extend the javax.ejb.EJBObject and should be designated as either Local or Remote.
Lets say that Advise is designated as Remote via DD.Then,(as per section 4.9.9)a Session Bean Remote Interface must extend javax.ejb.EJBObject interface.

The two statement seems to be contradictory.

Please advise


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1695
    
  25

Be careful:
  • Business Interface is EJB 3.x
  • Remote Interface is EJB 2.x (sections 4.9.9 until 4.9.13 are not part of the EE6 exam)


  • Regards,
    Frits
    Mohit G Gupta
    Ranch Hand

    Joined: May 18, 2010
    Posts: 634

    Thanks Frits
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: Need understanding of Session Bean's Business and Remote Interfaces