Problem doing stuff from a thread

Hey ja'll,
Hope you all can take time away from kayman's thread to hook my up with some help on this one...
I am pulling data off of a series of databases. I start a thread for each database i pull from. Each thread calls my Database class which loads the correct driver and returns the connection.
My problems occurs when one of the databases is down. Its seems to get hung on
DriverManager.getConnection
(which i am doing in my database class)
until it figures out that it is not going to get a connection. All the the other threads DO NOT go on thier merry way, they wait for the retard database to error and return untill they try to get connections to thier databases.
Is their any way that I can make them not wait?

Each thread calls my Database class...A static method, right? And is it synchronized? If so, then that's your problem right there. But if it isn't synchronized, then perhaps it's calling something that is.

Similar Messages

  • Problem installing stuff from software pack N95, m...

    Hi,
    I bought a Nokia N95 few days ago.
    I have success fully installed PC suite.
    But,
    when I try to install stuff from the "Software Pack CD" it gives me error about missing "MSVCR80.dll".
    Can some one tell me how to fix.
    I went back to the shop and got the CD changed, but it didn't help.
    Also please tell me how can I use Navigation on N95. Do I have to buy the liscence from nokia or there is some other way.

    Hi lafanter
    Is your Windows NET 2.0 or 3.0 Framework OK?
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Problem doing insert from one schema to another

    Hi all;
    I have table test on schema A, and i want to create a trigger TEST_TRIG on table test, the trigger must insert data into a table X, and Y in schema B,
    when i create the trigger in Aqua i got
    Warnings: --->
    W (1): Warning: execution completed with warning
    <---
    0 record(s) affected
    and doing an insert on table A gives the following
    ORA-04098: trigger 'A.TEST_TRIG' is invalid and failed re-validation
    the trigger is
    CREATE OR REPLACE TRIGGER A.TEST_TRIG
    AFTER INSERT OR UPDATE OR DELETE ON A.TEST
    FOR EACH ROW
    DECLARE
    l_auditId NUMBER(10,0);
    l_auditAction VARCHAR2(1);
    l_auditPK VARCHAR2(100) := :NEW.FEILD_A;
    l_logInserted BOOLEAN := FALSE;
    PROCEDURE auditLog
    ( p_column IN VARCHAR2,
    p_oldval IN VARCHAR2,
    p_newval IN VARCHAR2 ) IS
    BEGIN
    IF NOT l_logInserted THEN
    INSERT INTO B.X
    ( auditId, auditTable, auditPK, auditAction, auditUser, auditDate )
    VALUES
    ( B.AUDIT_LOG_SEQ.NEXTVAL,'TEST',l_auditPK,l_auditAction,'test',SYSDATE )
    RETURNING auditId INTO l_auditId;
    l_logInserted := TRUE;
    END IF;
    INSERT INTO B.Y
    ( auditId, auditColumn, valueOld, valueNew )
    VALUES
    ( l_auditId, p_column, p_oldval, p_newval );
    END auditLog;
    BEGIN
    IF INSERTING THEN
    l_auditAction := 'I';
    ELSIF UPDATING THEN
    l_auditAction := 'U';
    ELSIF DELETING THEN
    l_auditAction := 'D';
    l_auditPK := :OLD.FEILD_A;
    END IF;
    IF :NEW.FEILD_A != :OLD.FEILD_A
    OR (:NEW.FEILD_A IS NULL AND :OLD.FEILD_A IS NOT NULL)
    OR (:NEW.FEILD_A IS NOT NULL AND :OLD.FEILD_A IS NULL)
    THEN
    auditLog('FEILD_A',:OLD.FEILD_A,:NEW.FEILD_A);
    END IF;
    IF :NEW.FEILD_B != :OLD.FEILD_B
    OR (:NEW.FEILD_B IS NULL AND :OLD.FEILD_B IS NOT NULL)
    OR (:NEW.FEILD_B IS NOT NULL AND :OLD.FEILD_B IS NULL)
    THEN
    auditLog('FEILD_B',:OLD.FEILD_B,:NEW.FEILD_B);
    END IF;
    END;
    GO

    doing select * from user_errors where name = 'TEST_TRIG' returns nothing to me.
    i think there is some privilege problem cause if i create tables x and y inside schema A everything works perfectly. Any suggestion

  • I can't get my iPad to find my Apple TV. Where do I find the rectangle with the triangle in it to turn on the tv link. I have no problem doing this from my macbookpro.

    I can't get my ipad4 to find my Apple TV box, I where do I find the little rectangle box with a triangle in it that I click on my MacBook Pro to turn on the appletv?

    Welcome to the Apple Community.
    Try the following steps, check whether things are working after each step where appropriate, before trying the next.
    Check AirPlay is turned on on the Apple TV (turn it off and on if it already is)
    Check that both devices are on the same network (Settings > Wifi, on the mobile device and Settings > General > Network, on the Apple TV).
    Restart the Apple TV (Settings > General > Restart).
    Restart the Apple TV by removing ALL the cables for 30 seconds.
    Restart your router. (Also try removing it’s power cord for at least 30 seconds)
    Restart your mobile device.

  • Problems doing roundtrip from LR to PS

    When I edit a picture in LR5 and then edit in PS2014 and save the picture, when I go back to LR5 the PS edits are not there. Any ideas why not? Thanks!

    Did you flatten the Photoshop document before you saved it as a tiff you can save  it as a jpeg for jpeg has no layers like lightroom.  Lightroom is not an image editor with layer support it can do flat tiff and jpeg .

  • Problem with Serialization from Threads

    I'm quite new to java threads, and i'm doing a simple server.
    It opens a thread for every socket connection that is opened, so the Socket is extern to the Thread.
    When I try to serialize on the socket a Vector (that contains Vectors, etc..) that is extern to the Thread, the first time everything goes ok, but when the thread modifies some variables in some objects contained in a vector(that, i repeat is extern to the thread), the serialized object doesn't seem to change, and the client continues receiving the same variables, without change.
    In a first time i thought that maybe creating a thread, the second one took a copy of the space of addresses of the main one(and so when i modify a variable from a thread the variable in the main thread didn't change), but i read that java uses the same space of addresses for every thread, so i don't really know what it could be.
    Maybe i've not been clear so i make an example:
    MyType is a class containing some fields, let's put x and y
    In the class MainClass i have an istance of this class, and also a socket and from here i open a thread of class MyThread
    MyThread modifies x and y in a object of MyType contained in the "3D array" that is in MainClass
    Then from that thread i serialized on the socket (which was been passed by MainClass).
    Well, doing this way the vector that the client receives has always the x and y fields unchanged.
    Please help me, cause i've been thinking all day of what it could be and found nothing on the web.
    Also sorry for my poor english.

    I thought that could be the problem, but it wasn't.
    The client still receives the vector with objects
    unchanged.
    I think the problem is that the thread can only access
    to a copy of the class that contains the vector, and
    so when i send the real one, it isn't changed.not likely. one of the things about threads is that they share everything but local (read: non-Object) data. All objects are accessible to any thread of your application, as long as that thread has a reference to it.

  • Anybody having problems in Mail when sending reply messages from a thread and the message is not showing in the Sent mailbox?

    Hello Folks;
    Got a weird one...
    I am sending replies from a thread in Mail and they seem to have been sent (sounds) but they don't show in the Sent mailbox... O-0 These messages seem to have been delivered to cyberspace as they don't show in my Sent mailbox on my IMAP server... This has been happening for the last month... I have checked and verified all of my IMAP settings and Mailbox behavior settings... This is really weird and maybe a bug.... I checked all of my other clients that have access to the server on the same account and these messages do not show there either.... Any ideas?
    --prd54usa

    The messages are getting to the recipient...
    I am on a Comcast IMAP server if this has anything to do with it and the server settings are following the correct server port numbers, SSL settings, etc... I save Sent messages on the IMAP server for 90 days.... None of these "disappearing" messages were on the server for more than a couple of days.. Typically, these messages will get 'hung' in the Outgoing Mailbox for @30 seconds before sending... like they are being scanned for viruses or Mail can't connect to the server all of a sudden...
    I anybody else here is on a Comcast IMAP server, and having this problem of disappearing Sent messages... This would tell us that it might be a Mail Provider issue with their outgoing server...
    --prd54usa

  • On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this?

    On my new iMac, mail has no sound after waking from sleep.  If I select do not wake for network access in general preferences, the problem does not occur.  Anyone have an idea on how to fix this? Thanks --

    Same here on an older iMac since Lion. Thanks for the uncheck wake for network access tip though, it doesn't do it either in that case, I will leave it that way.

  • HT3775 I'm using version 10.7.5 OSX. I can't play or use the normal AVI recently. Some problem with (codecs version incompatible with OSX) Please give me some help. I'm in Vietnam and to have a real place to have stuffs from Apple is ****-

    I'm using version 10.7.5 OSX. I can't play or use the normal AVI recently. Some problem with (codecs version incompatible with OSX) Please give me some help. I'm in Vietnam and to have a real place to have stuffs from Apple is ****…

    I would recommend that you download and install the excellent and Free "VLCPlayer for Mac", which reads many more types of files for video than Quicktime Player:
                 http://vlc-media-player.en.softonic.com/mac

  • I just downloaded the new itunes update, now I can't copying TV shows purchased from the library to my backup computer, it says the files are invisible. Never had any problem doing it until the update.

    I just downloaded the new itunes update, now I can't copying TV shows purchased from the library to my backup computer, it says the files are invisible. Never had any problem doing it until the update. I have a Mac Pro G5 OS 10.6.8. The desktop hidden files app doesn't reveal the TV shows.

    found a solution in a different discussion.. thank god.

  • TS1717 When I attempt to upload from a CD I get a box with a red X that says new itunes library.  What do I have to do to correct this.  I have never had a problem doing this.

    When I attempt to upload from a CD I get a box with a red X that says new itunes library.  What do I have to do to correct this?  I have never had a problem doing this.

    Hey the1stpotada,
    I would take a look at the recommended steps in this article and run through them to see if they help resolve the issue. Some of the steps may be slightly different depending on what operating system you're using:
    iTunes for Windows XP: "Disk is locked" or "iTunes folder cannot be found" when installing or opening iTunes
    http://support.apple.com/kb/HT1866
    Best,
    Delgadoh

  • Does upgrading from Premiere Elements 12 to 13 solve the Organizer thumbnail problem?

    Thumbnails do not show up after importing clips into Premiere Elements 12 Organizer.  I've tried right clicking on a clip and telling it to recreate the thumbnail but it doesn't work. I've tried refreshing and repairing the catalog.  I've even started a new catalog and reimported the files.  The system says it's creating thumbnails but they still do not show up.  Does upgrading from Premiere Elements 12 to 13 solve the Organizer thumbnail problem?

    listiak
    That is one of those questions best answered by evaluating Elements Organizer13 with your specific files in your specific computer environment.
    Each of the Elements Organizer versions often appears to carry along its own baggage.
    One of the things that came up about Elements Organizer 13 thumbnails recently was a problem with files with MPEG2
    video compression. The Adobe word on this was that this is only an Elements Organizer 13 tryout issue...supposed not to exist
    in the purchased version.
    ATR

  • Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Photoshop suddenly does not print to Epson 3880 - PROBLEM: Cannot print from Photoshop  After restart error message appears:  - "There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopen

    PROBLEM: Cannot print from Photoshop
    After restart error message appears:
    — “There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents.”
    • All print commands are greyed out and unavailable — even to call up the printer commands cannot be done.
    The printer printed fine until about 2 weeks ago when this error message appeared.  Printing continues from Pages, I-photo, preview etc. —  only Photoshop fails.
    The printer has been turned on and off, as have open documents been closed and open etc..   Preferences reset.  Repeatedly I have read through blogs and forums and attempted to contact Adobe — all without results
    Epson support struggled to find reason and several solutions were tried and they assume this is an Adobe problem.
    Running Mac Powerbook X 10.10.2 / Photoshop CS6 13.0.6.x64
    Attempting unsuccessfully to print to Epson 3880
    What Adobe support will be of help.
    Robert Darling —  2/19, 20, 21,22,23/2015

    Probably best to ask in Photoshop General Discussion
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Problem with Pushlet (and/or Thread Competition?)

    Hi all,
    Once again, I'm in over my head and have approximately four hours to dig myself out.
    I have a client-server application. One the client side is an Applet that runs Java 3D and has a JavaPushletClient / JavaPushletClientListener pair (from Pushlet Framework). All of the code is executed on either the AWT Event DIspatching Thread, the Java 3D InputDeviceScheduler thread, and the JavaPushletClient thread (none of the code on the latter is mine, it's part of the Pushlet Framework).
    On the ServerSide, I have subclasses Pushet and Postlet of the Pushlet Framework.
    I have one client sending information to the Server (via HTTP Get Request). This is occuring on the Java 3D InputDeviceScheduling thread. It sends information to the server roughly every 35 ms (This was not predetermined - it cannot be. This was measured). The Server is recieving these messages and sending them to the Publisher at the same rate (every 35 ms, again by measuring). When the information is published to other clients, it appears that the pushlet client waits 200 ms, reacts to all of the messages (roughly 6 in 200 ms) that have accumulated at once, and waits another 200 ms.
    This system is intended to display real time information at a rate of no worse than 50 ms (this is for animation purposes, roughly 20 fps).
    I can't figure out where this problem is coming from, or why. I have read through the Pushlet source code, and it indicates that everything should really be continuous.
    Here's what I think MIGHT be happening:
    the PushletClientLoop is sort of like this:
    while (true) {
              message = objectInputStream.readObject();
              theListener.event(message);
    }I wondered if it was possible that when it attempts to read an object, it blocks because one is not available, and transfers processing to another thread, and does not recieve processing time for another 200 ms.
    If that is the case, (given that all the other code is scheduled by Java 3D and the AWT Event Dispatching thread), how can I make sure that this JavaPushletClient thread gets processing time at least every 50 ms.
    OR, I could be way off. This problem could be caused by something else altogether. Any ideas?
    At any rate, I really need help here. This is my final day on this project, and the presedent of our company wants to see the results next Tuesday. AND, (because my company is part of the Canadian Gov't), it's possible that the Prime Minister of Canada will be present for the Demo Tuesday. So I really need this to work. Lots of Dukes up for grabs on this one!
    - Adam

    Here's what I think MIGHT be happening: ......
    I wondered if it was possible that when it attempts to read an object, it
    blocks because one is not available, and transfers processing to another
    thread, and does not recieve processing time for another 200 ms.yes, objectInputStream.readObject(); will block the thread until there is:
    a) an object to read or
    b) the stream is closed and an exception is thrown.
    The JavaPushletClient doesn't run in the event dispatch thread. It runs in it's own thread. I'm sure of that, I've used it before. Unless you are doing something wrong, but I'm not sure how, cuz you just use the JavaPushletClient class and have your own listener class. That doesn't mean it's no the event dispatch thread, though.
    Pushlets send probe messages frequently, although every 35 ms, I dont' know if it's that frequent (if that's what you mean).
    You could update the priority of the thread in the JavaPushletClient. But exact scheduling of threads in Java is tricky. I'm not sure there's a way to guaranty what you want. Up the priority, and see what happens.
    It's very well possible that other threads are doing stuff for 200 ms and not giving up control. Likely I'd say. Although if it's consistently 200 ms, that sounds weird.
    It maybe doesn't matter, though, that it runs every 50 ms, cuz you're UI display isn't likely to be that responsive anyway.

Maybe you are looking for