in content/artifacts/daytrader_singleServer.py [0:0]
def createJMSTopic ( tName, jndiName, tSpace, delMode, scope ):
# tName - topic name
# jndiName - topic jndi name
# tSpace - topic space
# delMode - delivery mode
# scope - scope
print " "
print "Creating JMS Topic " + tName + "..."
# Check if the topic already exists
tList = AdminTask.listSIBJMSTopics(scope )
topic = ""
if (len(tList) > 0):
for item in tList.split("\n"):
item = item.rstrip()
if (item.find(tName) >= 0):
topic = item
break
#endIf
#endFor
#endIf
if (topic == ""):
print " Topic Name: " + tName
print " JNDI Name: " + jndiName
print " Topic Space: " + tSpace
print " Delivery Mode: " + delMode
params = ["-name", tName, "-jndiName", jndiName, "-topicName", tName, "-topicSpace", tSpace, "-deliveryMode", delMode]
topic = AdminTask.createSIBJMSTopic(scope, params )
print tName + " created successfully!"
else:
print tName + " already exists!"
#endElse
return topic