Load two servlets at the same time

I use java’s connector.
and I load two servlets at the same time.
code like this:

grid.loadXML(“a.do”);
tree.loadXml(“b.do”);

sometimes ok and sometimes bad.

but delete one line. it will work well.

what is problem about and how to do it.

Components can work in parallel. Same for connector - it doesn’t use any global resources.
Check your DB connection code, maybe it opens exclusive connection, so while one connector works, second one can’t access a DB

thanks