[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JDBC Question... Not sure where to ask..



Hi Tim,

I looked at my copy of the code, and it's quite a bit different from 
yours.  You must be using an older version.

However, even in the current version, the problem doesn't appear to be 
addressed properly.  It seems to be allowing objects to be created that 
are never freed up... thus wasting memory.

If you're doing a begin_object_group when your program starts and a 
end_object_group when your program ends, then that should clear up the 
extra memory when your program ends -- but, of course, it'll still be 
wasted until then, which can certainly be a problem if you have a 
long-running job, like a server that sits in the background.

This issue needs to be looked into and solved...


Hatzenbeler, Tim wrote:
> Scott,
> 
> Your JDBC wrapper is fantastic, and I just had a technical questions about it...
> 
> 
> In this routine:
> 
> P JDBC_ExecQry    B                   export
> D JDBC_ExecQry    PI                  like(ResultSet)
> D   conn                              like(Connection) const
> D   sql                      32767A   varying const options(*varsize)
> D temp            s                   like(ResultSet)
> D stmt            s                   like(Statement)
> D rs              s                   like(ResultSet)
>  /free
>      monitor;
>         jdbc_begin_object_group(5);
>         stmt = createStatement( conn );
>         temp = executeQuery( stmt : s(sql));
>         jdbc_end_object_group(temp: rs);
>      on-error;
>         return *NULL;
>      endmon;
>      return rs;
>  /end-free
> P                 E
> 
> 
> 
> When I used a lower case select statement (MS SQL SERVER), the program errored out at the [temp = executeQuery( stmt : s(sql);]  and hit the on-error condition, and it skipped the jdbc_end_object_group function...  I was wondering, if that was ok, or should the on-error release the object group resources.
> 
> When I changed the case of my SQL to upper it worked fine...
> 
> 
> 
> Thanks, Tim
> 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------