Maintaining session in distributed servers
Hi,
I wanted to know how to maintain the session in the case when the servers are in a distributed environment, i mean the http request is sent to one server which inturn checks if any of the servers is free and redirects the request to it. When there are many users accessing the site simultaneously, then maintaining serverside session becomes a problem.
Any help is appreciated.
Chrs
Anidhar
Hi,
Thanks for your response, but the session that i wanna maintain will clash with the data that i will be submitting with the form, meaning i am using get method to transfer data to the server.
Pls suggest.
Chrs
Giridhar
Similar Messages
-
Cisco ace Load balancer not maintaining session persistence
Hi All,
We have observed from the IIS logs on the internal webservers that loadbalancer is not maintaining session persistence for two specific request for the internal servers.
https://123.xyz.com/Webresource.axd
https://123.xyz.com/ScriptResource.axd
Error
Webresource.axd : 500
Scriptresource.axd: 404
Session persistence is maintained for all other requests hitting loadbalancer.
Issue is observerd on hits for these two specified components. WebResource.axd and ScriptResource.axd are Http Handlers used by ASP.NET and Ajax to add client-side scripting to the outgoing web page.
For e.g /WebResource.axd d=t2GXfySdqWmJ-lZSI0KVbw2&t=634868473645172160 is valid for server 1 and return 200 response but the same request is seen on few other servers where the response is 404 even though load balancer cookie is same. This means that if the request for the both the axd contains a valid decrypter and it connects to the right server then the response seen is 200.
The url passed by the user contains d and t parameters when are unique for each user session.
Solution tried:
Accessed website via another VIP without http redirect rule but could not see difference.
Tried to match machine key across all servers : Failed . Could see the ‘d’ value different for each server.
Load balancer VIP :
x.x.x.x
redirect: http > https
SSL Offload : ON
Poool:
WEB1
WEB2
WEB3
WEB4
WEB5
All servers listening on port 80
sticky config:
sticky ihttp-cookie cookie1 vip-1.1.1.1-80-stickyfarm
cookie insert browser-expire
replicate sticky
serverfarm vip-1.1.1.1_80
sticky http-cookie cookie1 vip-farm:1.1.1.1:443
cookie insert browser-expire
replicate sticky
serverfarm farm:1.1.1.1:443
Has anyone else come across similar issue?
Can you plese check if there is any config on cisco ace that will ensure that session persistence is maintained for these 2 requests.
Thank you for all the help.
regards,
SangramHello Sangram,
We would need simultanous packet traces before and after the ACE to get to the root cause of this issue so I would recommend that you open a cisco tac case for more in depth troubleshooing of this issue.
Joel Lamousnery
CCIE R&S - 36768
Engineer, Customer Support
Technical Services -
Hello,
Does anyone know how to maintain session and application variables through server restarts? I want to be able to shutdown and startup my Tomcat server without having the users lose their session and application variables (and consequently, their data and login state).
Any ideas?
Thanks!
-DavidI dont think its possbile since stopping and restarting gets new sessions. Only way that I would know would be to use cookies.
But then again i dont like the idea of saving passwords in cookies -
Hi,
I am having trouble in maintaining session in jsp frames. -
Here is sample code
parent.jsp
<HTML>
<HEAD>
<LINK rel=stylesheet type="text/css" href="defaults.css">
<TITLE>abc</TITLE>
<%
String checkAmount = "100.00";
session.setAttribute("checkAmount", checkAmount);
System.out.println("checkAmount in ppmain"+session.getAttribute("checkAmount"));
%>
<FRAMESET rows="235,*" frameborder="no" >
<FRAME NAME="pptop" SRC="top.jsp" frameborder=0 scrolling=no noresize >
<FRAME NAME="ppbottom" SRC="bottom.jsp" frameborder=0 scrolling=no marginwidth=0 marginheight=0 noresize>
</FRAMESET>
</HTML>
top.jsp -
<HTML>
<HEAD>
<LINK rel=stylesheet type="text/css" href="defaults.css">
<TITLE>top</TITLE>
<%
System.out.println("session in top "+session);
System.out.println("checkAmount in top "+session.getAttribute("checkAmount"));
%>
</HTML>
It is not able to retain session in the top.jsp ( in SOP for session I get different session ID in parent.jsp and top.jsp
This Works well in local but when gets deployed to WAS6 server troubles starts.
Any help is appreciated.
ThanksWhen you create URLs, you might want to try using JSTL to rewrite them:
<FRAME NAME="pptop"
SRC="<c:url value='top.jsp'/>"
frameborder=0
scrolling=no
noresize >
<FRAME NAME="ppbottom"
SRC="<c:url value='bottom.jsp'/>"
frameborder=0
scrolling=no
marginwidth=0
marginheight=0
noresize>Or you can use:
SRC='<%= response.encodeURL("top.jsp") %>' -
Regarding maintaining session in flex
Hello,
I am developing a flex application which is using jsp for database connectivity. I am using HTTP request for connecting to jsp page and passing and retrieving parameters. Now I wanted to ask how can I maintain session in flex so that I can know which client has logged into the system and on the basis of that can assign privileges to the client. Is it possible in flex and how?Reply needed urgently.
Thanks in advance.Hi a.bhavika,
There is not specifically any session management in Flex as it runs everything on the client side if at all you want to mainatain you can maintain it on the server side. ...and I think for your case I dont think you need any session managemenet as at the time of login only you can identify which user has logged in to the syetem and based on the user logged in you can load all the previleges of that particular user in the Flex application.
Check out the links below for your understanding...
http://www.forta.com/blog/index.cfm/2006/9/24/flex-and-session-state-management
http://www.assembla.com/wiki/show/romoz/Session_Management_in_Flex
Thanks,
Bhasker -
Maintain session in Multiple soap calls
Hi Experts,
We have an requirement which runs 2 synchronous calls.
1st synchronous cal is for validating user credentials and
2nd synchronous call (for successful log in) for uploading data in R/3 system.
The main task is to maintain session(ex: time 15 mins) .
1st synchronous call looks like Mobile Application (soap sender)<--->PI<----->(Soap receiver)Active Directory.
2nd synchronous call looks like Mobile Application (Soap sender)<--->PI<----->(Proxy)R/3 system.
can you pls let me know how can I achieve this requirement and
how to maintain session ID, session (is it in PI or in third party) and from where to maintain session.
Thanks in Adv..I am calling multiple web service apis from my bpel process on the same link. The Web services are written such that I always have to call a "login" api first which creates a context that's maintained throughout the session. Thus subsequent ws calls have to be made in the same session because all the other web service apis require the context to be present.
You can think of this as a stateful SessionBean (sort of).
The question is does bpel support this? -
Maintaining Sessions through Multiple Servlets and Contexts
Hi,
I have a webapplication that works like this:
* User connects to a login servlet on HTTPS
* Users information is authenticated on HTTPS
* An object is stored in the session for other servlets to validate the users access
* Authenticated users are forwarded to an HTTP page where the session is used to make sure they were granted access
My problem is this....Since I create the session in an HTTPS context, when I am in the HTTP context, I am unable to access the session and constantly get NULL. Is there any way that I can access the session from an HTTP context?What you can do is, just login using HTTPS and switch over to HTTP
and then store data in session.That is true, but what I want in the session is basically a flag on whether or not the user was granted access. I would much rather set all that up on the secure line, and then just access it from the unsecure ones...
For example, you are creating session using the
http://testdev:port/index.jsp page.
If access the same page(with hostname)
http://10.300.20.18:8080/index.jsp, you can't get the session even
though both are same web server and same web application. Because the
browser treats it different sessionI think if you use my above solution with the explicit passing of the jsessionid, you can move from one domain to another and still maintain session. Not positive on that though... -
Hi,
I want to maintain session expire time in portal for my iViews both Porta components and Web Dynpro. Where can I set this value.
Please let me know
Thanks
Bobby MHi,
I'm sorry. Messed it up Go through Web Dynpro application needs to never expire..
Regards,
Satyajit.
Message was edited by:
Satyajit Chakraborty -
I have a client side java program running. It is to comunicate with a web server using HTTP. How do I maintain session in my java program in the client machine. I have no access to the web server.
java.net.URL and java.net.HttpURLConnection are not maintaining session, tough allow me to transact. It creates a new session for every hit.
help!!!
Trijoy
[email protected]Hello Darted,
I have a small task ahead. My boss hates logging in userid and passwords every time he logs ont a site, which he dose 10-15 times a day. Due to session timeouts, he has to repeat the login process.
The requirement is that, I should have a process running, that will maintain the session throughout the day by hitting the URL every 18 mins or so..(session timeout is of 20 mins), and when he writes the URL the old session is maintained.
The process is such that it sends data over http to the server. The data is accepted only for the live and valid session. At present we are sending it through a form (post). If the state can be maintained in the java applet, swing or whatever, we will remove the HTML form and will automate the process of form sending.
I am looking for a mechanism which emulates a browser, i.e. maintain the session till it gets time out or browser is closed.... only I want to avoid using a browser and refreshing it every time and want to implement it thru java so that I can have control over it.
Thanks
Trijoy
PS. Any help in design, source code, suggestion is highly appreciated -
Hi,Have you got any idea about configuring Oracle 8i servers.Pls feel free to express your ideas, will be good.
Thanks
Riyas
KuwaitWhat do you really need in Distributed Servers, be more specific..
Regards,
Vijay. -
Maintaining session info on the CSS
I know by default the CSS cannot do this but what if I want it to. I have an IM application that a person has requested be put behind the CSS. They want it to be able to maintain sessions during a failover event. Any way to do this with the CSS?
You could talk to your Cisco office and see if they would consider it for a future release. If theres enough demand, you may get it through. What messaging software are you using?
-
How to maintain Session between two ear files?
HI Guys
I have deployed two ear files in oc4j. One is used to open applet and other for business operations.
My problem is after calling applet my session gets invalidate. How to save session between two context
I am new in this field please help!!
the sooner the better
RahulCan I do this if I integrate oc4j with apache!!
Can I maintain session
Plz. Help
Rahul -
Maintaining Session, NO Cookies
Hello:
Environment: Apache/9iAS, Oracle DB, Unix OS.
Issue: Maintain user session when Cookies are NOT allowed.
What are the options to maintain a session on a load balancing (Apache, multiple web servers) environment and client side cookies are not allowed?
Please address security, not losing sessions in your suggestions.repost
-
MAintain session across multiple DB Adapters.
Hi,
I am using a BPEL process which has multiple DB Adapters.
As far as I understand each DB Adapter call from BPEL is a different session.
Is there any way to maintain a same session across multiple DB Adapter calls i.e to make multiple DB calls in the same session?
thanks,
CDYes this is supported.
You'll have to take a look at the support for XA (distributed transactions).
See this thread for some good links to other info.
Re: DB Rollback Questions for 10.1.3.1 and 10.1.3.3 -
Jaxm - Maintaining Session State
Hi,
I have the following problem:
My client dispatches jaxm-soap-messages to a java-servlet using the reference implementation of sun (wsdp). For each time I use the same SOAP-connection object. The problem is, that the servlet opens with each inquiry a new session. How can I maintain the session ( for example setting a cookie in case of http as the protocoll)? Is there a mapping between parameter in soap-header to http-header ?
Greetings,
ZubowHi. I ran into the same situation a while back. I'll tell you how
I resolved the problem.
You have to build your own handler class. Extend the javax.xml.rpc.handler.GenericHandler class. Implementing the handleRequest(MessageContext msg) method.
1 public boolean handleRequest(MessageContext context)
2 {
3 try
4 {
5 SOAPMessageContext smc = (SOAPMessageContext)context;
6 SOAPMessage message = smc.getMessage();
7 MimeHeaders mimeHeaders = message.getMimeHeaders();
8 if(mimeHeaders.getHeader("Cookie")==null && getCookie()!=null)
9 {
10 mimeHeaders.setHeader("Cookie",getCookie());
11 }
12 }
13 catch(Exception e)
14 {
15 throw new JAXRPCException(e);
16 }
17 return true;
18 }
19 public boolean handleResponse(MessageContext context)
20 {
21 try
22 {
23 SOAPMessageContext smc = (SOAPMessageContext)context;
24 SOAPMessage message = smc.getMessage();
25 MimeHeaders mimeHeaders = message.getMimeHeaders();
26 if(mimeHeaders.getHeader("Set-Cookie")!=null && getCookie()==null)
27 {
28 String[] headerValues = mimeHeaders.getHeader("Set-Cookie");
29 String cookie = headerValues[0];
30 if(cookie.indexOf(";") >= 0)
31 {
32 cookie = cookie.substring(0,cookie.indexOf(";"));
33 }
34 setCookie(cookie);
35 }
36 }
37 catch(Exception e)
38 {
39 throw new JAXRPCException(e);
40 }
41 return true;
42 }
The overall concept is to handle the soap message before it goes back
to the server. You need to add the COOKIE header variable set to JSESSIONID=your session id
to the message header before every request goes to the server. The handleResponse looks for set-Cookie variable that comes back from the
very first request.
Hope that helps.
Mike
first request.
Maybe you are looking for
-
What are the Master data that should be uploaded for Go live
Can any one tell me what are the SD master data that should be uploaded during GO live
-
Step-by-Step guide for developing a ADF application, does it exist?
Step-by-Step guide for developing a ADF application, does it exist? Hi there, At our company we recently begun working on a project using Oracle ADF with UIX. We got the Oracle JDeveloper 10g handbook and we did a 5 day Oracle ADF course. A good way
-
Can't drag files. Help!
Hoping someone can help me. I came the other day to find that none of the files on our iMac G5 could be dragged. Stuff on the desktop couldn't be moved, re-arranged, etc. Even in iTunes, files couldn't be dragged to new playlists. I'm not sure what h
-
Program to find Custom objects
Hi everyone, As per the requirement, I need to build a program which will list down all custom objects (tables, data element, domain, function module & etc) in a given program. Could you please tell which is optimized way to write the program and whi
-
I all I manage a Cisco wireless mesh network in Portugal that basically have: 1 WLC 4404 with 4.2.207.54M software version and 50 LAP1510 (some rootAP and some meshAP). We are facing for some months a problem in the infrastructure that only affects t