I have a design issue regarding JNI and EJB. I have a native library with
me for predictive modelling. I want to use the library along with EJB. I
have searched the archives and a few other sites like theserverside.com and
have got a few tips

1. Even though J2EE prohibits JNI from EJB a lot of app servers allow you
to do it. So one option is use JNI directly from EJB.
2. Use a helper class having a static block to load the library. This
helper class can have methods(static?) to call the native methods. From EJB
call the methods of the helper class
3. Use RMI from EJB to talk to the native library
4. Use CORBA
5. Use messaging service

My questions are

1. Are there any security issues in using option 1 or option 2?
2. What should be the approach if the native library has to maintain state
and might be part of an ejb transaction?
3. Are there any problems with concurrent access to the library?
4. What about exceptions thrown from native code? How will it affect
clustering, transactions etc.
5. What are the pros and cons of the various approaches listed above.

Any tips would be appreciated
Regards
Anup

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to