I was wondering if it is possible to run large-scale scientific simulations using EJB. I assume that appropriate JNI would be required to link to typically large legacy FORTRAN and/or C codes is required. Has anyone performed such? Load balancing would be achieved via clustering and reservation of a single high-performance machine for the numeric-intensive computations.
Does this violate the security models for EJB and J2EE? Are there specific standards or tutorials for deploying such applications.
It is one of EJB programming restrictions - enterprise bean should not load native libraries.
Is there no way to overcome that? How else can we use all that code written in native languages?
I just thought about this:
Does the specification restrict ONLY the Enterprise bean from calling native code or loading a native library? What if I use another layer of Java classes which loads the native library. Is this acceptable?
Sure, if container's security allows for it. I think you will be much better off using RMI/CORBA/sockets/... to access the piece which invokes native code.
Back to the original question - what is the benefit of using EJBs for scientific computations?
I was not planning on using EJB for pure scientific computations. However, I would like to be able to build a middleware for a product that would require a million lines of code (working perfectly) that are written in C. Earlier, my company had developed a Java wrapper for this code. Now I want to be able to use that code instead of having to re-invent the wheel.