Joerg Wesely

Greenhorn
+ Follow
since Jan 15, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joerg Wesely

thank you for your reply.

I tried the second variant against MSSQL and Informix, and it seems to work. I also was expecting an exception executing a closed prepared statement.

As far as I understand the JDBC javadocs, even closing the result set is optional- it should be closed as soon as the prepared statement is re-executed. Am I right here and the specification is not implemented correctly (what seems to be quite usual :-( ) or did I understand it wrong?
If I'd move the statement creation into the loop, using a prepared statement would be completely useless, right?

I've solved it now by using the Spring JDBCTemplate (I think the Spring guys have implemented this better than I ever could), but it would be good to know if the DB-server crashed due to workaround-requiring JDBC drivers or my lack of JDBC skills...
Hi,

I've created an application that periodically polls data from another sytem's database using a poller class as Runnable that does the fetching.
The DB was MS SQL in an earlier version, now it's Informix.

I ran in massive issues with the Informix database (it kind of crashed with a kind of out of memory error), what seems to be caused by code like this:

writing it like this seems to solve it:

So if I close the prepared statement in every loop cycle, everything seems to be ok.
I'm wondering if the second way is the best practice to do it or just a workaround- doesnt't it kill the performance gain of a prepared statement if I close it every time?

Did I made it wrong with the first implementation and MSSQL (using the JTDS JDBC driver) was just more fault-tolerant than Informix or is there kind of a bug in the Informix JDBC-driver raising this issue?

thank you in advance for your answer

Jörg

Hi all,

I have project using maven with a simple pom:

[...]
<groupId>myGroupId</groupId>
<artifactId>myArtifactId</artifactId>
<version>0.0.1-SNAPSHOT</version>
[...]

is there a way to access the version information within my java code?
I'd like my program to display the version number from the pom it has been built with.

Is that possible?

Thanks in advance

Jörg
14 years ago