|
@@ -511,6 +511,16 @@ public:
|
|
|
pconn.setown(querySDS().connect("/JobQueues",myProcessSession(),RTM_LOCK_WRITE|RTM_CREATE_QUERY,wait));
|
|
|
if (!pconn)
|
|
|
throw MakeStringException(-1,"CJobQueue could not create JobQueues");
|
|
|
+ IPropertyTree *proot = pconn->queryRoot();
|
|
|
+ StringBuffer cpath;
|
|
|
+ cpath.appendf("Queue[@name=\"%s\"]",qd->qname.get());
|
|
|
+ if (!proot->hasProp(cpath.str())) {
|
|
|
+ IPropertyTree *pt = proot->addPropTree("Queue",createPTree("Queue"));
|
|
|
+ pt->setProp("@name",qd->qname.get());
|
|
|
+ pt->setProp("@state","active");
|
|
|
+ pt->setPropInt("@count", 0);
|
|
|
+ pt->setPropInt("Edition", 1);
|
|
|
+ }
|
|
|
}
|
|
|
catch (ISDSException *e) {
|
|
|
if (SDSExcpt_LockTimeout != e->errorCode())
|
|
@@ -518,16 +528,6 @@ public:
|
|
|
e->Release();
|
|
|
timeout = true;
|
|
|
}
|
|
|
- IPropertyTree *proot = pconn->queryRoot();
|
|
|
- StringBuffer cpath;
|
|
|
- cpath.appendf("Queue[@name=\"%s\"]",qd->qname.get());
|
|
|
- if (!proot->hasProp(cpath.str())) {
|
|
|
- IPropertyTree *pt = proot->addPropTree("Queue",createPTree("Queue"));
|
|
|
- pt->setProp("@name",qd->qname.get());
|
|
|
- pt->setProp("@state","active");
|
|
|
- pt->setPropInt("@count", 0);
|
|
|
- pt->setPropInt("Edition", 1);
|
|
|
- }
|
|
|
}
|
|
|
if (!timeout)
|
|
|
break;
|