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

ServiceLocator vs Dependency Injection

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

First of all, i don't speak english very well, i'm sorry.

If we have an managed bean (a JSF backingbean, for example) we can use DI to access to a remote ejb. This is simplier than ServiceLocator... but, we need to optimice the performance and the cost for establishing a conection with a remote interface is bad for performance, we need to cache the conection to remote interface. Can we get this by using DI? do we need a ServiceLocator for cache and improve the performance? could the web server cache the conection??

An other question, could we use de ServiceLocator from an backingbean?, i think that we need a bussinesdelegate to separate the bussines tier from an web tier object like a backingbean, what do yoy think??

Thanks in advance...
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic