We have old thread unsafe Solaris native libraries that we have to use in our J2EE application (1000 concurrent users). The first idea was to use JNI from EJB but in this case all beans will use the same instance of those thread unsafe libraries.
Is there any pattern to resolve this problem?
Any ideas would be appreciated.
I had a simillar situation. I made socket calls from the EJBeans to a socket server written in the native language to receive the call and get back the result. The system is working fine.
do you foresee any issues in this?
Is it mean that you created server that kepps process with unsafe libs for each concurrent user?
We have used SOAP to talk to legacy C++ app from ejb. There are some open source C++ SOAP implementations available. It's nice to be able to use the object and method call semantics in calling C++ from ejb through SOAP.
If there is only one thread listening for HTTP in your SOAP driver, then C++ app does not need to be thread safe.
The Server is multi-threaded. So you dont end up creating one server for a user.