How to check when DB is Restarted

Hi all,
I have a small problem. I am doing database transactions using a class which will run continuously in the background of my main application(From which I am calling the functions of former class and do DB operations). In the data base class constructor itself I am forming Connection to the database and using the same connection to do all db operations. In this synario, I have an issue. That is if after creating the connection, the database crashes and immediately resumes to normal state., my DB class has no way to know this and after this, if any DB operation is occured. I can't use the same connection object(It is throwing Disconnect exception). Can anybody suggest me a way so that I can know when the DB is restarted or is there any other possible means to avoid this problem. Please help me .

Hi ,
Thanks for your sugession. I have another doubt .If I am using Connection pooling (using commons Dbcp)and the data base is restarted, can I use the connections from the same pool(Or will it throw the exception). In such case am I need to recreate the pool?. I am new to JDBC and hence I don't have much idea abt connection pooling.
Note: I am not using any web server in my application. mine is a stand alone application.
Thanks and Regards,
vignesh

Similar Messages

  • How to Check when the user is connected to different desktop.

    How to Check when the user is connected to different desktop.Sometimes the user maynot see the theme in the personalize theme list. In that case the person must be using different kind of desktop.How to check, I need a path.And how to apply the theme to that user?
    Thanks,
    Paturi

    Hi,
    you can create the new portal desktop from
    System Administration => Portal display => Desktop and Display Themes
    Select your folder from Portal Content and from its context create new Desktop.
    Add The Framework page and the theme to this desktop page.
    Go to your folder from Portal Content and from the context of the framework page select add framework page to portal desktop.
    Adding Theme to desktop
    From Portal content select Theme folder and select the theme right click it and select Add theme to Portal Desktop.
    Create rule for the Desktop.
    Navigate to System Administration => Portal Display => Desktop and Display Themes Portal Content => Portal Administrators => Super Administrators =>main_rules.
    Click Add IF Expression.
    create the expression if user = xyz then click on apply
    Select the then clause of the if and navigate to your folder where Desktop is created ,Add it and Click Apply.
    Save the Changes to the rule.
    Hope it helps you.
    (reward points if its helpful)
    Thanks,
    Gunjan

  • URGENT- how to check when application was unistalled

    How do you check WHEN an application was unistalled?
    this is very urgent
    Thank you

    Hi and Welcome to the Community!
    Refer:
    KB29215 How to view event logs on a BlackBerry smartphone
    I'm not at all sure if those logs show what you need, or if it would have required that more verbose logging be enabled prior to the app removal. But, you can look to see.
    If the device is on BES, then it's possible that the BES Admin can dig deeper...but you'd need to ask them about that.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to check, when the Maintenance Order was deleted

    Hello Experts,
                          Can you please tell me of how to check for the maintenance order that when it was deleted and who has deleted that.
    If any T-Code is there or at the Table level also to check the requirement.
    Regards,
    Yawar Khan

    If you want to track when you have put deletion flag, you can track it using above mentioned techniques.
    If you archived (deleted) permanently, then using archival history only, you can check I guess.
    Check these links. While deleting maintenance order, we can hisorical order with same number. Using that creation date, you can track.
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e6552462a11d189000000e8323d3a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/3e4d2f462a11d189000000e8323d3a/frameset.htm

  • How to check when and who uses my account?

    I need to check if someone used my account in some particular days and hours. is it possible and how. thank you

    Nikoline wrote:
    How to see when and who made changes in some table?
    Some makes me problems and I want to see who are the usernames.
    ThanksEither you need to implement Oracle Audit, or use Logminer Utility to read archived redo log files

  • How to check when admin or some other account has been logging in to the server

    Hi
    How can I check when admin or some other particular account has logged in to the server? So that I can check login times for users.

    Hi,
    You can try to edit the XML file to filter events by logon types.
    In addition, explicit credentials mean that we input our user name and password in front of a computer through keyboard (or other more advanced means). After that, Windows system will pack our credentials as tickets for further
    purposes like access network resources, tickets are implicit credentials.
    More information for you:
    Advanced XML filtering in the Windows Event Viewer
    http://blogs.technet.com/b/askds/archive/2011/09/26/advanced-xml-filtering-in-the-windows-event-viewer.aspx
    Best Regards,
    Amy

  • How to check when system started? Need ASAP!!

    HI,
    Guys is there a way that I can tell that when the system started and stopped at certain time? If there is, how can i check?
    Please let me know ASAP.
    Thanks,
    I will post points for sure!!

    Afi,
    Check dev_disp.old in work directory .. Towards the end you can something like  change server state from ACTIVE to SHUTDOWN .. You will get some idea from that.  Check dev_disp to see when the server is started
    Thanks
    Prince Jose

  • How to check when MPD changes track?

    I want to log every time when MPD changes song, but I can't find out how. Anyone got any ideas?

    koper wrote:
    here is the code in C that prints out name of the song when mpd changes it.
    #include <unistd.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <libmpd.h>
    #include <debug_printf.h>
    #define RED "\x1b[31;01m"
    #define DARKRED "\x1b[31;06m"
    #define RESET "\x1b[0m"
    #define GREEN "\x1b[32;06m"
    #define YELLOW "\x1b[33;06m"
    void status_changed(MpdObj *mi, ChangedStatusType what)
    if(what&MPD_CST_SONGID)
    mpd_Song *song = mpd_playlist_get_current_song(mi);
    if(song)
    printf(GREEN"Song:"RESET" %s - %s\n", song->artist, song->title);
    int main()
    int run = 1, iport = 6600;
    char *hostname = getenv("MPD_HOST");
    char *port = getenv("MPD_PORT");
    char *password = getenv("MPD_PASSWORD");
    MpdObj *obj = NULL;
    if(!hostname) {
    hostname = "localhost";
    if(port){
    iport = atoi(port);
    obj = mpd_new(hostname, iport,password);
    mpd_signal_connect_status_changed(obj,(StatusChangedCallback)status_changed, NULL);
    mpd_set_connection_timeout(obj, 10);
    if(!mpd_connect(obj))
    mpd_send_password(obj);
    do{
    mpd_status_update(obj);
    }while(!usleep(100000) && run);
    return 1;
    to compile it:
    gcc source_code -o output_file -lmpd -I/usr/include/libmpd-1.0/libmpd/
    the code it's actually a modified example from libmpd site:
    https://svn.musicpd.org/MOVED/libmpd/tr … testcase.c
    So this wakes up every 0.1 seconds....?  there goes your battery life...

  • How to Check if Timeout occured

    Hi all,
    I have a small Doubt in Query timeout. I am using setQueryTimeout() of statement object to set the query time out.I am setting query time out to 15 seconds. My requirement is if the query time out occurs, Then I have to again give the same query. But what's my problem is I don't know how to check when query timeout occurs.Its given that a SQLException will be thrown when timeout occurs, but how can I know if the SQLException is due to timeout or due to some other reason. Please give me some sugessions.
    Thanks & Regards,
    Vignesh

    Try and retrieve a service from it. 
    Sincerely,
    Ted Ueda

  • How to check the PR release Strategy change date?

    hi,
    how to check when the PR Release Strategy chagned by someone ...?
    Regs,
    S J Solanki

    Hi
    You can directly go into the Purcahse order & check for the Heder changes which will give the Changed Date
    If you need to use two table to find out the date when the Strategy was changed.
    Use Table CDHDR & CDPOS. Object key is the POurcahse order number
    Thanks & regards
    Kishore

  • How can I make my computer restart with all the same windows that were open when a shut it down?

    How can I make my computer restart with all the same windows that were open when a shut it down?

    That is the way Mac OS X 10.8 (aka Mountain Lion) works by default. Are you actually running that system? (See About This Mac in the Apple menu.) If so, make sure the check box in the shut down alert is checked:

  • Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac

    Every time I restart my mac air some applications like calendar and Microsoft word automatically starts, how can I stop such applications from starting when ever I restart my mac?

    One thing to check:  when shutting down or restarting, there is a checkbox in the shutdown/restart dialog which asks whether you want currently open applications to open at startup.
    charlie

  • How can I check when my Apple Care runs out and how old my macbook is?

    Thinking of selling my macbook and going for a macbook pro but I need to find out some more details about it first!
    so, How can I check when my Apple Care runs out and how old my macbook is?

    Enter your serial number here https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • Error code -42408. I downloaded a newer version of iTunes, 10.7. Now it will not let me purchase anything. How do I fix? I have edited and revised all my names and account settings, checked payment. Quit, restarted. Help

    I downloaded a newer version of iTunes, 10.7. Now it will not let me purchase anything. I get an error code -42408. What does this mean and how do I fix? I have edited and revised all my names and account settings, checked payment. Quit, restarted. Help please, I'm going crazy without my iTunes. I'm on a MacBook Pro.

    Found this item it may help
    OK, I have fixed it here. Here's what I did:
    quit iTunes
    trashed ~/Library/Preferences/com.apple.iTunes.plist
    started iTunes, and authorised my account
    Worked straight away after that !

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

Maybe you are looking for

  • Query Help-2

    Query Help: http://forum.java.sun.com/thread.jsp?forum=45&thread=471180&tstart=15&trange=15 It seems I have confused enough people with my improper presentation of query. Sorry guys. I will restate my question with different table names. The above wa

  • External Service as Callable Object

    Hii Frens,               I have created an external service as a callable object.It executes a BAPI but when i test the service it doesnt give the output. A username is the input for the BAPI and output is a structure.But am not getting the output in

  • Problem rasterizing PDFs

    I put multiple pdfs onto the photoshop CS5 application icon to rasterize them, i get the first window to ask me the dimensions, resolution etc, them the first pdf opens and then photoshop stops. Until i type «ESC» or OPEN NEW DOCUMENT and then CANCEL

  • Validation Widget onSubmit

    I would like to use the validation widgets when submitting data via Spry.Utils.loadURL. The validations work automatically when the form is submitted, but I want to call the Spry.Utils.loadURL in a function in an onSubmit function. Is there a way to

  • The colors on my phone changed to look like negatives and I don't know how to get the orginal colors back, Help.

    Is anybody on here? The colors on my iphone changed so everything looks like a negative, how cdan i change it back?