Session keep alive && calling a class

I have a JSP that will stay in a user's window and I want to know how to keep the session alive until they close the window, also since I am doing this I need to check a class for a method's state. What I mean by that is the Object calls on a ValueObject which gets info updated periodically, so I need to know how to set a timer coupled with the session to renew and check a class. Does anyone have a direction they can point me in this one.
Thanks in advance

keep reloading the page? META refresh tag or Javascript setTimeout() and document.location
There's not really any guaranteed way to know that a window is closed, of course. There are tricks which probably work most of the time. Refreshing the page within the session timeout time is probably the easiest.

Similar Messages

  • Session Keep Alive

    I have seen that my user sessions for a room will expire if there is no activity for some period of time. After that time it looks as if the authentication token for that user cannot be used again.
    Is this expected behavior? If so, after what period of inactivity does the session become invalid?
    Ideally I would like to keep the user session alive for a controlled period as long as they stay in the room(browser is not closed). Is there a recommended "keep alive" call I can make from clients to keep sessions alive?
    Thanks,
    Barry

    I ran another test and it does seem like an auth token becomes invalid in some circumstances after a period of inactivity. I still can't pin down exactly why, but the main reason for the problem I was seeing was because I had another process that deleted the room in the background.
    If I see a pattern for how auth tokens become invalid I'll post back, but it works well enough now for my purposes.
    Jamie,
    Yes, the tokens are created using the server api.
    Thanks,
    Barry

  • PuTTy Session Keep Alive

    BASHyum install tmux
    You're welcome.

    Typically I'm dealing with multiple PuTTy SSH sessions to CentOS boxes and if I get lost somewhere in browsing the net for info it drops the session after some time and I have to restart it.
    Is there a way to keep the sessions alive instead of hitting enter every now and then?
    This topic first appeared in the Spiceworks Community

  • Session keep Alive when EBS is integrated with OIF acting as SP

    We have an E-Business Suite R12(12.1.3) Application which is integrated with Oracle Access Manager 11.1.1.5. For authentication the Oracle Access Manager delegates the authentication request to Oracle Identity Federation acting as a Service Provider (SP). There is a home-grown SSO which acts as the Identity provider by Federating it with OIF using SAML 2.0 protocol.
    The integration is successful and EBS is able to authenticate using this third party SSO.
    Now there are multiple applications which are integrated with this third party SSO and the user can access any of these applications including EBS.
    Considering a scenario where a user is using EBS Application say for more than 30 mins. Now when he tries to login to another application the challenge screen is thrown though he can continue to work on EBS without any issue. The reason being that the session timeout on the IDP side is set to 30 mins.
    To overcome this issue the solution that has been thought of using a javascript for each page load on the application which will update the SSO token with the latest UTC time on the IDP server. This has been successfully done for all other applications except EBS.
    So my question is how we can call this java script for each page load for EBS?
    Thanks & Regards
    Sarbashis

    It appears that OAM is removing the url parameters for the p_done_url sent to it by OIF.
         302 Redirect to -> Location: https://sso.mycompany.com/oam/server/logout?p_done_url=https%3A%2F%2Fsso.mycompany.com%2Ffed%2Fuser%2Fsloosso%3Fid%3Dosso%26type%3D3&invokeOSFSLogout=false
         Result: 200. Set-Cookie OAM-ID to expired.
    Form Submits: https://sso.mycompany.com/fed/user/sloosso
    Result: 500 Error
    Notice the p_done_url value in the redirect has extra parameters which when the Form is submitted are lost.
    If I manually enter the url: https://sso.mycompany.com/fed/user/sloosso?id=osso&type=3&invokeOSFSLogout=false
    Then I am successfully logged out.
    This seems almost like a bug in OAM...

  • Keep alive a session between 2 BAPI calls

    Hi -
    I am calling several BAPIs to maintain data. I am calling from an outside system as I published the BAPIs as Web Services.
    I would like that the session between 2 BAPI calls is kept, so I don't miss some session info between call #1 and call #2.
    Anyone knows a way of keeping alive a session between 2 BAPI calls?
    Thanks !

    Try this..
    <b>ARFC with Resource Management (Parallel Remote Function Call)</b>
    CALL FUNCTION 'MYFUNC'
    STARTING NEW TASK 'T1'
    DESTINATION IN GROUP 'PRFC'
    EXPORTING ...
    TABLES ...
    EXCEPTIONS ...
    communication_failure = 100
    system_failure = 101
    resource_failure = 200.
    IF sy-subrc= 102.
    wait and retry...
    ENDIF.
    <b>Define ‘PRFC’via RZ12</b>
    Amandeep

  • How to keep alive a session in Web Services?

    I have to do my project, that will be including some following features:
    1. Login to Application through Web Services method. For example:
    http://mydomain.com/web-services/Login?WSDL
    2. After logging in, use mySms method to send message to Cellphone through Web Services! For example:
    http://mydomain.com/web-services/mySms?WSDL
    My questions are:
    1. How can I keep alive the session after logging in the application in Web Services? In Web, I can use "Session".
    2. If someone has not logged in the Application, he/she could not use mySms method for sending Sms. How can I do that?
    3. I know, when I invoke a Web Services, one JavaBean has been called, and this bean is persistence with his own states. It means, if I set value to parameters of this bean, these values are persistence for invoked methods by other persons.
    For example:
    mySms bean has a private field "jid" inited with NULL value.
    Person A invoked mySms.
    Then, A set jid of mySms to value "A".
    Person B invoked mySms. B got jid value. He receive the result value is "A".
    The question is, how can I set mySms bean so that mySms bean is not persistence?
    Thanks many!

    Hi,
    I can right away answer your FIRST Question.
    Since WebServices are PURELY Based on SOAP which is in tern based on HTTP, they rely on a Stateless protocol.
    I am sure you know that the HTTP is the STATELESS Protocol and so you can not maintain Session and so EACH Http REQUEST is considered as a SEPERATE REQUEST.
    Now, still you want to maintain the Session in WebServices,
    The simple answer is PASSING PARAMETERS.
    Just Maintain your Session on Client (If you are using JSPs or Servlets to CAll WEBSERVICES then maintain Session through your HTTPSession) and each time you Invoke WebService PASS ON REQUIRED Parameters.
    This Approach is Exactly like your URL REWriting OR your Parameters Passing through QUERY STRINGS.
    I hope you got what I am saying!
    Take care,
    Himanshu/

  • Keep alive a session in CRM

    Dear CRM folks -
    I am calling CRM using BAPIs. The BAPIs are published as Web Services.
    I would like that the session between 2 BAPI calls is maintained in an optimized way so I don't make specific calls to the DB to store my session info.
    Anyone knows a way of keeping alive a session in the CRM between 2 BAPI calls?
    Thanks !

    BAPIs are just basically function modules.  Two function modules which are in the same function group are able to share information while the session is open.
    If your two BAPIs are not in the same function group(you didn't mention the names or I could have checked) then you can create a wrapper function module which has it's own variables to store the information.  Unfortunately once the RFC session/ICM Web Session is closed then you'll lose that in-memory information.
    I assume that you're making the two BAPI calls at different times which is why you're having this problem.  Like one to get user information and then one more to get some other detailed info once the user inputs something.
    Without knowing much about what you are really trying to do, my quick idea is to create a Stateful BSP in CRM which accepts all your requests.  The BSP can simply call the BAPIs(eliminate the need for the web service - unless you have some reason you need it) and then between the first and second BAPI call, the BSP will keep the state of the BAPI results in-memory.
    If you give more info, might be easier to answer your question.

  • HFM Web Sever Configuration--Keep Alive and Session Time Out Optimal Config

    We recently implemented an HFM 9.3.1 environment. We are using Windows 2003 Enterprise SP2 servers with IIS6. We have two HFM Web servers connecting to an application cluster with two application servers in the cluster. We were getting some errors when trying to unlock HFM cells in Workspace, but we were able to perform the functions fine on the application using the WIN32 client.
    I opened a ticket with support and they recommended modifying the subcontext.properties file located in %HYPERION_HOME%\deployments\WebLogic9\servers\Workspace\webapps\workspace\conf. They recommended changing the following settings:
    #KeepAliveInterval=30
    #SessionTimeout=60
    From what I understand, these settings are for the communication between the HFM Web Servers and the application cluster servers. I'm wondering how changing these settings may affect our environment. Are there negative effects and/or trade-offs for changing these settings? Is there a recommended threshold or maximum value?

    Hi Dinesh,
    This cannot be achieved without development enhancements to some standard SAP framework component, to introduce a "keep-alive" concept. If you are using a CMS for CTI or email integration, you need to ensure it supports keeping the communications session alive also.
    Sincerely,
    Glenn
    Glenn Abel
    Covington Creative
    www.covingtoncreative.com

  • Weblogic proxy plugin closes keep-alive connections to clients randomly

    In short we have following arhitecture:
    clients ---> wl proxy plugin 1 ----> weblogic 1
    clients ---> wl proxy plugin 2 ----> weblogic 2
    Beacuse of the application/installation specific requirements, we are not using failover, one wl proxy always forwards requests to one weblogic (simple configuration).
    Application is TR-069 protocol based (SOAP over HTTP) so it very much relays on persistence TCP connections (Connection: keep-alive). This TCP persistence has to work correctly in order that TR-069 messages are exchanged in required order, otherwise we have a error on application layer.
    Here and there we've noticed applications errors which suggest that we have some problems in TCP connection between the client and the weblogic server. After sniffing, we've noticed that weblogic proxy plugin (Apache) randomly, or because of some other reason we do not know, decides to close TCP connection to client, even app on weblogic did not request so ???
    As a result, client opens new connection to the server with new TR-069 session and it gets bounced beacuse it allready has one open on weblogic server.
    We've sniffed, traced everything we could, we were searching for patterns in time, etc... but we can not find the reason why proxy plugin decides to close the connection to the client (not to the weblogic server).
    Trace (replaced sensitive information):
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: StatusLine set to [200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> parsed all headers OK
    Thu Apr 29 15:05:50 2010 <958012725463463784> sendResponse() : r->status = '200'
    Thu Apr 29 15:05:50 2010 <958012725463463784> canRecycle: conn=1 status=200 isKA=1 clen=545 isCTE=0
    Thu Apr 29 15:05:50 2010 <958012725463463784> closeConn: pooling for '$IP$/$PORT$'
    Thu Apr 29 15:05:50 2010 <958012725463463784> request [$URL$] processed successfully..................
    !!!! Now it closes the TCP connection and inserts "Connection: close" HTTP header !!!
    WL proxy plugin conf params are:
    WebLogicCluster $IP$:$PORT$
    DynamicServerList OFF
    KeepAliveTimeout 90
    MaxKeepAliveRequests 0
    KeepAliveSecs 55
    Apache worker configuration is:
    <IfModule mpm_worker_module>
    PidFile var/run/httpd-worker.pid
    LockFile var/run/accept-worker.lock
    StartServers 2
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadLimit 200
    ThreadsPerChild 200
    MaxClients 2000
    MaxRequestsPerChild 0
    AcceptMutex pthread
    </IfModule>
    Why weblogic proxy plugin ignores Keep-alive directive and decides to close connection to the client by itself?
    Any help?

    If a WebLogic Server instance listed in either the WebLogicCluster parameter or a dynamic cluster list returned from WebLogic Server fails, the failed server is marked as "bad" and the plug-in attempts to connect to the next server in the list.
    MaxSkipTime sets the amount of time after which the plug-in will retry the server marked as "bad." The plug-in attempts to connect to a new server in the list each time a unique request is received (that is, a request without a cookie).
    Note: The MaxSkips parameter has been deprecated as the MaxSkipTime parameter.
    See also here: http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs81/plugins/plugin_params.html
    You said the problem arises under significant load. Maybe, it is wise to tune the number file descriptor's on your operating system. HTTP connections are nothing more than TCP sockets on the operating system. All modern operating systems treat sockets as a specialized form of file access and use data structures called file descriptors to track open sockets and files for an operating system process. To control resource usage for processes on the machine, the operating system restricts the number of open file descriptors per process. You should be aware that all TCP connections that have been gracefully closed by an application will go into what is known as the TIME_WAIT state before being discarded by the operating system.
    On most unix systems you can use netstat -a | grep TIME_WAIT | wc -l to detemine the number of socket in time_wait state. You have to check with your system adminstrator how to tune the tcp_time_wait_interval. On solaris you can use: /usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000

  • SQL Developer Keep-Alive Extension Created!

    Hi All,
    I have created a keep-alive extension for SQL Developer as I have always wanted to prevent my connections from timing out. Hope this will become handy to some of you. The download file and instructions are hosted on Google Sites.
    https://sites.google.com/site/keepaliveext/
    Cheers,
    MinChen

    Hi Everyone,
    Lately I have been getting questions on whether the extension is secure enough to be used as more often than not, a database would definitely contain confidential or sensitive information hence it is absolutely crucial that security is maintained and running external extensions does not seem reassuring. Here, I would like to write a bit on how to ensure that security is maintained when running third party extensions for SQL Developer.
    The most secure approach is to scrutinize the source code of the extensions themselves if it is made available at all. If no source code is available, then it would take a different approach which is far more complex and won't to be covered here. Fortunately, extensions for SQL Developer are developed using Java and the beauty of it is that one could easily decompile the classes back into the source code. From there onwards, scrutinize the code thoroughly to ensure there is no rogue logic or any function that would "phone home" for whatever reason other than to check for updates. By practicing self code scrutiny, it would be the most reassuring. As I myself am every bit concerned about security, I do tend to extract out the source code of all the Firefox extensions I use and do a quick glance. ;)
    With this, I hope more people will embrace the extensibility of SQL Developer and create more extensions for the community. SQL Developer is a great application and thanks to the team who created it and made it available at zero charge. :D
    Cheers,
    Min Chen
    P.S. You can decompile Java classes using the free tool called JD-Gui which can be found at
    [http://java.decompiler.free.fr/?q=jdgui]

  • Need help with HTTP keep-alive

    Hi folks!
    I have this very simple web server and I would like to add keep-alive support. I've been trying to get my head around it for a while and could need some help (I found this question in the archive, but those replies didn't help)...
    This is my starting point (stripped down to the basics):
    /* A listener thread that accept incoming requests by creating new request handlers */
    public class HTTPListener implements Runnable
        private ServerSocket serverSocket;
        public HTTPListener(int port)
            // Try to create a server socket on specified port
            try
                serverSocket = new ServerSocket(port, 0);
            catch (IOException ex)
                System.err.println("Oops!");
        public void run()
            while (!Thread.interrupted())
                try
                    // Listen on server socket until a request arrives
                    Socket s = serverSocket.accept();
                    // Create handler to service request
                    RequestHandler h = new RequestHandler(s);
                    new Thread(h).start();
                // Server socket closed when listening
                catch (SocketException ex)
                    Thread.currentThread().interrupt();
                // Failed to close socket or failure during server socket accept
                catch (IOException ex)
                    System.err.println("Failed to accept request");
            try
                serverSocket.close();
            catch (IOException ex)
                System.err.println("Hmpf...");
    /* Handler that prints out requests and always answers with status 200 */
    public class RequestHandler implements Runnable
        private Socket socket;
        public RequestHandler(Socket s)
            socket = s;
        public void run()
            System.out.println(">>> New request handler");
            try
                BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                String str;
                while ((str = reader.readLine()) != null)
                    System.out.println(str);
                sendDummyReplyWithKeepAlive();
                reader.close();
                socket.close();
            catch (IOException ex)
                System.err.println("Crap, got an exception!");
    }When I run the server (which in reality has a little more to it) I never get more than one request printed for each ">>> New request handler", which is not surprising!
    Now, with keep-alive support I expect to get consecutive requests from the same client printed by the same handler instance. What I have to do (as I've understood from my readings) is to modify the while loop in the request handler that reads from the socket so that it spins until the connection is closed by the client (or a keep-alive timeout occurs) and blocks while there is nothing to read.
    Perhaps I'm being stupid now, but how do I actually do this?

    ejp wrote:
    and also an incorrect implementation of the timeout period. This code will still wait forever if no data arrives.You're right... actually I didn't mean to put that while loop there! What I meant was simply
    if (!reader.ready())
        wait(keepAliveTimeout);
    if (!reader.ready())
        break mainLoop;
    // If we get here there is a new request to read...and I agree that it's ugly, that's why I'm asking you guys for help!
    setSoTimeout() is of course a way to go... didn't think of that although I have kind of already added it to my code but with a different timeout. Thanks!
    Last question then is:
    does reader.readLine() block like reader.read(), or do I have to use the latter?
    I would test for myself I could, but at the moment I can't...

  • How to call java classes from javascript?

    i have a button which calls javascript i need to access a class to update the values in the database.. how do you call the java code from within the javascript?
    the class is stored under tomcats classes directory and is accessed:
    com.Database.Employee
    the method is called : UpdateEmployeeDetails
    the button
    <input type="button" value="Save" onclick="submitForm('save')" />the javascript
    <script language="javascript">
            function submitForm(process){    
                document.myForm.action="update.jsp";
                document.myForm.submit();
    </script>

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • Keep alive script for HTTPS service with GET method

    Hello,
    I tried to implement a keep alive to services that support HTPS connections. I’ve created a script that opens a tcp connection on port 443 and tries to do a GET of a test web page. This web page only displays “OK”.
    In a resumed form I used the following script commands:
    Socket connect host 192.168.136.134 port 443 tcp
    Socket send ${SOCKET} “GET /teste.template\n\n”
    Socket waitfor ${SOCKET}” 200 “ 2000
    Socket disconnect ${SOCKET} graceful
    I was unable to receive the expected “ 200 “response and received a message saying string not found, I used the socket inspect command to inspect the socket’s internal data buffer and the result was nothing, it seemed empty.
    I tried the same operation using a linux machine that has IP connectivity with the Webservers and I was successful.
    In the same CSS I have services configured to respond to HTTP sessions. I tried the following script and everything went well
    Socket connect host 192.168.136.151 port 80 tcp
    Socket send ${SOCKET} “HEAD /index.html\n\n”
    Socket waitfor ${SOCKET}” 200 “ 2000
    Socket disconnect ${SOCKET} graceful
    When I issued the socket inspect command I could in fact see the socket’s internal data buffer content.
    The CSS is running WebNS 5.0 build 66
    Can someone give me a help?
    Thanks,
    Ricardo Lourenço

    Hello,
    There is no direct no direct link between TCP and SSL.
    So, in spite of having success with the TCP port 443 connection the CSS will not be able to negotiate de security parameters necessary to establish the SSL session.
    This was the reason for not having success through the use of the socket commands, as i refered in my original message.
    Thanks for your collaboration,
    Ricardo Lourenço

  • Question about Keep Alive feature in Forte 3.

    Does anyone use Keep Alive feature under Forte 3.0F.2 environment.
    I got trouble and encounters the following problem in the service objects
    daily:
    INFORMATION: An abnormal disconnect from partition
    (CFFE2500-85B0-11D1-B37F-E2F7F3F1AA77:0xec254) was received. Since there
    are
    no method invocations outstanding to this partition, no notification could
    be
    given of this disconnect (by indicating a method invocation failed).
    Therefore, the information associated with this disconnect is being
    reported
    to the log.
    Class: qqsp_DistAccessException
    Error #: [601, 119]
    INFORMATION: The connection to the partner was terminated by the
    Communication Manager for the reasons below.
    Class: qqsp_DistAccessException
    Detected at: qqdo_PartitionMgr::StopLocation at 1
    Error Time: Fri Nov 26 17:45:39
    SYSTEM ERROR: Failed to establish connection: OS Error 61: Connection
    refused
    Class: qqsp_DistAccessException
    Detected at: qqcm_HoseFSM::SetError at 5
    Error Time: Fri Nov 26 17:45:39
    SYSTEM ERROR: hose 15 STATE_CONNECTING (EXT_RECEIVED) from
    qqcm_HoseFSM::IssueConnect (after EstablishConnection)
    Class: qqsp_ErrorDescriptor
    Detected at: qqcm_HoseFSM::SetError at 1
    Error Time: Fri Nov 26 17:45:39
    It seems that Keep Alive sometimes disconnects the connection between the
    service objects and the environmental manager.
    So that any further connection request from the client encounters the
    abnormal exception.
    Forte seems not to recommend to use this feature in the Forte Relase note
    3.0J1.
    She states that "Sites that chooses to test KeepAlives should report all
    problems to Technical Support ( and let
    Technical Support know that you have enabled this capability)"
    Should I disable Keep Alive feature under Forte 3.0F2 environment?
    Rgds
    Tom

    Hey Marco,
    I can`t find a view that is named like "APEX_APPLICATION_PAGE_IR%". Is it not available on the evaluation instance.
    I don`t want to use the build-in CSV download, becaus I want to export thousands of data sets. I got this already to work with APEX 3.0 and I get the sql from the application views. The procedure which creates the file runs a few hours and after that it is inserted into a table from which the user can download the file. In the procedure there happens a few other things, which are very import, so I have to create my custom solution.
    And for that I thought it would be very very very cool if I can get the sql behind the interactive report with the filters ant those things.
    Don`t you think that would be possible? I guess the APEX create a SQL although, or am I wrong?
    Thank you,
    Tim

  • Passing telnet session between LabVIEW calls from TestStand

    From TestStand I am calling VI's from telnet.llb.
    In one TestStand step  am opening a telnet session to an IP address and collecting the telnet connection (U32). In the next TestStand step I pass the telnet connection  to a telnet write VI but get this error.
     "Dequeue Element in Acquire Semaphore.vi:1->Telnet Write.vi:1->Telnet Write.vi.ProxyCaller"
    The telnet open, write, read, and close work great if I pass the telnet session number within the same VI. But I need to keep the session open between calls from TestStand because one huge VI is not feasible.
    thank you
    josh
    Solved!
    Go to Solution.

    Hi,
    Maybe the following link can help
    http://forums.ni.com/t5/NI-TestStand/Can-a-Telnet-session-be-passed-from-1-vi-to-the-next-in-test/m-...
    Regards
    Ray Farmer

Maybe you are looking for

  • Please help me for Parameters of the reports in client server mode

    Dear reader, I have a problem, suppose there is a hierarchy of listings in reports e.g. countries, states, provinces, districts. in the parameter if i want to list the districts of the selected provinces, provinces of the selected states, states of t

  • Kernel Panics at Startup

    I've got a MDD Dual 1.25Ghz (a Giga Design Upgrade) I used to have Kernel Panics every so often but recently once a month (just before Xmas) it got worse, I repaired the permissions and now I get either, (most regular at top): 1. A KP at the Grey scr

  • I can't open a video sent to my Ipad from an iphone

    I had a video emailed to me from an iPhone but I can't view it. I can see it on my Acer laptop but not my Ipad.

  • Laptop mode tools disables bluetooth.

    I have a weird issue with laptop mode tools, when i boot up on battery bluetooth is disabled until i plug in a power supply. After its enabled i can unplug it and bluetooth will work. Bluetooth control is disabled in bluetooth.conf. I tried switching

  • How to write sync service in sybase unwired platform

    Hi How to write sync service in sybase unwired platform? Thanks in advance....