Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Local vs Remote deployment environments  RSS feed

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm a complete newbie to EJB and Java EE in general. I am going through this netbeans tutorial on remote EJBs, which is cool in itself. But one thing I want to know is why are they doing a tutorial on remote EJBs, when the tutorial is launching both the client app and the server side on the same app server? This is confusing me.

I was under the impression that if you use EJBs and the client and server are on the same JVM then use local interfaces, but if the client and server are on different JVMs (i.e. different computers), then use remote interfaces. This tutorial seems to go against that logic. Am I right/wrong here? Or does "remote" refer to the client and server not being a part of the same java project/deployment war/ear on the app server?

Sorry for the loaded questions!

Thanks,
Alan
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the context of EJBs, remote refers to EJB components that belong to different applications/deployments even if they are on the same JVM.
 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:In the context of EJBs, remote refers to EJB components that belong to different applications/deployments even if they are on the same JVM.


Thanks!
 
Jack Dwaltz
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:In the context of EJBs, remote refers to EJB components that belong to different applications/deployments even if they are on the same JVM.


The client can also be a Java SE application that makes a lookup for the remote interface: e.g. a Java program running on a different JVM on the same or a different computer.

 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jack Dwaltz wrote:
Jaikiran Pai wrote:In the context of EJBs, remote refers to EJB components that belong to different applications/deployments even if they are on the same JVM.


The client can also be a Java SE application that makes a lookup for the remote interface: e.g. a Java program running on a different JVM on the same or a different computer.



That's true. My previous reply was meant to emphasize that the remote EJB don't necessarily mean separate JVMs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!