Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Need understanding of Session Bean's Business and Remote Interfaces

 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 634
    Eclipse IDE Chrome Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Frits
     
    It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
    Devious Experiments for a Truly Passive Greenhouse!
    https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
      Bookmark Topic Watch Topic
    • New Topic