Hello,

We encountered a problem with the SequenceManagerTransientImpl.  We have
two objects that are related; bank account has a bank on it.  A key to
the bank account table has a custom FieldConversion implementation for
encryption/decryption associated with it.  When we refresh the
references on a new bank account, OJB goes to retrieve the bank and uses
SequenceManagerTransientImpl to initialize any null keys on bank account
with a unique value.  However, after SequenceManagerTransientImpl
returns a long > 1000, AbstractSequenceManager calls the sqlToJava
method on the custom FieldConversion (in the getUniqueLong method).  The
custom FieldConversion bombs, because it's being asked to unencrypt and
already unencrypted value.  So, we overrode getUniqueValue in
SequenceManagerTransientImpl as follows...
    public Object getUniqueValue(FieldDescriptor field) throws
SequenceManagerException
    {
        return field.getJdbcType().sequenceKeyConversion(new
Long(getUniqueLong(field)));
        // perform a sql to java conversion here, so that clients do
        // not see any db specific values
        // abyrne commented out: result =
field.getFieldConversion().sqlToJava(result);
        // abyrne commented out: return result;
    }
We would appreciate your feedback on whether or not this seems
problematic.  Also, we have been trying to be diligent about reporting
issues to you and hope that we can get back on a standard OJB version
soon.

FYI, other issues that we have fixed in our custom 1.0.4 build and
reported to you are...
- "Out of the box OJB only supports CLOBs on DBCP, P6Spy, JBoss, or
vanilla JDBC connections. I had to modify their code to allow it to
unwrap PreparedStatements from XAPool prepared statements (which is the
library Workflow uses for JTA and XA)."
- "MySQLPlatformImpl did not have support for the
StoredProcedureSequenceManagerImpl.  This is fixed in OJB 1.0.5."

Also, we recently tried to use the StoredProcedureSequenceManagerImpl
with Oracle, because we were working on MySQL compatibility for our app
and wanted to use the same sequence manager for both.  We failed because
of invalid sql generated by
PlatformOracle9i.prepareNextValProcedureStatement.  Rather than fixing
this one, we opted to just keep using the SequenceManagerNextValImpl for
now.

Thanks,
Ailish

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to