def createMDBActivationSpec()

in content/artifacts/daytrader_singleServer.py [0:0]


def createMDBActivationSpec ( mdbName, jndiName, busId, JMSDestJndi, destType, authAlias, scope, durability ):
	#    mdbName     - MDB name
	#    jndiName    - activation spec jndi name
	#    SIBus       - SIBus name
	#    JMSDestJndi - JMS destination JNDI name
	#    destType    - destination type
	#    authAlias   - authentication alias name
	#    scope       - scope
	#    durability  - subscriptionDurability

	print " "
	print "Creating MDB Activation Spec " + mdbName + "..."

	# Check if the activation spec already exists

	asList = AdminTask.listSIBJMSActivationSpecs(scope )
	mdb = ""
	if (len(asList) > 0):
		for item in asList.split("\n"):
			item = item.rstrip()
			if (item.find(mdbName) >= 0):
				mdb = item
				break
			#endIf
		#endFor
	#endIf

	if (mdb == ""):
		print "  MDB Activation Spec Name:   " + mdbName
		print "  JNDI Name:                  " + jndiName
		print "  JMS Destination JNDI Name:  " + JMSDestJndi
		print "  Destination Type:           " + destType

		SIBus = getName(busId)
		params = ["-name", mdbName, "-jndiName", jndiName, "-busName", SIBus, "-destinationJndiName", JMSDestJndi, "-destinationType", destType, "-authenticationAlias", authAlias, "-subscriptionDurability", durability, "-clientId", mdbName, "-subscriptionName", mdbName]
		mdb = AdminTask.createSIBJMSActivationSpec(scope, params )
                
		print mdbName + " created successfully!"
	else:
		print mdbName + " already exists!"
	#endElse

	return mdb