Hi,
I may have found a problem with the DB2 driver support of bindings across
multiple stores -- in terms of synchronizing the "binding" DB table that is.
In my quest to get a working testsuite cmdomain.xml configuration I tried to
configure my root store "/" to use a jdbc nodestore and the other stores to
use a previously known working configuration of the XML descriptor store.
The hang in db2 went away to be replaced by an exception from
DB2RDBMSAdapter.storeObject().
The reason for the exception is in the following code in storeObject() we
use object.enumerateBindings() to get a list of the child bindings to insert
into the binding table for the parent "/". The child bindings are added to
this binding list by StructureImp.create() at line 376 before the call is
made on line 379 to store the parent object again to include these child
changes. So in the storeObject() call that follows one of the bindings is to
my XML file descriptor store mount point, "/files_2". But since I'm using
the XML descriptor store it seems the "/files_2" uri isn't inserted into the
uri table(??). The object seemed to be created by the XML store but there's
no uri in the table. So the getID() call below comes back with 0 trying to
get the uri_id for "/files_2" and then the sql statement comes back with an
exception saying that the child_uuri_id of 0 is not valid because there is
no corresponding value in a parent table.
Enumeration bindings = object.enumerateBindings();
while (bindings.hasMoreElements()) {
ObjectNode.Binding binding = (ObjectNode.Binding)
bindings.nextElement();
try {
long childID =
getID(connection,binding.getUuri());
statement =
connection.prepareStatement(
"insert into BINDING (URI_ID, NAME,
CHILD_UURI_ID) values (?,?,?)");
statement.setLong(1, uriid);
statement.setString(2, binding.getName());
statement.setLong(3, childID);
statement.executeUpdate();
} finally {
close(statement);
}
}
So the questions are:
1. should this code be searching for a uri for /files_2 in the jdbc
store wheren "/" is stored when /files_2 is in the XML descriptor store?
2. should the code handle child bindings differently if the parent
and child are in different stores as they are in this case?
Thanks,
Warwick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]