"alesj" wrote : "adrian(a)jboss.org" wrote :
"adrian(a)jboss.org" wrote :
http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executor.html
| | | by "injection" on to the kernel.
| | |
| |
| | I meant controller. ;-)
| Do we even need a getExecutor method?
|
| | public interface Controller extends JBossInterface
| | {
| | ...
| |
| | /**
| | * Get the executor
| | *
| | * @return the executor
| | */
| | Executor getExecutor();
| |
| | /**
| | * Set the executor
| | *
| | * @param executor the executor
| | */
| | void setExecutor(Executor executor);
| | }
| |
| Allowing some other MC code to re-use Controller's execution env?
I'd include the getter, subject to the same security check as invoking the setter.
Otherwise somebody could do:
|
| @Inject(...from the controller...)
| public void setExectuor(Executor ex)
| {
| // Fill the queue with tasks that don't end, a denial of service attack
| while(true)
| {
| ex.execute(new Runnable()
| {
| public void run()
| {
| // sleep forever
| }
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168454#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...