Yes. It works! Thank you for your help.
However, the application doesn't run in JBoss any more :-(. But it is a question to be submitted in another forum ;-).
Just one detail:
instead of
FooLocal fooLocal = (FooLocal) new InitialContext("java:comp/env/fooejbref");
use
FooLocal fooLocal = (FooLocal) (new InitialContext()).lookup("java:comp/env/fooejbref");
[Message sent by forum member 'hbeto' (hbeto)]
http://forums.java.net/jive/thread.jspa?messageID=274330