Urgent:Need to add Timeout for getting connection

All,
While using DriverManager.getConnection to get the connection,I need to add Timeout in my code so if I don't get a connection with in 30 seconds,I need to say'Operation Timed out.
I was using DriverManager Api's setLoginTimeout method to set the desired time but it doesn't work.Can somebody tell me some other way to do it.

If I use this method then if second thread reports
Timed out after 30 seconds and then origional thread
gets connection after 30 seconds then it'll also
report.I dont want a connection if 30 second time
passes.I think if second thread reports 'timed out'
then I won't be able to explicitly kill the origional
thread as stop method is deprecated in Thread
class.Can you make it clear please?You can't stop the actual thread attempting the connection.
It will require some thought on your part to correctly wrap it.
It might not work at all because the getConnection() method, or something in it, might be synchronized.

Similar Messages

  • I have a Mac Book Pro, lately if the laptop has been at rest for the night, I need to restart it to get connectivity to the internet. What can I do to cure this problem?

    I have a Mac Book Pro, lately if the laptop has been at rest for the night, I need to restart it to get connectivity to the internet. What can I do to cure this problem?

    Hi Bluedrake
    Please download the CS6 Trials from below link : Download Adobe CS6 Trials: Direct Links (no Assistant or Manager) | ProDesignTools
    Follow the instructions to Start your Download ...
    Use your Serial Key to Activate them ....

  • I urgently need to know how I can connect 8 thunderbolt display, I was thinking with the new mac pro will come out, but I wonder if it is possible to connect an iMac to 4GB of graphics card, but suffers from the imac. thanks

    I urgently need to know how I can connect 8 thunderbolt display, I was thinking with the new mac pro will come out, but I wonder if it is possible to connect an iMac to 4GB of graphics card, but suffers from the imac. thanks

    I tightened all HD screws and it didn't help. With the machine running and side of the case off, I physically stopped both the video card fan and the front case fan with my finger for a couple seconds and the noise continued. I also took all hard drives out one by one and rebooted each time. Again, the noise continued until I took out the Mac HD in Bay 1, rebooted, and I had a very quiet, silent machine. The issue is the hard drive in bay 1 that shipped with the computer, it's without a doubt causing the hum/woosh sound. I still need to know if I can safely swap the Mac HD from bay 1 to bay 4 without any issues to the operating system. I would like to try that to see if it dampens the noise but I also want to make sure this swap won't screw up my machine at all.

  • I urgently need a contact email for the sales team can anybody help me with this

    I urgently need a contact email for the sales team regarding an outstanding query, can anybody help me with this please? Thanks in advance.

    Hello 
    Welcome to the EE Community! I'm afraid there isn't an e-mail you can contact the EE Mobile Sales team on, but here's how you can get in touch with them:
    If you're on Twitter, you can tweet them @EE, however If you'd prefer to talk to someone, you can dial:
    150 from your EE mobile phone
    If you're ringing from another phone, it's 01707 315000
    For handy text codes & more, check out this page: http://ee.co.uk/help/get-in-touch Cheers,
    Titanium
    Was my post helpful? Please take 2 seconds to hit the 'Kudos' button below

  • Set timeout for URL connection in java1.4

    hi
    I want to set timeout for URL connection in java 1.4..
    java 5.0 provides with a setTimeout(int ) method but how should it be done in 1.4 environment
    Thanks in advance
    sneha

    sun.net.client.defaultConnectTimeout (default: -1)
    sun.net.client.defaultReadTimeout (default: -1)
    See the [Networking Properties|http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html].

  • Urgent -Need to Add new values for the LOV field in forms

    HI,
    I am customizing an existing form. In that i need to add some values for the LOV fied which can be used during run time.
    Please Can some one help me in doing this?
    Thanks
    Suresh P

    Go to Navigator and edit the LOV or create a new one.
    hope that helps!

  • HELP urgently needed: My Sandberg FireWire for Laptop will not start on my T60

    Let me start with information on my T60:
    OS information: Microsoft Windows XP
    OS version: 5.10.2600   Service Pack 2
    Processor: x86 Family 6 Model 14 Stepping 8
    Memory: 3.135.856 kb
    BIOS version: 2.09  (79ETC9WW)
    Machine type-Model: 1951A47
    I have just got a new Sandberg FireWire for Laptop, a PC Card with 3 6-pins connectiont. After inserting the card in the PC Card slot, the Windows Device Manager tells me that there are problems with the card. Looking at the 1394 Card Properties the status says:
    "This device cannot start. (Code 10) - Click Troubleshoot to start the troubleshooter for this device."
    The troubleshooter did not solve my problem. I have tried disconnecting, re-connection, shut down Windows and start again etc.
    At Sandberg Help Desk they tell me that I have two slots in my laptop, one with a 16 bits bus and another with a 32 bits slots, and I should use the latter. It seems that I can use the lower slide only in my laptop and I cannot push the card into the upper slide. There is not enough room for it.
    Here is what I found on Lenovo's support site on my type & model:
     PC Card
    Conforms to the PC Card Standard 95
    Type II slot
    Both the 16-bit Release 2.1 card standard and the 32-bit CardBus card are supported.
    Have a look at these screen captures.
    What should I do to solve my urgent problem!? 
    Message Edited by pbl_ibm on 10-09-2008 05:10 AM
    Message Edited by pbl_ibm on 10-09-2008 07:27 AM
    Message Edited by pbl_ibm on 10-09-2008 07:45 AM
    Message Edited by pbl_ibm on 10-09-2008 07:45 AM

    garytr23 wrote:
    Sounds to me like a driver configuration problem.  Maybe something bad happened during driver install.  I would recommend uninstalling the device from device manager by right clicking on it and hitting uninstall.  Reboot the computer.  Have a go at it again.  Also, test your pcmcia port functionality by finding and plugging in a different card.  See if that works.  It might need repair.
    Message Edited by garytr23 on 10-09-2008 09:41 AM
    The status right now is:
    The PC Card reader works on my T60
    If I use a Firewire PC Card it will not start - as described above (on T60)
    The PC Card work properly on my T61P - and I succeeded importing a video file from a digital camera using the Fireswire PC Card.
    So what does a wise man do in this situation??
    Please help me as I urgently need to know how to solve this serious issue!! 
    Have you got an idea? Can I import the video in another way??
    Message Edited by perbuch on 10-12-2008 07:55 AM

  • Outlook Add-in for Adobe Connect ( win 7 64 bit )

    Is there an Outlook add-in for Win 7 32 bit users that works with Adobe Connect 8 ?

    Yes, the Outlook add-in for 32 bit Outlook for 64 bit Windows 7 is in internal beta testing for release very soon. Hopefully by the time Adobe Connect 8.2 is released soon.

  • OSB: Business Service Timeout for JCA Connection

    Hi,
    I am wondering if there's any way to configure timeout for a JCA connection in OSB? It's not configurable in Business Service.
    Thanks.

    Hi Anuj,
    I am using DbAdapter. As for operation, which operation are you referring to? Where do I check to verify this?
    Thanks.
    Edited by: user13298498 on May 21, 2012 11:01 PM

  • Urgent Need in Dallas Texas for a Sr. Oracle BPEL Developer

    $$$$$$$$$$$$
    I have an urgent need for a Sr, Oracle BPEL Developer in the Dallas Texas area. With this position, you can interview and start immediately. If you are interested or know of anyone looking please send my way. Or know of companies that use BPEL would be helpful too.
    Warm regards,
    Kim Dobson
    Sr. Account Manager
    Eventus Group Technology Resources
    10100 N. Central Expressway
    Suite 150
    Dallas, TX 75231
    Office 469.916.4857
    Mobile 214.277.2097
    Fax 469.916.3861
    [email protected]

    I was told by Dave Shaffer, Director Product Management, Oracle BPEL Process Manager to do this posting here. I am sorry but this is a critical need for me and was just looking for help.
    Kim Dobson

  • Shorting the timeout for socket connection

    Hi everyone, i've got a client who owns a handle to a remote object. When the remote object quits, accesing it through a method invocation throws a java.net.SocketTimeoutException: Read timed out. That's fair, what's up is that it lasts about six seconds in sending it, and i would like to shorten the time it waits until it realises it can't connect. I've tried with sun.rmi.transport.connectionTimeout and sun.rmi.transport.tcp.readTimeout, and no success. Any idea?
    Thanks in advance.

    The "sun.rmi.transport.proxy.connectTimeout" parameter works only when HTTP is used.
    We do it manually by utilizing RMI client and server socket factories and setting socket options as appropriate. For the connect timeout, there is connect(SocketAddress endpoint, int timeout) method of the Socket class. With this approach, the application has a full control over sockets used by the RMI engine.

  • Need Laptop Audio Amplifier for USB Connected Speakers

    For a laptop, does Creative have any kind of audio amplifier for USB connected speakers?
    I think the laptop has what is called an Express 54 slot.
    I am looking for amplification suitable for speakers, not headphones.

    If their only connection to the laptop is via USB than you can't amp them without doing some internal modifications. It means the speakers have their own audio device internally which is receiving signal via the USB port, processing it and then outputting it via likely a weak amp stage to the speakers - you'd have to physically intercept that last part of the chain to add an amplifier.
    Not saying it can't be done but you're looking at either harvesting an existing amp (which Creative don't seem to sell) or creating one from scratch (like the Penguin Mint amp, Objective 2, etc) for the purpose.

  • Need to add as a WSRP Connection in JDev for Weblogic Portal JSF Portlets.

    I am trying to register WLP 10.3.4 JSF Portlets as a WSRP connection in JDev Webcenter 11.1.1.6 Portal Framework application . The below are steps:
    -Created Simple WLP Application with JSF Portlets and deployed them on WLS 10.3.4 domain.
    -The WSDL url available is http://localhost:7003/TEST_WEB_PORTAL/producer?wsdl
    -Now Open JDev and created WCP Framwork app
    -Under Application Resource, right click on Connections -> New Connection -> WSRP Producer.
    -Click Next on step1 -> Enter WSDL URL on Step 2 and then click next on next 3 screens.
    -It tries to register but ended up with below exception:
    3-Dec-2012 12:48:03 oracle.adfdtinternal.model.portlet.wizards.registration.wsrp.WSRPProducerRegUtil registerProducer
    WARNING:
    oracle.portlet.client.persistence.PersistenceException: oracle.mds.core.ConcurrentMOChangeException: MDS-00165: metadata Object "/oracle/adf/portlet/WsrpPortletProducer0/portletDefs/portletPortletproducer/markupTypes/markupType0_texthtml.pxml" has changed
    MDS-00512: failure to create document /oracle/adf/portlet/WsrpPortletProducer0/portletDefs/portletPortletproducer/markupTypes/markupType0_texthtml.pxml because file C:\Oracle\PS5\mywork\testSR3-6514764665\mds\oracle\adf\portlet\WsrpPortletProducer0\portletDefs\portletPortletproducer\markupTypes\markupType0_texthtml.pxml already exists
         at oracle.portlet.client.persistenceimpl.mds.MDSPersistenceContext.commit(MDSPersistenceContext.java:473)
         at oracle.portlet.client.beanimpl.persistence.PersistenceBeanContext.commit(PersistenceBeanContext.java:128)
         at oracle.portlet.client.adapter.simple.SimpleAdapter.commit(SimpleAdapter.java:465)
         at oracle.adfinternal.model.portlet.manager.PortletProviderManager.commit(PortletProviderManager.java:1487)
         at oracle.adfinternal.model.portlet.manager.PortletProviderManager.registerPortletProvider(PortletProviderManager.java:1647)
         at oracle.adfinternal.model.portlet.manager.PortletProviderManager.registerPortletProvider(PortletProviderManager.java:597)
         at oracle.adfdtinternal.model.portlet.wizards.registration.wsrp.WSRPProducerRegUtil.registerProducer(WSRPProducerRegUtil.java:308)
         at oracle.adfdtinternal.model.portlet.wizards.registration.wsrp.WSRPProducerRegistrationWizard$1.doWork(WSRPProducerRegistrationWizard.java:863)
         at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:161)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.mds.core.ConcurrentMOChangeException: MDS-00165: metadata Object "/oracle/adf/portlet/WsrpPortletProducer0/portletDefs/portletPortletproducer/markupTypes/markupType0_texthtml.pxml" has changed
    MDS-00512: failure to create document /oracle/adf/portlet/WsrpPortletProducer0/portletDefs/portletPortletproducer/markupTypes/markupType0_texthtml.pxml because file C:\Oracle\PS5\mywork\testSR3-6514764665\mds\oracle\adf\portlet\WsrpPortletProducer0\portletDefs\portletPortletproducer\markupTypes\markupType0_texthtml.pxml already exists
         at oracle.mds.core.UpdateableMOContent.constructConcurrentMOChangeException(UpdateableMOContent.java:1376)
         at oracle.mds.core.UpdateableMOContent.saveMOContent(UpdateableMOContent.java:1143)
         at oracle.mds.core.MDSTransaction.flushChangesToPTrans(MDSTransaction.java:851)
         at oracle.mds.core.MDSTransaction.internalCommit(MDSTransaction.java:2928)
         at oracle.mds.core.MDSSession.flushChanges(MDSSession.java:1022)
         at oracle.mds.core.MDSSession.flushChanges(MDSSession.java:850)
         at oracle.portlet.client.persistenceimpl.mds.MDSSessionWrapper.flushChanges(MDSSessionWrapper.java:61)
         at oracle.portlet.client.persistenceimpl.mds.MDSPersistenceContext.commit(MDSPersistenceContext.java:456)
         ... 10 more
    Caused by: oracle.mds.persistence.DocumentExistsException: MDS-00512: failure to create document /oracle/adf/portlet/WsrpPortletProducer0/portletDefs/portletPortletproducer/markupTypes/markupType0_texthtml.pxml because file C:\Oracle\PS5\mywork\testSR3-6514764665\mds\oracle\adf\portlet\WsrpPortletProducer0\portletDefs\portletPortletproducer\markupTypes\markupType0_texthtml.pxml already exists
         at oracle.mds.internal.persistence.file.Fil
    I have followed the steps given in the http://docs.oracle.com/cd/E26806_01/wlp.1034/e14235/chap_webcenter_interop.htm#BABGIIIJ for preventing User Authentication error by creating user of PortalSystemAdministrator group but did not help.
    Please let me know if anyone have faced this exception or any pointers.
    Thanks
    Kamal Gulati

    Hi,
    I tried creating a simple JSF portlet and I can able to register and it is working Fine, but my teammet got the same issue like you :) . While Analyzing what I found is , the location where we created the portlet in weblogic portal. If you created your portlet directly under WebContent folder then this issue is coming up, so try to create the portlet in a folder inside the WebContent folder, say create a folder with name portlets under webcontent and create the JSF portlet inside that portlets folder.
    Now start the server and register the same in WebCenter, you will not get that exception. I am going to raise a ticket with Oracle about this issue and get the root cause.
    Thanks
    Karthikeyan

  • Help for getting connection with oracle database

    Hello,
    i have a problem to connect my java program with oracle databse.
    i have oracle 8 release. i tried all my best to connect but i
    can't. please help me. whenever i compile JdbcCheckup.java file
    which is distributed with oracle 8 release, it compile successfully.
    but whenever i run JdbcCheckup class file then it will generate an
    exception and that is -
    Exception in thread "main" java.lang.ClassNotFoundException:
    oracle.jdbc.driver.OracleDriver
         at java.lang.class.forname0(native method)
         at java.lang.class.forname(unknown source)
    and some other error message.
    But, by following yours given instruction, first, i unzip CLASSES111.zip
    in file which is distributed with oracle 8 realease in jdbc subdirectory
    into c:\temp directory and then run oracle installer(setup.exe) and point
    the installer to c:\temp and then i install the oracle JDBC drivers(beta)
    7.3.3.1.3 from the jdbc subfolder into oracle installer by selecting
    win95.prd for jdbc subfolder.
    After that i write into my autoexec.bat file,
    path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zip
    and then i restart the machine and the i complile and run JdbcCheckup file
    But, i can't recognize my error to define class path or installing the
    driver. please help me in details so that i overcome this problem.
    because i am student of B.sc. in CIS of final year. i need to submit
    my project within some days. please reply me as early as possible.
    thanks
    hemonto
    email - [email protected]

    path d:\jdk\lib;d:\jdk\bin;c:\windows\command;C:\temp\BIN;c:\temp\jdbc\lib\classes111.zipYou've added classes111.zip to your PATH, not your CLASSPATH.
    Add it to your CLASSPATH using:
    set CLASSPATH=%CLASSPATH%;c:\temp\jdbc\lib\classes111.zip
    then try to compile/run again.

  • Need standard Function Module for Get price from KONP

    Hi All,
    I need to code for the following logic
    1) Select access sequence code from T685 (field KOZGF)
    2) Using this code get an access sequence tables from table T682I(field KOTABNR). There is a number in this field which is a table name if to add letter 'A' before it. This table name is a table where you can find condition records. Every condition table has got field 'KNUMH' which is a reference to condition rate table.
    3) Select condition rate from table KONP (field KBETR)
    4) Select scale rates if you are using them from table KONM (field KBETR).
    Just want to ensure, if there is any standard FM which can help in above logic.I got a FM 'SD_COND_ACCESS'. But not sure, how it can help me?
    Thanks in advance.

    Thanks Anji for your quick reply.
    I do have Access Sequence with me, it is Z011. here i am writing more details, I do have material number.Here article means Materail number.
    o     Determine the merchandise category for the article in the list from MARA-MATKL
    o     Determine the department for the article from first 3 characters of MARA-PRDHA
    o     Determine the vendor for the article from EINA-LIFNR where EINA-MATNR = article in list and EINA-RELIF = ‘X’
    o     Now use the access sequence Z011 (table T682I) to determine the ‘A’ tables and sequence in which in these table must be read for determining the condition records.
    o     Use table T682Z to determine which fields must be used to read the ‘A’ tables above (in T682I).
    o     The ‘A’ tables must be read using condition types Z006 (margin) and Z007 (discount) where the Order Book effective date is between the valid-from and valid-to dates in the A- table, and in the sequence according to table T682I. When a condition record is found, the program must stop reading the subsequent tables, and determine the discount or margin from table KONP-KBETR, where KONP-KNUMH = A table-KNUMH.
         If the condition type is Z006, KONP-KBETR is positive. For condition type Z007, KONP-KBETR is negative.
         Divide KONP-KBETR by 10 to give KBETRX. Retain sign in KBETRX.
         Calculate the discounted / price with margin as follows:
    (1 + (KBETRX/100)) * wholesale price.
    Is it possible to get above logic by standard FM.
    Message was edited by:
            Vipin Nagpal

Maybe you are looking for

  • Color Correction Monitor

    I know this question has come up before, but after reading some posts I thought I'd see if anyone had any feedback on this monitor. http://www.bhphotovideo.com/c/product/469728-REG/JVCDT_V24L1DU_DTV24L1DU_24_MultiFormat.html It's the JVC DT-V24L1DU 2

  • ODBC Connection Pooling not working with 10g On Windows 2003

    I have a bog standard Windows 2003 machine and installed Oracle 10g on it. It seems that the ODBC Connection pooling is not working. I am using ASP and every time I try and render a simple page it is taking 4-5 seconds which is the time necessaru to

  • Someone knows PREDECESSOR_PARAMETER in DECISION process type???

    HI Today is my day of questions so here hopefully the last on.... Die anybody know the formula parameter "PREDECESSOR_PARAMETER" that can be used in the DECISION process type? Google and sdn search provide exactly 2 results with this information: <i>

  • Picking strategy M issue

    Hi People, I am using picking strategy as M (small and large quantities). In my materials, I have defined control quantity as 30 cs. So when a transfer order is created for more than 30 cs, system picks from 001 storage type and if TO quantity is les

  • Updated to Leopard - All photos Deleted

    I just updated to Leopard from a 2 year old OS (don't remember the number) and when I opened iPhoto it couldn't find the old Library and my pictures. I then tried to locate the pictures imported through iPhoto and couldn't. They weren't in the old de