• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Bear Bibeault
  • paul wheaton
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Mikalai Zaikin
  • Piet Souris
Bartenders:

reason behind this architecture

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
This is an interview question
As we know in EJB we have the Remote interface in which we declare
all the business logic methods which the EJ Bean needs to implement.
Though the EJB directly doesnt impleement this interface , all methods
in teh EJB have to match the method signatures of the Remote Interface.
WHat is the advantage of this decoupling .
Or why Java has forced developers to use this type of architecture
CAn someone explain.

Rgrds
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

As we know in EJB we have the Remote interface in which we declare
all the business logic methods which the EJ Bean needs to implement.
Though the EJB directly doesnt impleement this interface , all methods
in teh EJB have to match the method signatures of the Remote Interface.
WHat is the advantage of this decoupling .
Or why Java has forced developers to use this type of architecture
CAn someone explain.


Well, first of all Java doesn't force the developer to use Enterprise JavaBeans...
Anyway, the methods must match the ones in remote interface so that the EJB Container knows which method of the implementation class instance to call when an EJBObject receives a method invocation request.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have missed a very key reason for this design concerning the remote interface which is coupled to the bean instance. The J2EE container as it is often called is an advanced component transaction monitor (CTM) and as such must intercept business method invocations to offer and ensure the consistency of transactional, security and system-level services to the container components. In one sense the J2EE container is facilitating cross-cutting concerns for distributed components which is the motivation behind aspect-oriented programming (AOP)
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
True. Reading the EJB 2.0 specification is recommended (even though it's VERY repetitive and unorganized, in my opinion) for all EJB developers.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic