• Post Reply Bookmark Topic Watch Topic
  • New Topic

Local / Remote Access Usage in EJB2

 
Steven Wong
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Local Access implementation will enhance the application performance. However, calls between the Session and Entity Beans will then be limited to the local J2EE server in the same machine.
I cannot foresee my application session and entity beans to be deployed locally in the same machine in the future.
So what's the best solution to achieve these two? Do I write the same beans twice each for the
local and remote access?
 
Jamal Hasanov
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Clement
I use local iterfaces in my J2EE projects and I can say that it works very faster! My session/entity beans and servlet run in same machine, under JBoss and I'm satisfied with performance.
Jamal Hasanov
www.j-think.com
 
Karl Laird
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you forsee that the beans are unlikely to be co-located then unfortunatly you are better off relying on the slightly more bloated remote interfaces. There is no way to use the local interfaces (by definition) if the beans are not co-located and it is rarely worth the pain and effort of migrating interfaces later if you can already see that you will not be able to use the local interfaces.
This is especially due to the differences in pass-by-value / pass-by-reference between the interfaces leading to many unforseen side effects when changing which one is used
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!