Author |
Topic  |
|
teo
1 Posts |
Posted - 21 Aug 2006 : 11:48:25
|
my application shows several applets on the same page using both packages (spc and rt) and wanted to see how i could resolve the following two issues:
1) each package has its own QCLicense.lic.xml file which does not allow me to easily create a reusable "parent" JFrame class which can include both spc and rt Objects that extend ChartView. Currently I am having to separate my spc and rt classes in to different packages and use follwing code to make the distinction:
if(packageNameOfMyClassExtendingChartView.indexOf(".rt.") >= 0) { ChartView.setLicensePath("qclicence/rt"); } else { ChartView.setLicensePath("qclicence/spc"); }
this is not my prefered solution because of the reason of having to adjust my application package structure because of a 3rd party tool.
2) Every time and object is instantiated from a class extending ChartView the licence files is re-read and parsed. This creates alot of unnecessary IO and parsing operations which take time and cause an overhead in my application where small response time is very important. From what i see, because of the licence validation code being embedded inside the ChartView and ChartInfo classes (and cannot be overwritten) there is no way to read the licence file(s) once and cache them or provide some other means of licence file validation which makes more sense.
Thank you.
|
|
quinncurtis
1164 Posts |
Posted - 21 Aug 2006 : 12:23:37
|
1. We can easily create a single license file that works with QCRTGraph and QCSPCChart. That way you would only need to reference a single license file. If you purchase or currently own those products we would more than willing to do that for you.
We checked and if you install both software packages, one after the other, in the same root directory (quinn-curtis by default), the license file that you find in the quinn-curtis/java/RedistributableFiles folder will be a composite license file that will work with either software package.
2. It is not clear what you are doing to cause the multiple reads of the license file. All of our example programs combine multiple ChartView derived classes in a single application and our tests sbow that the license file is only read when the first ChartView object is instantiated. A static variable in the class keeps track that the license file has been read and does not do it again.
Can you modify one of our example program to reproduce the behavior you describe ?
|
 |
|
hzhou111h
6 Posts |
Posted - 21 Nov 2006 : 16:04:59
|
I also have a license problem, but a different behavior: I have one html file holding two Applets. Both applets are in the same jar file, reading the license file in this way: InputStream instream = this.getClass().getResourceAsStream("QCLicenseJava.lic.xml"); boolean filefound = ChartView.loadLicenseFileAsResource(instream); ... One applet is loaded without problem. The other applet cannot be loaded in the first visit of this html page, instead, a warning dialogue of license problem was popup. If I click a button to another page and then back, then both applet are loaded without any problem.
In the future, I'll hold many applets in one html page. This license problem will be very annoying. |
 |
|
quinncurtis
1164 Posts |
Posted - 21 Nov 2006 : 17:06:04
|
Sounds like your two applets are trying to access the same license file at exactly the same time and one is being locked out. Put your two different applets in separate jar files, each with its own copy of the license file, and let us know the results. |
 |
|
hzhou111h
6 Posts |
Posted - 07 Dec 2006 : 11:07:13
|
My previous problem was caused by: One html page loads two applets, which are in one jar file, and one license file in that jar file. I have solved the problem by: Whenever I need to load more than one applets in one html page, I put the applets in separate jar files. Each jar file has a license file. The disadvantage of doing this way is: Creating unnecessary more jar files. Loading of the html page is slow if there are too many applets in one html page. |
 |
|
|
Topic  |
|
|
|