A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Subject.doAs() with complex code..
Joined: Aug 31, 2006
Mar 11, 2011 16:34:13
In the javadocs it states that AccessController.doPrivileged() is called
Further in the javadocs for AccessController.doPrivileged it states...
"Be *very* careful in your use of the "privileged" construct, and always remember to make the privileged code section as small as possible."
What then are the implications for having code within the privileged construct which is not even remotely on the small side?
Specifically a large switch statement modifying several Maps.
It does feel somewhat odd passing an anonymous inner class containing a switch statement as a parameter for a method call which eats all checked exceptions. Then again I'm not familiar with Jaas.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Subject.doAs() with complex code..
Clarification from Khalid Mughal's mock exam
Error while Running Code
Dan's Exam on Flow control
Box or Unbox
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014