Forum Discussion
Feb 04, 2015
Hi,
the following iRule works the same way as the sample code on DC regarding WebLogic JSESSIONID persistence:
when HTTP_REQUEST {
if { [HTTP::cookie exists "JSESSIONID"] } {
log local0. "Client [IP::client_addr] sent cookie [HTTP::cookie "JSESSIONID"]"
persist uie [HTTP::cookie "JSESSIONID"]
log local0. "uie persist [HTTP::cookie "JSESSIONID"]"
} else {
log local0. "no JSESSIONID cookie found"
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
log local0. "uie persist [HTTP::cookie "JSESSIONID"] from [IP::remote_addr]"
persist add uie [HTTP::cookie "JSESSIONID"] 1800
}
}
when LB_SELECTED {
log local0. "Poolmember [LB::server] selected"
}
For testing just monitor the persistence table from CLI:
watch -n 1 tmsh show ltm persist persist-records
You can uncomment the log statements in the iRule to track the log messages in /var/log/ltm:
tail -f /var/log/ltm
Thanks, Stephan