|
From: Steve B. <st...@te...> - 2008-02-04 15:45:23
|
> The issue is we're using an oracle database and with an acceptor you're > not allowed to use a session qualifier for whatever reason and I'm > guessing somehow the initial creation of the session entry works but any > subsequent update to the table fails because the session qualifier is > null. I haven't looked into the code but I remember that JDBC logging > against an Oracle db is a problem if you don't provide a session > qualifier. Hello Robert, This problem is only indirectly related to session qualifiers. The root problem is that Oracle treats empty strings as SQL nulls. The SessionID uses empty strings rather than Java nulls for unset values. My guess is this was done in QF to avoid this very problem of attempting to put SQL nulls into nonnullable primary key columns. However, Oracle's behavior breaks that approach. One way to fix the Oracle problem is to provide a different default value for unset SessionID properties. I'd recommend doing this in the JdbcStore immediately before performing SQL operations. Therefore, it would be an option on the JdbcStore (something like "JdbcStoreSessionIdPropertyDefault"). You could then create a setting like JdbcStoreSessionidPropertyDefault=N/A and the string "N/A" would be written to the database instead of an empty string. If you are using 1.3.1 and need this in a hurry, this would be an easy modification to the JdbcUtil.setSessionIdParameters() method. In the meantime, I've added a Jira issue (QFJ-295) to add this capability into the next release. > ... get an explanation as to why session qualifiers don't work > for acceptors? This is really a separate issue, but session qualifiers are a hack for initiators that must communicate with nonstandard counterparties who use the same session ID for multiple sessions (rare). This works on the initiator side because the initiating application specifies the specific session when sending a message and received messages arrive on a socket that is bound to the qualifier session. It doesn't work for an acceptor. There is no standard way for a counterparty to send a session qualifier to an acceptor. When the acceptor receives a message it would have no way to know which "qualified" session to dispatch it to. Regards, Steve |