How do enterprise beans access native libraries?

Tim Rohaly

In short, they don't.

The EJB 1.1 Specification, section 18.1.2 (Programming Restrictions) lists some things that enterprise beans cannot do. In particular:

  • The enterprise bean must not attempt to load a native library.
This function is reserved for the EJB Container. Allowing the enterprise bean to load native code would create a security hole.

The EJB 1.1 specification is available for download from http://java.sun.com/products/ejb/docs.html.