This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Dear All I am working on developping new web side applications (servlets). I was given some c\ c++ code which was used to generate DLL files as CGI to access back end database. Since the code was well developped and tested, I do not want to touch them at all. How can I write a "wrapper" so that I can use the code or DLL files in my servlets? I mean could I write a java based servlet / application to call these c \ c++ fuctions or use these DLL files? Thanks a lot. Have a nice nice holiday. Howard
Hi, I heared that a VB/VC++/ASP can call a java objects via com & JNI or something. Example: A asp.net can call apache Fop and do the rendering. I don't the reverse.Just have a look at some JNI documentation,may be it will help you. Regards
One alternative would be to run this C++ code as an application communicating with servlets via sockets. If the data that is passed for CGI access is something simple like a String, this works pretty well. Of course you would have to write some C code to handle the socket communication. One advantage - you can test it outside the servlet environment first. You would have to watch out for multi-threading issues of course with JNI or any other approach. Bill