Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

difference in Local & Remote  RSS feed

 
Saurabh Naik
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am reading book on EJB but I am not getting the difference between Remote Interface & Local Interface. Both Interfaces are used for Stateless & Statefull Session Beans. so on which condition it is determined which one to use.

suppose there is Server S on which EJB Container & my project resides. client A , B & C access S . so in my application which interface would be use local or Remote ?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37234
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saurabh Naik wrote:I am reading book on EJB but I am not getting the difference between Remote Interface & Local Interface. Both Interfaces are used for Stateless & Statefull Session Beans. so on which condition it is determined which one to use.

suppose there is Server S on which EJB Container & my project resides. client A , B & C access S . so in my application which interface would be use local or Remote ?

If you are calling the EJB from within the same EAR file, you would use use a local interface for performance purposes. If you are calling from another EAR, you would use a remote interface. Some application servers optimize remote calls if the two EARs are on the same server, but it's still clearer to use remote yourself.
 
Saurabh Naik
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but EAR are kept on servers & client calls it that means is it a local ? and suppose in my application there are 2 EAR kept on servers. client calls the 1 EAR but for manipulating purpose it uses 2nd EAR then it is Remote . that means 1st EAR calls 2nd EAR. am I correct ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!