?
Solved

Use existing c++ dll in Web Application

Posted on 2004-09-30
6
Medium Priority
?
181 Views
Last Modified: 2010-03-17
Hi, i have a existing system in c++.
I have Many not thread safe dll´s.
I want to call them from my java web application.

Is there a better way to then use SingleThreadModel and isThreadSafe = "false"?

Is there a better way than copying, renaming and reloading the dll for every user?

I can´t make the dll´s thread safe. this would take me too long. (very much code to check)
the SingleThreadModel would be to slow (yes, i tried it :-( )

creating a new process with Runtime and connect to it with rmi is also too slow (i also tried that :-( )
0
Comment
Question by:Koma666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 13

Expert Comment

by:petmagdy
ID: 12326662
Hello I have a suggestion that may help:

1- Create a Single Tone Java Class to wrap the Native DLL APIs and make all the methods synchronized

the single tone class looks like this:

class MySingleTone
{
 
  private static MySingleTone instance = null;

  private MySingleTone()
  {
     // Initialize
  }
 
   public static MySingleTone getInstance()
   {
     if(instance == null)
     {
        instance = MySingleTone();
     }
     return instance;
   }

   public synchronized callDllMethod()
   {
     // call ur DLL functions
   }

}
0
 
LVL 5

Author Comment

by:Koma666
ID: 12562995
I can´t do that.
The dll has to be initiated for every user.
It´ll crash if i use one instance for all users.
0
 
LVL 5

Author Comment

by:Koma666
ID: 12563007
I found a way
I found a way to speed up the single thread model by using more cach funktions.
So it´s not the best way but it´s fast enough to use it.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12573297
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question