I wrote a Java API that talks to our RedBack Object Server which has
Business Objects
talking to a Muti-Value DataBase (IBM U2-UniVerse)
Currently every DB Call Creates an Object like
var rbo = createObject("Java", "RedBackObject");
var myResult = structNew();
rbo.openObj("rboAccount","rboModuleClass");
rbo.setProperty("propName", "propvalue")
rbo.callMethod("rboMethod");
myResult.firstNames = rbo.getPropertyArray("FirstNames");
myResult.lastNames = rbo.getPropetyArray("LastNames");
rbo.closeObj();
<cfReturn myResult />
If i instantiate the RedBackObject in the private scope of the CFC like
variables.rbo = createObject("Java", "RedBackObject");
Would there any problems with the below?
1. Reuse the private scope object(rbo) for every DB call in CFC
2. Have a destroy() method that does rbo.closeObj(). Basically set the
RedbackObject's instance variables to null.
3. Instantiate the CFC in Session scope.
When the methods within the CFC are executed dynamically in a loop to get
data for the end view, would the above result in data corruption?
Thanks,
Joe Eugene
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]