RE: [Quickfix-developers] quickfixj JdbcStore problem
Brought to you by:
orenmnero
|
From: Steve B. <sb...@sm...> - 2006-04-26 06:18:17
|
Thanks Steffan, I'm currently migrating the QFJ code repository to Subversion but I'll=20 make the change as soon as that's done (hopefully within a few days). Regards, Steve > -----Original Message----- > From: qui...@li...=20 > [mailto:qui...@li...] On=20 > Behalf Of Staffan Ulfberg > Sent: Monday, April 24, 2006 5:00 PM > To: qui...@li... > Subject: [Quickfix-developers] quickfixj JdbcStore problem >=20 > QuickFIX Documentation:=20 > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html >=20 > Hello, >=20 > Since I stared using a database instead of normal files for storing > messages and session informtion, I've had the problem that my > quickfixj server tried to reset the session when it should not. I > tracked the problem to the code that loads the sessions table into the > memory cahce: >=20 > cache.setCreationTime(SystemTime.getUtcCalendar(rs.getDate(1))); >=20 > This code truncates the time of day information, so the creation time > actually read is always 00:00:00 in the morning. With a daily session > schedule staring after midnight, quickfixj resets the session every > time it is restarted, or when a client reconnects. >=20 > I made the patch below, and things seem to work. >=20 > Staffan >=20 >=20 > Index: src/quickfix/JdbcStore.java > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/quickfix/quickfixj/src/quickfix/JdbcStore.java,v > retrieving revision 1.17 > diff -u -r1.17 JdbcStore.java > --- src/quickfix/JdbcStore.java 24 Mar 2006 19:26:06 -0000 1.17 > +++ src/quickfix/JdbcStore.java 24 Apr 2006 14:57:06 -0000 > @@ -115,7 +115,7 @@ > try { > rs =3D query.executeQuery(); > if (rs.next()) { > - =20 > cache.setCreationTime(SystemTime.getUtcCalendar(rs.getDate(1))); > + =20 > cache.setCreationTime(SystemTime.getUtcCalendar(rs.getTimestamp(1))); > cache.setNextTargetMsgSeqNum(rs.getInt(2)); > cache.setNextSenderMsgSeqNum(rs.getInt(3)); > } else { >=20 >=20 > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers >=20 |