• 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

Multiple Datasource design [user base]

 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i'm not sure whether my design is correct or not, the requirement is User want to choose the datasource from the list and use the selected datasource to query the database. The point is how can we handle incase that administrator changes that datasource and how to let the user know that datasource has been changed.


my design [not complete] : I create a registry to pool the datasource in memory [increasing performance], and create a proxy object to datasource. I use observer pattern.




when the administrator changes the datasource, we check in the registry and call setDatasource to proxy object it will notify the changes the user preference object [stored in session].

i want to see your opinion.

Thank you
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This seems wrong. The user and the administrator should not manipulating the same things IMHO. There should be no contention. Perhaps the administrator can control the list of datasources the user can select from. but I dont think they should be fighting each other this way.
 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply, I'm thinking to add re-design and add the security on it.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic