• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

scope of objects in a Web application

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

I need a general understanding about the scope of objects in a Spring based web applications. Suppose i have a a web application with a Rest Webservice. The  web application either fetches the record from database or persist the  data into database. Is Singleton ,Prototype and prototype with ScopedProxyMode.TARGET_CLASS enough. Should i look into Request scope also?

RestController - BeanObj -> ServiceImpl -> DaoImpl->DB

Regards,
Raj
 
Saloon Keeper
Posts: 14665
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Enough for what? Different types have different purposes and so different lifetimes. Why are you concerned with whether a handful of scopes is enough? Just use the right one for the right job, no matter if it's Singleton, Prototype, Request or something else still.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic