Sigh. There is a STRONG difference between what the spec says (or "suggests" in the case of JNI) and what you can really do. In theory using JNI is verboten, yes, but in practice, people do it within
EJB containers all the time. As with so many "forbidden" things the fact is that if you don't put JNI methods directly in the beans themselves, but put them in helper classes called by the beans, that this will work fine.
We've got several customers doing this now, and we don't expect it to stop working any time soon. One thing you must be careful of, though is classpath issues. We've found that you need to make sure that your JNI code is loaded by the first classloader in your application server (however you determine that) to make sure that you don't get into the dreaded "attempt to reload DLL" issues that happen when higher-level classloaders bounce.
Kyle