Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

question about session beans.

 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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..

mallika
 
Ranch Hand
Posts: 72
Scala Monad Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: java.io.Serializable; java.io.Externalizable; any of the interfaces defined by the javax.ejb package.



From EJB 3 Oreilly - P no: 220
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic