Oliver,

Here's one problem I ran into trying to get a jdbc store working on "/" with
XML file discriptor stores for /tx and /tx2. The original email describes
the problem I saw with the bindings table and the second the workaround that
I found for it.

Warwick



> -----Original Message-----
> From: Warwick Burrows [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 09, 2004 1:46 PM
> To: 'Slide Users Mailing List'
> Subject: RE: DB2 adapter parent/child binding support bug
> 
> 
> 
> I have tried a workaround for this where I skip the child 
> binding creation statements if the getID() call returns 0 for 
> a particular child. This isn't the right answer but Slide 
> continues and starts with the configuration when I do this. I 
> don't know what kind of problems I'll encounter because of it though.
> 
> So what's the correct fix for this problem?  Ie. as per the 
> questions in the earlier email:
> 
>       1. should this code be searching for a uri for /files_2 
> in the jdbc store when "/" 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
> 
> 
> 
> -----Original Message-----
> From: Warwick Burrows [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 08, 2004 8:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: DB2 adapter parent/child binding support bug
> 
> 
> 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]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to