• Post Reply Bookmark Topic Watch Topic
  • New Topic

Developing Multitiered application EJB with @Remote or @Local?  RSS feed

 
Nitesh Panchal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Say suppose i want to develop a multi tiered web application with presentation on 1 server, business logic on 1 server and database on 1 server, thus 3 servers altogether. But my all beans reside on single server ie 2nd server, so should i mark my beans as @Remote? or @Local? because my presentation is on 1st server and it will call bean on 2nd server. So, different JVM altogether.

Thanks in advance!
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the *clients* of those beans reside in the same JVM as the beans, then you can mark those bean interfaces as @Local. There was a similar discussion here http://www.coderanch.com/t/475672/EJB-Other-Java-EE-Technologies/java/Help-Chose-Remote-or-Local
 
Nitesh Panchal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Means i did not understand by *clients*. Clients in this case will be my JSF managed bean located on different server (so different JVM). So, you mean i should mark them as @Remote?
 
Christian Dillinger
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The caller of every bean is a "client" for that bean. If this client "lives" inside the SAME JVM you can use @Local. If it's not in the SAME JVM you have to use @Remote.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!