When does a Connection realise the server is down?

Hi there,
I'm developing an application using (all on Win 2k Pro SP3):
- Tomcat 4.1.18
- MS SQL Server 7.1
- jTDS 0.5.1 Type 4 driver
If the application is running (i.e. within Tomcat) and the database server is stopped externally (e.g. from the Enterprise Manager) I get the following scenario:
1]
(connection == null); // still returns false
2]
(connection.isClosed()); // still returns false
3]
SQLWarning s = connection.getWarnings();
server application stops and waits at this call, a further request from the client will restart the process - i.e. the server doesn't hang.
An error isn't thrown until an attempt is made to create a ResultSet from a Statement made using this Connection (either a new or pre-exisiting Statement).
How can I check if this Connection is still usable, apart from closing and re-opening it with every call / creating a fake ResultSet for the purposes of poling the database server - which both totally defeat the purpose of having a Connection object.
Has anyone encountered this behaviour before? - perhaps it's driver specific? (jTDS 0.5.1)
Many thanks,
Fergus.

(connection == null); // still returns falseNot surprising since there is no situation
(unless you simply forgot to call getConnection)where
there will ever return true.Well, if you executed the line of code
connection = null;
that would return true. But in a normal
program, no.You mean if you purposely forgot to call getConnection() rather than accidently as I suggested? Yeah that would do it too. :)

Similar Messages

  • For the ipad 2, what do you do when it says connection to the server failed?

    For the ipad 2, what do you do when it says connection to the server failed ?  This has happened for the past two days.  I have changed nothing.  It happens at home and at work.  What do you do?  What has happened?  Thank you.

    What are you trying to do when you get this error message? Is it related to mail, connecting to the iTunes store, Facebook/iMessage, your internet ISP? All of these are different servers.
     Cheers, Tom

  • TS3276 iCloud email on OSX 10.8 does not connect to the server after sleep

    iCloud email on OSX 10.8 does not connect to the server after sleep.  The only way I can reconnect the iCloud email is to restart the computer. Does anyone have any ideas how to resolve this issue?

    I would suggest you try opening "Mail">click on "Mailboxes" in the Menu Bar> and select "Rebuild" from the list.  That may solve it.

  • CS5 - Contribute could not connect because the server is down

    we have a client who has site hosted with us. They are using Contribute CS5 to connect to our web server and make changes to their site. They've been using Contribute for a month when all of a sudden they started receiving the error:
    Contribute could not connect because the server is down or not accepting connections. Please contact your administrator.
    Our server is up and running, their site is up, their ftp password is not locked and network said they can see can see end to end FTP transactions, logins and authentications. Communications between the application and the server is being allowed through all the various firewalls and devices along the way.
    I've done some research but cannot find a definitive resolution. Any help with your product would be appreciated.

    Can you please try clearing the Contribute preferences once?
    In Windows -
    Quit Contribute.
    Go  to C:\Documents and Settings\<username>\Local  Settings\Application Data\Adobe\ and delete the Contribute CS5 folder.  (In Windows Vista or Windows 7, go to  C:\Users\<username>\AppData\Local\Adobe\ and delete the Contribute  CS5 folder.)
    Also, run reg delete "HKCU\Software\Adobe\Contribute 6" /f
    In Mac -
    Quit Contribute.
    Go to Users/<username>/Library/Application Support/Adobe/ and delete Contribute CS5 folder.
    Also, go to Users/<username>/Library/Preferences and delete Adobe Contribute 6 Preferences file.
    Note: Doing this will remove all the existing connections in Contribute. It will be like a fresh installtion of Contribute.

  • Contribute 3: Could not connect because the server is down or not acceptiong connections.

    Hi,
    I have two customers who use Contribute 3 and are currently
    having the same problem:
    When they want to Publish a page, they get the following
    message: Contribute encountered a network or file system error.
    Then they can click on "Connect" and get: Contribute could
    not connect because the server is down or not accepting
    connections.
    They don't have an internet connection problem, there's no
    firewall that blocks Contribute.
    Regards,
    A.

    I have spent many hours trying to get reconnected to my site.
    My PC died in early January and I have not been able to get
    reconnected since. I get the same error message. My Network
    Aministrator has worked with me to see if there are any firewall or
    antivirus issues blocking the connection. I administer the site so
    have had to do elaborate work arounds to get users' pages
    published. I am using WebDAV. My question: I would like to try
    creating a new username and password (which is about the only thing
    I have not tried yet.) If I do so, and get connected, I should be
    ok with sending a new connection key to the users, is that
    correct??

  • Contribute could not connect because the server is down"

    My client tries to connect to the website with Contribute and
    gets the error "Contribute could not connect because the server is
    down" however I connect with no problems, using Contribute or
    Dreamweaver.
    I sent him a new connection key but the same error.
    Only problem I ever have is that sometimes I get a "can't
    save files to shared something-or-other" on exit after
    administrating, but I don't know if that's related or not - it
    never seems to affect anything at my end.
    Please help! Thanks

    OK, problem solved here:
    The access denied or file does not exist error was being
    caused by the fact there was a 0KB index file somehow.
    Once we got rid of that we still had the "Contribute could
    not connect because the server is down or not accpeting
    connections" error to get round.
    I had previously asked my client to go in an change the FTP
    settings in the Advanced screen to be Choose FTP server settings
    manually and select Use Passive FTP to connect to the server and
    make sure Use FTP Performance Optimization is not selected. I don't
    think this was ever done (and if it had been it would have saved me
    HOURS of time spent trying to diagnose this problem).
    Today I ended up backing up every contribute related file and
    folder on the server to my local machine then deleting them. After
    having done that I asked my client to create a new connection using
    the FTP details (not a connection key). That still didn't work so I
    got them to (and this time they did it) change the advanced FTP
    settings as above and BINGO! they can now publish.
    I'm guessing that if I had sent a connec tion key with the
    same settings specified in the Advanced FTP then it still would
    have worked.
    I hope this saves someone else some time. I am going to have
    a few beers now to celebrate.

  • Does not connect to the server. (Linux)

    I have the WTK installed and working(?) but when I try to run this .JAD/.JAR file, it works fine until trying to connect to the server. Then the app seems to hang and the power light on the phone sim turns off. Why would it do that? Do I need to set something in the WTK so it knows to use my internet connection? I can access the internet with the computer as I am posting from it now. The WTK does not seem to know I have an active connection and use it though. I know the .jar and .jad files work because they work with my windows WTK just fine. Did I miss something about requirements to run the WTK in Linux?
    Thanks,
    Kyle
    Here are my files.
    http://www.mediafire.com/?5yixwdclkjj
    http://www.mediafire.com/?flv9sxgvzz3
    Steps to run (if you want to check my problem).
    Options>Login
    Cell#: 12604185412
    PIN: 111585
    Accept
    Accept
    You should see it showing the "connecting..." and then switch over to the "login..." then it just hangs at "login..."
    Edited by: LifeForceIV on Dec 23, 2007 5:40 AM

    the message error is this:
    You are not authorised to use this functionality. Contact your administrator."
    I checked the rights of admin user in Shared services. admin is reporting administrator.

  • Icloud encountered an error when trying to connect to the server

    I get this error everytime I try and sign in to icloud.com on my work desktop.  I have tried IE8, and Chrome (latest version) on my Windows xp machine.  any suggestions.  I know my office uses Websence to restrict internet access but it is hard to believe iCloud would be blocked.

    If it only does it at work, then the most likely reason is that your work network is blocking it, or one of the servers iCloud connects to.
    Have you asked the IT people at work? Checked it on another computer at work?

  • FR client does not connect to the server

    Hi All,
    i have BI+ 9.3.1. on SUN-64
    FR is running.
    http://my_server:7777/hr/status.jsp gives me:
    Hyperion Financial Reporting is available.
    i downloaded FR client from edelivery.
    when I try to connect I get a message: this function is not allowed.
    what can be the matter?
    thanks,
    Andrei

    the message error is this:
    You are not authorised to use this functionality. Contact your administrator."
    I checked the rights of admin user in Shared services. admin is reporting administrator.

  • When installing Flash, it stops right around the begging while, "Trying to connect to the server", anyone know how to fix this?

    Like I said, when trying to connect to the server, the installation makes no progress, for hours. I've tried re-downloading the installer, simply restarting the installation, and i can't think of anything else to do. Does anyone have a fix to this?

    Do those folders exist on the server?
    You'll need to navigate into the mailstore folder via terminal.
    With dovecot, all folders start with a "."
    Do you see all of those dup folders?
    Check permissions on your entire mailstore, everything should be owned by '_dovecot' and group 'mail'
    You could reset perms of the mailstore (assuming default location of the mailstore) with:
    sudo chown -R _dovecot:mail /Library/Server/Mail/Data/mail/

  • Printer cannot connect to the server

    I am going bonkers! For no reason that I can fathom my printer does not connect to the server (i.e. my PC). I have downloaded the latest drivers. I have uninstalled and re-installed. I have run the HP Doctor. The printer finds my router ok and has been set up correctly. The same problem exists with my laptop. I have windows 8.1 and HP Officejet 6600. I am at my wits end. It has worked and nothing has changed. I have run a strict anti-virus checker too. Does anyone out there have a clue as to what is going on? I will be so grateful for your help. Oh yes when I logged on to the HP site and live chat I was told my printer was out of warranty - it is only a month old! So no help there.

    doghaus,
    Change your preferred DNS server to 8.8.8.8 and your alternate to 8.8.4.4.
    Let me know if that works for you.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • My adobe installer wont connect to the server WHY?

    adobe installer does not connect to the server not letting me login to download my items WHY?

    Which Adobe product are you downloading?  Is it a purchased product or the trial?  Which operating system are you using?  Do you receive any error messages?

  • I purchased an Italian hotspot to access internet on my American Ipad2 while abroad. I had no trouble connecting to the hotspot but when I try and access the internet it "cannot connect to the server". what does that mean and how can I fix it?

    I am abroad for the summer and there is no internet available. I purchased a hotspot in a nearby vodaphone and they helped me connect the Ipad to the hotspot. I assumed I would have no trouble after that. Once I got home though and connected to the hotspot i found i could not open the internet without getting a notice about not connecting to the server. I have a signal and can connect to the hotspot and yet i get no internet. I already spent 50 euro on the hotspot for 2 months of wifi...is there a way to actually fix the problem without me having to spend more money?

    I'm guessing e mail does not work either.  While the pad is seeing the network, it is not yet connecting, probably trying to work through your security set up.  I suggest you go to settings, then network, then the details of the network.  Do you see an ip address that starts with 192.168.1. Then some number? If not, the router has not made friends with the pad.
    Suggest that from that same screen, you select 'forget this network'. Then start over again, paying close attention to what happens when you provide the security password.

  • An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,
    error: 40 - Could not open a connection to SQL Server)

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named
    Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    Hello,
    Make sure your SQL Server service is started.
    Make sure TCP\IP and names pipes protocol is enabled
    Make sure you have made an exception in firewall for SQL Server connection
    Make sure SQL Server browser service is enabled
    Make sure you connect with correct name hostname\instance name for named instance,MSSQLSERVER for default instance and Hotname\SQLEXPRESS for express edition.
    Please make sure you use port no when connecting to SQL server listeing on different port (hostname\instance ,portno)
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Why does it say itunes can not contact the ipod update server because you are not connected to the internet when i am connected to the internet?

    why does it say itunes can not contact the ipod update server because you are not connected to the internet when i am connected to the internet? i need to update my ipod i even changed the LAN settings and it stilll doesnt work

    Have you seen this article?
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    B-rock

Maybe you are looking for

  • Do you need a cisco router at remote sites when using VRF BGP?

    Hello..... If you could refer to the attached document and read the following... I need to know if a CISCO router is required for each of the sites.   OR does the ISP (Provider) provide the only required Router in the private cloud? We want to replac

  • Can't get video from itunes to nano!

    Hi Everyone, I just purchased a new Nano (4th gen) and am very frustrated (may take it back) becuase I can't seem to get video (mp4 and/or m4v format) to load onto my nano. I have used Handbrake to convert from ISO to mp4 and can successfully get the

  • Pass parameter into eventhandler in russian language after submit form

    public static EventResult handlerSearch(BajaContext context, Page page, PageEvent event) String attrValue = event.getParameter("attrValue"); If "attrValue" is English, all is ok. But if "attrValue" is Russian language - attrValue = "". Is it depend o

  • Dynamically setting the values for the Adapter Configuration

    We are configuring the JMS adapter to put into an MQ topic. For this we are giving all the values for the configuration parameters like Factory Properties. JMS connection Factory Transacted Destination Type Username Password Destination Name, etc...

  • Asia lanugage

    Hi, I'm new to htmldb. my default language of OS is Simplified Chinese. NLS_lang of db home is American_america.utf8. after installing HTMLDB(I noticed chinese is not install into the db), i tried to build a form with a date field. in the running for