Hallo everyone,
I have the problem that it takes a really long time until Tamino finds out
that my data has changed.
When I use the Tamino Interactive Interface to see what is in my database it also shows me the tree/instance I’ve just deleted. It can take up to 5 minutes until Tamino recongnizes that the tree/instance is gone.
Even when I use Tamino X-Plorer to delete a tree/an instance it takes minutes.
Details: I use TXMLObjectAccessor->insert:
TConnection connection = null;
TLocalTransaction transaction = null;
try {
connection =TConnectionFactory.getInstance()
.newConnection(databaseURI);
transaction = connection.useLocalTransactionMode();
} catch (TServerNotAvailableException e2) {
e2.printStackTrace();
} catch (TTransactionModeChangeException e) {
e.printStackTrace();
}
TXMLObjectAccessor accessor=connection.newXMLObjectAccessor(
AccessLocation.newInstance("customCollection"),
TJDOMObjectModel.getInstance());
TXMLObject customObj = TXMLObject.newInstance (doc);
try {
accessor.insert(customObj);
}....
to insert tree (JDOM Document) into the database which can look somehow like this:
<?xml version="1.0" encoding="UTF-8"?>
<customtree userid="ABC">
<customnode nodetype="P">SomeData</customnode>
</customtree>
When I change the tree in my application the old is(should be) deleted with
TXMLObjectAccessor accessor = connection.newXMLObjectAccessor(
TAccessLocation.newInstance("customCollection"),
TJDOMObjectModel.getInstance());
TXQuery xQuery = TXQuery.newInstance("update for $a in input() where $a/customtree/@userid=\""+userID+"\" do delete $a"); // userID:ABC
try {
TResponse response = accessor.xquery(xQuery);
return true;
} catch (TXQueryException e) {
System.out.println("Couldn't delete CustomTree for user "+userID);
return false;
}
I get the response
<ino:messageline ino:subject="">XQuery Update Request processed</ino:messageline>
which should be OK.
After this step the new tree is inserted the same way as I wrote in first place.
Any ideas? Anything else you wonna know?
Thanks, Andreas