Can I be notified when client closes?

Hi all,
Is there any way for a Flash client to be notified when it is
about to be terminated by the browser (e.g. because the user closes
the window)?
Thanks in advance!
Barry

Not with ARD.

Similar Messages

  • [SOLVED] Disconnecting session when client close browser's window or tab

    Hello,
    I'm looking for disconnect my database session and invalidate the session with the "onunload" af:document function. I think that is the same as the "onunload" in "body" html tag.
    I see some documentation about that, for example:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/document.html
    and I see that is enable to put an EL Expression, so I try with this:
    <f:view>
    <af:document binding="#{backing_user.document_user}" id="document_user" onunload="#{backing_user.logout}">
    <af:form binding="#{backing_user.form_user}" id="form_user"/>
    </af:document>
    </f:view>
    and not works, then I try:
    <f:view>
    <af:document binding="#{backing_user.document_user}" id="document_user" onunload="return logout_function()">
    <af:form binding="#{backing_user.form_user}" id="form_user"/>
    </af:document>
    </f:view>
    and as this, I try a lot of combinations, with no result. I take my time searching in various browsers but, surprisingly, I fount not much information about this (rare, I think is a very interesting matter).
    What is the way to be able this funcionallity?
    Thanks,
    Westh
    Edit: obviusly, logout_function() is a correct javascript function :P

    Hello,
    I resolve my problem. Now I go to describe the steps in a little tutorial.
    Remmember that this is a very basic tutorial that only allow you to do this matter, but not in deep. See bottom links for more information.
    Step's list:
    1) Download Shale framework from http://shale.apache.org/index.html#download
    2) Import all .jar libraries in your application.
    3) Open your web.xml file and add this:
    <context-param>
    <param-name>org.apache.shale.remoting.DYNAMIC_RESOURCES</param-name>
    <param-value>/dynamic/*:org.apache.shale.remoting.impl.MethodBindingProcessor</param-value>
    </context-param>
    4) Consider this:
    4.1) Managed bean --> userBean.java that have this method:
    public void logout () {
    /* Your logout code */
    and this name in faces-config.xml:
    <managed-bean>
    <managed-bean-name>userBeanId</managed-bean-name>
    <managed-bean-class>userBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    4.2) JSP Page --> home.jsp that have this code:
    A clinet listener:
    <af:clientListener method="unloadEvent" type="load"/>
    and this javascript functions:
    <f:verbatim>
    <script type="text/javascript">
    function unloadEvent () {
    window.onunload = function () {
    processUnload();
    function processUnload () {
    var httpRequest;
    if (window.XMLHttpRequest) {
    httpRequest = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
    httpRequest.overrideMimeType('text/xml');
    httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
    httpRequest.open('GET', 'dynamic/userBeanId/logout.faces', false);
    httpRequest.send('');
    function alertContents(httpRequest) {
    if (httpRequest.readyState == 4) {
    if (!httpRequest.status == 200) {
    alert('There was a problem with the request. Http code: ' + httpRequest.status);
    </script>
    </f:verbatim>
    Assuming the suffix '.faces' is mapped to the JSF servlet.
    With this, you are able to acces to logout method of userBean (using ajax) when client closes window or tab. No servlets, no 'logout.jsp' pages, etc; and the most important thing: the code never be repeat! it's funny :)
    Westh
    Resources:
    http://thepeninsulasedge.com/blog/2007/06/22/adf-faces-rc-more-on-javascript/
    http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc/af_clientListener.html
    http://shale.apache.org/shale-remoting/apidocs/org/apache/shale/remoting/package-summary.html
    http://shale.apache.org/shale-remoting/index.html

  • RMI-Server "checks" when Client closes RMI-Connection

    Hi there!
    I hope somebody can help me...
    I'm developing a client/server application where my client calls a remote method and my server starts working (i.e. 5-7 minutes batch processing).
    Is there a way my server "gets informed", when RMI connection is closed (network failure, client closes)? In this situation the server should perform a rollback, delete generated files, etc.
    I don't know if there is thrown a exception inside the server method, which I can catch ....
    Any suggestion is welcome ..
    Best Regards
    Anton

    Thanks a lot, I will have a look at the tutorial.
    Initially my thoughts on this issue were:
    -) The Client-RMI call is made in an own Thread (There are several things to do before job processing can start on the remote machine).
    -) when the RMI call is processed, the thread gets blocked, so doesn't add load to the machine (hope so).
    -) RMI does the "alive-checking", when network connection fails the client can mark the job as failed. The called server should also do some rollback. So I do not have to implements callback-listeners to react on server callbacks
    -) But I'm worried about open connections, running out of socket resources and that there is no way to abort a endless running job.
    This is my first aproach to solve this problem, I would be very glad about any comment ...

  • How can I be notified when my email is read by recipient?

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I would like to be notified when email to my landlord is read. How can I do this?
    == Firefox version
    ==
    3.5.9
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) FBSMTWB
    == Plugins installed
    ==
    *-NPRuntime Script Plug-in Library for Java(TM) Deploy
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape
    *My Web Search Plugin Stub for 32-bit Windows
    *Shockwave Flash 10.0 r45
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *DRM Netscape Network Object
    *Npdsplay dll
    *DRM Store Netscape Plugin

    What do you use to send emails? Do you use a client application, like Thunderbird, or Outlook, or do you go to a website, like Hotmail or GMail?
    This determines if you are able to request a reading confirmation of an email. Only some clients offer this functionality.
    Either way, even if you are able to use this feature, please note that the recipient gets to *choose* if they want to send you back a notification. If they don't want to let you know that they've read the email, they will click "no" and you will not receive a notification.

  • How can I get notified when someone is tracking my iphone

    I need to know how to get notified when someone is tracking my iphone?

    Have you provided your iCloud ID and password to anyone? You can also go into Settings>Privacy>Location Services>System Services>Status Bar Icon, and that will show the location services icon in the status bar if something is using location services on your device.
    However, if you have provided your iCloud ID and password to someone, or you have not acknowledged an invite to Find My Friends, then no one could be tracking you. But if you did provide that information, if someone does log into Find My iPhone, you should get an email at your iCloud ID mail address that someone has logged into Find My iPhone.

  • HT201493 Can I be notified when a friend "finds" me?

    My Husband and I have friend finder. He knew I had "found" him the other day when he was at work.
    How did he know I "found" him? How can I set it up to be notified when someone "finds" me?

    If you start Find my friends and go to "Me" under followers an outlined arrow will show if they're using a geofence on you. If you see an outlined arrow on a follower click on the follower and it will tell you for example: [email protected] will be notified next time you leave such and such address.

  • Can I get notified when someone reads a iMessage I sent on my Mac?

    I would like to get notified when someone reads what I sent to them on Messages. I am using a Mac and if there is no solution to this, I don't need it, I'm just wondering if it is possible. Thanks : D

    No what I mean is an actual notification (like when your computer notifies you about updates)... so yea. I don't think its possible though :/

  • Problem when client closes

    Here is my server side:
    import java.net.*;
    import java.io.*;
    public class server {
         private static ServerSocket serversocket = null;
         public static void main(String[] args) {
              //ServerSocket serversocket = null;
             try {
                  serversocket = new ServerSocket(11116);
             } catch (IOException e) {
                  System.out.println(e);
             while(true) {
                  ClientWorker clientworker;
                  try {
                       clientworker = new ClientWorker(serversocket.accept());
                       Thread thread = new Thread(clientworker);
                       thread.start();
                  } catch(IOException e){
                       System.out.println(e);
                       System.exit(-1);
         protected void finalize(){
              try{
                  serversocket.close();
              } catch (IOException e) {
                  System.out.println("Could not close socket");
                  System.exit(-1);
    class ClientWorker implements Runnable {
         private Socket socket;
         public ClientWorker(Socket socket) {
              this.socket = socket;
         public void run(){
              String strLine;
              BufferedReader input = null;
              PrintWriter output = null;
              try{
                   input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                   output = new PrintWriter(socket.getOutputStream(), true);
             } catch (IOException e) {
                  System.out.println(e);
             while(true){
                  try{
                       strLine = input.readLine();
                       output.println(strLine);
                       System.out.println(strLine);
                  } catch (IOException e) {
                        System.out.println(e);
                        System.exit(-1);
    and my client side
    import java.net.*;
    import java.io.*;
    public class client {
         public static void main(String[] args) {
              Socket socket = null;
              BufferedReader input = null;
              PrintWriter output = null;
              String strServer = "192.168.0.3";
              String strLine = "";
              try {
                   socket = new Socket(strServer, 11116);
                   input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                   output = new PrintWriter(socket.getOutputStream(),true);
              } catch(UnknownHostException e) {
                   System.out.println("Couldn't get I/O for the connection to: " + strServer);
              } catch(IOException e) {
                   System.out.println(e);
              BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
              if(socket!=null && input!=null && output!=null) {
                   while(!strLine.equals("quit")) {
                        try {
                             System.out.print("Output: ");
                             strLine = stdIn.readLine();
                             output.println(strLine);
                             System.out.println("Server: " + input.readLine());
                        } catch(UnknownHostException e) {
                             System.out.println("Couldn't get I/O for the connection to: " + strServer);
                        } catch(IOException e) {
                             System.out.println(e);
              try {
                   output.close();
                   input.close();
                   socket.close();
              } catch(UnknownHostException e) {
                   System.out.println("Couldn't get I/O for the connection to: " + strServer);
              } catch(IOException e) {
                   System.out.println(e);
         } //end main method
    }Seems like everytime I close my client, the server crashes which is "java.net.SocketException: Connection reset"
    A little info about the program, it's just a multi-threaded server where clients can connect to it.
    How do i fix it?
    Thanks

    Really? :)
    strLine = stdIn.readLine(); // user
    output.println(strLine); // send to serverYes, really. That 'strLine' is null if the client has closed. The OP is not checking for this condition so he is writing the null after the client has already closed, and this happens in a hard loop from which there is no escape until the exception.
    So this happens because you are reading from the client after the client has closed its socket.That would cause readLine() to return a null. It wouldn't cause an IOException.
    Message was edited by:
    ejp

  • Can someone help me when Firefox closes randomly it removes all the cookies and cache, and I am not able to restore lost tabs...?

    For a while now Firefox has randomly shut down for reasons unknown. Sometimes windows reports the error but not always. When I start Firefox back up again, it does not restore my tabs. Also as an added bonus it deletes the cookies and cache, and I don't know why. Furthermore this occurrence has become more and more frequent. Just in the last hour along before writing this complaint, Firefox crashed three times right as I switch users, but not every time I switched. I am a taboholic, addicted to tabs, sometimes 70+, and this is the final straw. This frequency became more and more prominent a few days ago. When it first crashed, Windows was kind enough to let me know of the error which first occurred one to two weeks ago. It has become the very bane of my internet surfing. Someone please help, or I will have to renounce my allegiance to Firefox and switch to the dark side that is Crome.

    <blockquote>... or I will have to renounce my allegiance to Firefox ...</blockquote>
    There is no citizenship oath involved in using Firefox, it's a piece of software.
    Look, if Firefox isn't generating any crash reports, you more than likely have an operating system or hardware issue. If Firefox is generating crash reports you can retrieve that information and post the report numbers here.
    https://support.mozilla.com/en-US/kb/Firefox+crashes#Getting_the_most_accurate_help_with_your_Firefox_crash
    Type '''about:crashes''' in the URL bar and hit Enter.
    Click the hyperlinks to bring up the Crash Report pages and copy'n'paste the URL of each of those reports into the message box here. We'll see if we can help you figure out what is causing those crashes to happen.

  • Can I be notified when my email has been received?

    I have an OS X MacBook Pro and an iPhone 4.  (If that matters.)  I have a business associate who continues to claim he has not received emails I have sent to him, although the people I have cc the same email respond to those emails.  There doesn't seem to be any pattern involved.   Is there a way for me to be notified if he receives and opens those emails? 

    Read receipt feature is not available in Apple  Mail.
    Best

  • Tables can be maintained even though Client has status 'not modifiable" ?

    I am looking, list of tables which i can maintain directly even though "Client has status 'not modifiable'" status
    example : T000
    Rgds

    No ..No...Siddesh,
    You are understanding my requirement in reverse.
    We are now not in execution of giving the access.
    i regret, if i am failing to explain my requirement
    A Auditor wants
    a). He wanted to know the users having S_TABU_DIS auth object with 02 value and assigned authroization groups.
    b). He wanted list of tables including Z tables that can be maintained directly thru maintenance view
    Auditor will do some excerse Directly Maintained Tables (vs) Authroized users
    He will come back with a list of tables for which we have to give the logs.
    I tried my best to explain my requirement.
    To summarise  - I repeat  i am looking  "List of Tables that can be maintained directly - When Client has status 'not modifiable" ?
    Thanks in advance for your time for this query.
    Rgds

  • I would like my tabs to be saved when I close (not quit) my browser on my mac.

    How can I automatically save my tabs when I close (not quit) firefox on my mac? When I close it (by pressing the red x on the top left of my browser, or by doing cmd+w, and reopen it, I don't have my tabs. There is no restore button when my browser opens. It does not automatically restore my old tabs (I've set it to that setting in my preferences "when my browser starts"). I cannot restore my old session through History either (I can by opening closed windows or tabs, I think, but the restore button doesn't work - in any case, I don't want to have to do this. I want it to be automatic). However, if I quit (emphasis) firefox then everything is restored just fine. But how can I do this when I close it!? I don't want to be able to loose all of my information by accidentally closing my browser.

    If you keep the Firefox application running and still have the menu bar showing then only Recently Closed Windows/Tabs can bring back tabs from your current session (you didn't end close the session yet).
    You would need a session manager extension to handle such a situation.
    *Session Manager: https://addons.mozilla.org/firefox/addon/session-manager/

  • Can I make Skype quit automatically when I close i...

    I'm sick of having to close it on the task bar and then confirm I don't want it running any more.
    I've already confirmed I wanted to log out and close the program, why is it still running?
    I cannot find an option to quit from the menu whilst running, but I imaging it's buried somewhere.
    Could somebldy tell me how to either 'quit' automatically when I close the program, or if there is an option to close and quit while it's open?
    Failing that could I find out why it's do ******* important that it stays running in the backlground after I close it the first time?
    Solved!
    Go to Solution.

    This screenshot (http://community.skype.com/t5/Windows-desktop-client/Can-I-make-Skype-quit-automatically-when-I-clos... is from the currently latest Skype 6.7.0.102 version, but exactly the same window is shown with any previous version too.
    If you sign out of Skype before quitting, then the “Do not ask me again” option will not be shown. You don’t need to sign out before quitting!!!!

  • Sometimes I can't get out of Day view in iCal.  There is no where on the screen to select month view, even when I close it out and go back into iCal.

    Sometimes I am locked in "day" view in iCal.  There is no where on the screen to choose "month" view, even when I close it out and open again.  Tapping anywhere on the screen or scrolling doesn't help.

    Give this a try:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try full screen again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • How do i run an external monitor with my macbook and change settings so that when i close the lid the signal to the monitor is not lost and i can continue using the mac with a mouse and a wireless keyboard?

    How do i run an external monitor with my macbook and change settings so that when i close the lid the signal to the monitor is not lost and i can continue using the mac with a mouse and a wireless keyboard?

    No, nothing will prevent the computer from going to sleep when you close its display except third-party hacks that are designed to do exactly that. I strongly advise against using any of those, as they may interfere with successful entry into clamshell mode (and they carry other downside risks as well). Just wait until the computer is asleep (with its sleep light pulsing), then press any key on the keyboard. It sounds as though your setup is working as it's designed to do.

Maybe you are looking for

  • Intel WiDi Istallation

    I wanna connect my Laptop to my smart panasonic TV through wireless , for this laptop need to download Intel WiDi software but when i download it error is come that " intel wifi adaptor exist' how i can proceed for wireless connection to TV

  • Design in Pages, E-mail Design?

    I am trying to figure out how to e-mail something I have designed in Pages as an E-mail. In other words I don't want it to be an attachment that someone has to click on I want it to be something that someone views when they open the e-mail. I also wa

  • BAPI to change a BOM

    Hi friends,          Can anybody let me to know how to change a bom component in a existing BOM with the use of BAPI. Say for example i am having a bom structure for A. I want to change a line item named A1 which is a component without having the who

  • Output sound when "docked"

    Using a iPod Touch 1st gen. My Output sound is not coming out of both sides (tried w/ car stereo and home theater) when I use the "dock" type plug. Both sides of headphones work fine. Anyone else experienced this? In car, I get a loud hiss & pop soun

  • Sample CC&B COBOL programs for meter read and Payments upload

    Hello, I am new to CC&B and i am a COBOL developer, i am looking for some Meter read upload , payments upload from flat files custom programs written in COBOL for references. Please share these sample programs if you have with you. Thanks, Pavan Kuma