• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Developing Multitiered application EJB with @Remote or @Local?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic