This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes question about session beans. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "question about session beans." Watch "question about session beans." New topic

question about session beans.

mallika shah
Ranch Hand

Joined: May 11, 2006
Posts: 164
"Both the stateful and stateless session beans can implement multiple local and remote interfaces"

This statement is specified as a correct statement.
How is this correct?
As far as i have read , beans cannot have both the local and remote interfaces defined together.
Then how is this statement correct?
shouldn't it be like "....multiple local or remote ...."

Please correct me and clear my doubts..

Marimuthu Madasamy
Ranch Hand

Joined: Jun 07, 2007
Posts: 72

A session bean can implement both local and remote interface(s) together.

From EJB 3 Core spec 4.6.6
A bean class is permitted to have more than one interface. If a bean class has more than one interface�excluding the interfaces listed below�any business interface of the bean class must be explicitly designated as a business interface of the bean by means of the Local or Remote annotation on the bean class or interface or in the deployment descriptor.

The following interfaces are excluded when determining whether the bean class has more than one interface:;; any of the interfaces defined by the javax.ejb package.

From EJB 3 Oreilly - P no: 220

- Marimuthu Madasamy
Have you checked out Aspose?
subject: question about session beans.
It's not a secret anymore!