1) IMHO The style of programming you are going to use is not a functional programming and thus I don't think that it's appropriate for Enterprise Applications where a lot of programmers have to modify/understand the same code.
2) I think that the best way outs for you are(one of them):
- use a something similar to http://download.oracle.com/javase/1.4.2/docs/api/javax/security/auth/callback/CallbackHandler.html
- pass the current EJB bean through this reference