• Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing database catalogs, in a hashmap or static variables? ?  RSS feed

 
jon casari
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When my web aplication starts it loads from a database a bunch of web service endpoints that are stored in static fields , each time I call a Webservice it reads this value from a static field , but I want to to know if it would be better to load all those endpoints in a hashmap (Singleton).
Any comments on wich one would be faster/better , My app consists mainly of using external webservices so this values are read a lot. Any help would be great!

Example

before
ws.setEndpoint(Endpoint.EXAMPLE_WS)
ws.get...

after
ws.setEndpoint(CacheEndpoint().getInstance().getEndpoint(1))
ws.get...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!