• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to allow the invocation of a method only to a select group of classes  RSS feed

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imagine I have a method foo() that I want to limit invocation to only a select tier.
e.g. methods exposed by the persistence tier is only executable to the service tier. The Web tier cannot invoke them.

I don't want a solution that depends on container security. I want to implement it by hand.

Some ideas:
a) Perhaps use AOP to intercept method calls.
b) Perhaps use a proxy class.

Any ideas ?

Regards,

Pho
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've personally never implemented this myself, but the talks/demos I've seen on AOP seem to lend itself nicely to this sort of cross cutting concern problem. Sorry not a very useful response I know! :roll:
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem Martijn, at least by responding, I know that at least somebody have seen AOP used for such a context.

Regards,

Pho
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!