I need to find the way to get the object-id of a specific config object and I can't seem to be able to get the result I want.
Consider the code below:
wsadmin>print AdminConfig.list('SessionManager')
(cells/labwas11Node01Cell/applications/isclite.ear/deployments/isclite|deployment.xml#SessionManager_1162483845425)
(cells/labwas11Node01Cell/nodes/labwas11/servers/server1|server.xml#SessionManager_1183122130078)
Is there a way to obtain only the second line with a crafty AdminConfig.getid?
I just read a nice article about object name and containment path, which helped a bit understanding my problem, but not providing with a solution.
I have found a way to get my info, but I'm sure there is a better way... if someone can help it would be great.
So I want the session manager of my server, but I have another session manager that is defined for an application.
So AdminConfig.list is not good enough
What I can do is that the session manager I want has an attribute that reflect it's context. ( I have removed some lines for clarity)
print AdminConfig.show('SessionManager(cells/labwas11Node01Cell/nodes/labwas11/servers/server1|server.xml#SessionManager_1183122130078)')
[accessSessionOnTimeout true]
[allowSerializedSessionAccess false]
[context (cells/labwas11Node01Cell/nodes/labwas11/servers/server1|server.xml#WebContainer_1183122130078)]
[enable true]
[enableCookies true]
[enableProtocolSwitchRewriting false]
[enableSSLTracking false]
[enableSecurityIntegration true]
[enableUrlRewriting false]
[maxWaitTime 5]
[properties []]
[sessionPersistenceMode NONE]
The context object is the WebContainer to which this session manager apply.
so I should be able to compare these two and find the session manager I want.
SesMgrList = AdminConfig.list('SessionManager').splitlines()
for SesMgr in SesMgrList:
if AdminConfig.showAttribute( SesMgr, 'context') == AdminConfig.list('WebContainer'):
Modify my session manager custom properties
But thats not elegant at all... anyone has a better way?