|
I have a JavaBean API that i use to Connect to our DB via an
Object Server(RedBack Business Objects)
The Constructor Increments a Static variable everytime an
Object is Instanciated from the API.
private static int objCount;
public RedBackObect{
objCount++;
}
I am looking track DB Usage from the NO of Objects created and
do some stess testing as well.
Now.. If the objects are invoked in a CFC - CFFunctions like
<cfset var rbo = "" />
<cfscript>
rbo = createObect("Java","RedBackObject").init(); // this
should call the default contructor
//do some stuff with the rbo.
objCount = rbo.getObjectCount(); // static method in
API
rbo.closeObj();
rbo="";
</cfscript>
objCount = 1, which is not right cause the object was
instantiated several times.
rbo = createObect("Java","RedBackObject").init(); AND
rbo =
createObect("Java","RedBackObject")
Both call the default contructor right Or do you have to
explicitly say "init()"?
If the Class gets loaded only once, then i should get the
correct object count.
Can anybody explain whats going on in CF Object
Creation?
Thanks,
Joe Eugene
|
- [CFCDev] CFObject Creation Count Joe Eugene
- [CFCDev] CFObject Creation Count Joe Eugene
- Re: [CFCDev] CFObject Creation Count Joe Eugene
- RE: [CFCDev] CFObject Creation Count Adam Wayne Lehman
- RE: [CFCDev] CFObject Creation Count Joe Eugene
- Re: [CFCDev] CFObject Creation Count Sean A Corfield
- RE: [CFCDev] CFObject Creation Count Joe Eugene
- Re: [CFCDev] CFObject Creation Cou... Matt Liotta
- Re: [CFCDev] CFObject Creation Cou... Sean A Corfield
- RE: [CFCDev] CFObject Creation... Joe Eugene
- Re: [CFCDev] CFObject Crea... Sean A Corfield
