in content/artifacts/daytrader_singleServer.py [0:0]
def createJMSConnectionFactory ( busId, cfName, cfType, jndiName, authAlias, scope ):
# Create JMS Connection Factory
# SIBus - SIBus name
# cfName - connection factory name
# cfType - connection factory type
# jndiName - connection factory jndi name
# authAlias - authentication alias name
# scope - scope
print " "
print "Creating JMS " + cfType + " Connection Factory " + cfName + "..."
# Check if the connection factory already exists
parms = ["-type", cfType]
cfList = AdminTask.listSIBJMSConnectionFactories(scope, parms )
connectionFactory = ""
if (len(cfList) > 0):
for item in cfList.split("\n"):
item = item.rstrip()
if (item.find(cfName) >= 0):
connectionFactory = item
break
#endIf
#endFor
#enfIf
if (connectionFactory == "" ):
print " Connection Factory Name: " + cfName
print " Connection Factory Type: " + cfType
print " JNDI Name: " + jndiName
params = ["-name", cfName, "-jndiName", jndiName, "-busName", getName(busId), "-type", cfType, "-authDataAlias", authAlias]
connectionFactory = AdminTask.createSIBJMSConnectionFactory(scope, params )
print cfName + " created successfully!"
else:
print cfName + " already exists!"
#endElse
return connectionFactory