Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
kittse
kittse
1 Post
ACCEPTED ANSWER

Pinned topic How to remove/modify JNDI

‏2011-10-10T15:34:19Z |
We use the following to create the JNDI, would you please tell how to remove the JNDI. Thx

def createBinding(scope,type,ident,name,url,jndi):
cell = scope.replace("cells/",'')
cellid = AdminConfig.getid('/Cell:'+ cell +'/')
if len(cellid) < 1:
print "Scope name : " + scope + " for Name Binding " + name + "is not valid. Skipped...."
return
nameBindingList = AdminConfig.list('IndirectLookupNameSpaceBinding', cellid).split(java.lang.System.getProperty('line.separator'))
for nn in nameBindingList:
##print nn.split("(")[0]
if nn.split("(")[0] == ident:
print "Found duplicate Name Space Binding Alias "+ name +". Skipped."
return
cell = scope.replace("cells/",'')
identAttr =
nameAttr =
urlAttr =
jndiAttr =
attrs = []
attrs.append(identAttr)
attrs.append(nameAttr)
attrs.append(urlAttr)
attrs.append(jndiAttr)
print " Create Name space bindings alias : "+name
AdminConfig.create('IndirectLookupNameSpaceBinding', cellid, attrs) AdminConfig.save()