This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic