Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Declarative and programmatically?

Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Declarative security is great in EJB, no question about it. There is a slight problem that seems to be explained in literature with money related examples. Class of the problem: How to implement security on task that requires different security profile for operation involving different amount of moneys. For example junior trader is only allow do to orders up to 100K. In this case it is advise to do it programmatically and entangle business code with security. How about writing two separate methods, one for orders up to certain limit and the other for above. I am not suggesting to hardcode 100K in the name and functionality of the method. I am suggesting that leaving check for the limit inside the method and separating security aspect with declarative approach could be a pattern to follow in this example. Any other examples where programmatic security is necessary? What do you think?
Best regards.
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic