Here's my dilemma:
 
I have a Java object that runs a routine on our database (MSSQL). The
routine does financial calculations based on selection queries and then
inserts these calculated values back into the database. 
 
When I run the Java manually through a java stub program, I can see the
hits on the database via SQL Profiler, so I know that the java is
talking with the database fine. 
 
However, when I put the java object in a ColdFusion program and run it,
nothing. SQL Profiler doesn't show a hit on the database. ColdFusion
does not display an error. I know the java object is being correctly
instantiated since I can call other methods in the object that do not
require information from the database, and it returns the correct
values.
 
Here's the CF code:
<!--- Creating the object. I've also tried the createObject() method
with the same results. --->
<cfobject type="java" class="extract.Extract" name="newExtract"
action="create">
<!--- Extract constructor: new Extract(database name, regionid, closure
Number) --->
<cfset ret = newExtract.init('va102', javaCast("int",1),
javaCast("int",1096))>

<cfdump var="#ret#"> <!--- dump correctly shows all the public methods
available --->

<cfoutput> #ret.getRegionID()#</cfoutput> <!--- Correctly displays "1"
as the regionid passed in the constructor --->

<!--- This is the method that runs the routine on the database. Nothing
registers in SQL Profiler, and no changes are made in the db. --->
<cfset result = ret.runExtract()>

<!--- Correctly displays the closure number passed into the constructor
--->
<cfoutput>#ret.getClosureNo()#</cfoutput>
 
<!--- This method should show the number of rows ("claims") that were
retreived for the financial routine. 
        This displays 0, since nothing was retreived from the database.
When called from my Java stub program, 
        it returns the correct amount of--->
<cfoutput>#ret.getNewClaimCount()#</cfoutput>
 
 
I want to use the Java object since Java will handle financial
calculations better than ColdFusion, and a Stored Procedure (which is
how it is currently done in our production code) puts too much of a
processing load on the database server, effecting performance. 
 
Any thoughts? Anybody ran into this before? Any help is much
appreciated.
 
James Davis
Kaleida Systems, Inc. 
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260880
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to