I have an ASP page that calls a java program (class file in C:\winnt\java\trustlib) and I was wondering if making a component out of this code would improve performance. If so, where can I get a tootorial on how to accomplish this.
Great info! Is there any reason to think that running the application like this will be more efficient (faster) than I currently have it setup? i have an MQSeries transaction that queries a mainframe and populates an asp page with the results. It runs in the 3-5 second range, and I am looking at improving performance.
Honestly, from what I've read no. Since you already have the program in your trusted library, there shouldn't be too much of an improvement if you compile it into a DLL.
The only reason you would want to compile it into a DLL is so that MTS can take advantage of it. Again, this depends on your situation, but if you think that the MTS object pooling can benefit you, then maybe you should consider creating it into a COM object.
By populating an ASP page, are you populating an ASP recordset, or directly outputting the contents onscreen from your component? Since I think that you can only populate a recordset set from the trusted library (not sure) - you might want to consider making a DLL so that you can access the intrinsic ASP objects (Response, Request, etc). This way, you can output the whole page from your DLL, easily cutting your runtime down.
Since J++ is pretty much being turned obsolete by Microsoft (see all the Sun v MS court cases and the development of C#), I wouldn't suggest getting too comfortable creating ASP COM from J++....
The class file in the trusted library is returning a 1000 character text string. I am essentially mapping out each of the fixed width fields into ASP variables using mid and painting the page with them. Could there possibly be a better approach? I don't quite see where a recordset fits into this picture.
since you are doing the string processing with Java, that's a whole lot better solution than doing it with VBScript (since it's extremely slow).
The 1000 character text file is getting split up into various fields, then you are outputting them on screen? If that's the case, then you probably have the most efficient solution implemented. But, if you are passing the split up text back to VBScript, then making VBScript paint the page, then maybe you might want to consider making it into a DLL. With the DLL, the only thing that you would need to do on the ASP page is create the object and destroy the object. You can then have your DLL do all the Response.writes to output the page.
I don't know if a RS fits your scenario either, sicne it seems like you have N amount of unrelated variables that you are outputting on screen.
ahh, but I am not doing the string processing in java. Maybe that is where I should look. I send the asp page a 1000 byte string, and I populate the ASP variables like so:
I understand your point about putting the parsing/painting logic into a component. That may improve things. As far as processing the string in java, I would have to do more research. The only way that I see how to do it (using ASP anyway) is pass one variable back with a return like so:
The return(var); is how our java code here works too... but that isn't the only way that you need to do it.
Consider making a Java DLL, and breaking up the string in your Java DLL. From your Java DLL, I think that if you create public global variables, you can access those as properties (I'm not sure, and our Java programmer isn't here today, but it seems to make sense). Thinking in this way, by creating the J++ DLL, your ASP page would break down into something like this:
I assume you pass parameters into a function (myFunction), to create the prices that you need.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.