XmlContainer.putDocument problem - invokation makes system hang on -
06-24-2006
, 10:17 AM
Hi,
I have something like that in my code:
EnvironmentConfig ec = new EnvironmentConfig();
ec.setAllowCreate(true);
ec.setInitializeCache(true);
ec.setInitializeLocking(true);
ec.setInitializeLogging(true);
ec.setTransactional(true);
XmlManagerConfig mc = new XmlManagerConfig();
mc.setAllowAutoOpen(true);
mc.setAdoptEnvironment(true);
mgr = new XmlManager(env, mc);
mgr.setDefaultContainerType(XmlContainer.WholedocC ontainer);
trans = mgr.createTransaction();
container = openContainer(); //opens container with
setTransactional(true)
XmlDocument doc = container.getDocument(trans,"foo.xml");
(...)
XmlQueryContext lxqc = mgr.createQueryContext();
/* there I prepare some additional xQuery script against my container
called 'container' */
(...)
XmlQueryExpression lxqe = mgr.prepare(lsQuery, lxqc);
XmlResults lxr = lxqe.execute(trans,lxqc);
String con = "<a>aa</a>";
XmlUpdateContext lxq = mgr.createUpdateContext();
container.putDocument(trans, "another.xml", con, lxq);
and execution hangs in the last method "putDocument" invokation and
system goes suspended...
It's strange that when I comment line with:
XmlResults lxr = lxqe.execute(trans,lxqc);
everything goes right and no suspension occurs...
Does anybody know what do I wrong in above code that make my program
hangs ?
I use Berkeley DB XML 2.2.13
thanks a lot for any help
best
regards
darek |