A couple of other things to keep in mind:
- You don't generally access local interfaces via JNDI in the way you've shown. You usually get them via the environment naming context (what HFE calls 'the bean's special JNDI context'.
- You can cast a local interface via a simple
Java cast. Remote interfaces obtained via JNDI or from a handle need to be narrowed, i.e. PortableRemoteObject.narrow(...).