Please help, urgent! How to hold the connection to oracle database

I used java to connect Oracle database using thin driver. But I found out the connection will be closed very soon if I did not make any request of query. I query the database like after 1 mins without doing anything, my application will dead for about 2 mins, then everything become normal again.
How can I hold the connection or is there any other solution? thank you!

Duffy is, as usual, correct. If you have a single-user environment, then holding onto a connection is probably okay (not desirable but also not pernicious). However, once you have more than one user, you will want to use a connection pool. Jakarta Commons (jakarta.apache.org) has an open source pool that is reliable.
But the fact that you are having additional problems makes me believe you are missing a few fundamental concepts, such as transactions. Even if the connection dropped, you should be able to reconnect without issue (granted, with some additional latency). The only time it would pose an issue (above and beyond the ones mentioned above and in previous replies) is if you are not managing your transactions properly.
In short, take some tutorials on JDBC, DataSource, connection pools and transaction management.
- Saish

Similar Messages

  • How to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    I did this a few weeks ago to be sure it was going to work for a young person I was giving my ipod to.  Then I reset the information for her and now it will not load.  Very sad.  She is so talented and she really needs this.   Anyone know?

  • Please help me how to take the "Spot Color" in illustrator?

    Hi,
    Please help me how to take the "spot color in illustrator CS" using vb script (or) java script.
    Regards,
    Prabudass E.

    Prabudass,<br /><br />If you are just wanting to see if the illustrator file uses spot colors - run the Delete Unused Panel items from the default actions. then view the swatch palette in small or large List View. The color names that have a square containing a gray circle (spot) to the right of their color names are spot colors. <br /><br />The following will get the spot color name of an existing swatch named "Color1" and change it to "Nicks Swatch" and will assign the CMYK values stated.<br /><br />if (app.documents.length > 0){<br />var swatches = app.activeDocument.spots;<br />for(i=0;i<swatches.length;i++){ var currSwatch = swatches[i]; if(currSwatch.name == "Color1")<br />{currSwatch.name = "Nicks Swatch";<br />     var newColor = new CMYKColor(); <br />     newColor.cyan = 35; newColor.magenta = 0; <br />     newColor.yellow = 50; <br />     newColor.black = 0; <br />     currSwatch.color = newColor; } }}<br /><br />When this script has run the swatch palette will not immediately reflect the changes to the swatch name until you double click on a swatch and click OK or Cancel in the Edit Swatch dialog.<br /><br />I hope that I have understood your question correctly and that these responses are helpful.<br /><br />Good Luck<br /><br />Nick

  • Please help me how to improve the performance of this query further.

    Hi All,
    Please help me how to improve the performance of this query further.
    Thanks.

    Hi,
    this is not your first SQL tuning request in this community -- you really should learn how to obtain performance diagnostics.
    The information you posted is not nearly enough to even start troubleshooting the query -- you haven't specified elapsed time, I/O, or the actual number of rows the query returns.
    The only piece of information we have is saying that your query executes within a second. If we believe this, then your query doesn't need tuning. If we don't, then we throw it away
    and we're left with nothing.
    Start by reading this blog post: Kyle Hailey &amp;raquo; Power of DISPLAY_CURSOR
    and applying this knowledge to your case.
    Best regards,
      Nikolay

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • Please help me :How to set the width and height for my View page "test.htm"

    Hi,
        I have controller class. When i call the view[test.htm]from this controller class ,i am getting the view with output tableview..it is fine.
    My requirement:
                 the output view window is showing full browser window. I want the view output like showModeldialog. I want to set the width and height for the output view window. How is possible?
                 or
    i want to call the test.view in the window.showModelDialog..
    Please help me .. Urgent requirement.

    Yes you can set the width & Height of the view as follows..
    <div style="width:580px; height:750px; margin-top:15px; overflow:auto;">
    <htmb:form......>
    </htmlb:form>
    </div>
    <i>*Reward each useful answer</i>
    Raja T

  • Please help! how to install the ODTwithODAC112030 in XPE OS?

    we have a project using the entity framework,
    we used to install ODTwithODAC to running our program.
    now the run enviroment is XPE, when using the interface to query data from oracle, the program go error.
    Does anyone know how to fix it?
    XPE OS is similar with the XP, we install .netframework 4.0, and other programs run OK.
    how to use the oracle entity framework without install ODTwithODAC on release version?
    [The underlying provider failed on Open.]
    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
    at System.Data.EntityClient.EntityConnection.Open()
    at System.Data.Objects.ObjectContext.EnsureConnection()
    at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
    at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
    at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
    at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult](IEnumerable`1 sequence)
    at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
    at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
    at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
    at ENPC.PVMonitor.DataAccess.UserManager.UsersImpl.Exist(String username, String password)

    The problem is likely due to some connection problem to the Oracle DB. Perhaps you are missing the password in the config file or a port is being blocked by the Windows Firewall. There is no likely single cause since any single incorrect setting can prevent a valid connection.
    If you google "The underlying provider failed on Open.", you will see the common ways people have resolved this issue.

  • Urgent:How to get the Sqltext for Oracle Sumbitted Jobs in 10g

    Dear All,
    Could you help me out in sorting the below problem.
    I use to get the current running sql's with following below query in 9i.
    SELECT A.SID,B.HASH_VALUE, OSUSER, USERNAME, SQL_TEXT
    FROM V$SESSION A, V$SQLTEXT B
    WHERE B.HASH_VALUE = A.SQL_HASH_VALUE
    AND USERNAME LIKE upper('%SCHEMA%')
    ORDER BY B.HASH_VALUE, B.PIECE;
    This is will work in 10g also for user-triggered sqls,stored procedures etc.
    But when oracle submits job i'm not able find which qurery is running.
    Seems For oracle jobs in 10g for V$session contain column SQL_HASH_VALUE as Zero and hence i'm not able find the any sql's running.
    Could you please any of you help me out how to get the Sqltext for Orcle submited Jobs in 10g.
    Please revert asap as this is very urgent for me.
    Thanks in Advance
    Anil.

    Have you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
    bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
    Thanks,
    Hussein

  • Please help..How to get the values from a for loop in  Action  class

    I have alist of students say A(name, class, subjects, teacher).
    I need to display all the items in the list A into JSP,
    and then also the details of (name, class, subjects, teacher).
    in the action class,
    After getting the list of students from the database with ORM Layer(Toplink),
    I set request.setAttribute("students",listOfStudents).
    And then Iterate over the list and pass the parameter as student ID to the functions
    getClass(), getSubject(), getTeacher().
    Collection listOfStudents=getStudents();
         request.setAttribute("students",listOfStudent);
    for (Iterator itr = lisOfStudents.iterator(); itr.hasNext();)
         Collection classOfStudent=getClass(studentID);
         request.setAttribute("class",classOfStudent);
         Collection subjectOfStudent=getSubject(studentID);
         request.setAttribute("subject",subjectOfStudent);
         Collection teacherOfStudent=getTeacher(studentID);
         request.setAttribute("teacher",teacherOfStudent);
    mapping.findForward("listOfStudentDetails);
    In JSP
    <c:forEach var="stud" items="${students}">
    //display name in Name Column
    //one student may have more than one subject
         <c:forEach var="sub" items="${subject}">
         .......//display the subjects of the student
    //and repeat the same for the other details
    </c:forEach>
    The problem I am facing is
    If the last student has no subjects, no teachers
    It is displaying null for all the other students.
    I am understanding that the values are getting overwitten in the loop and the is frwede to JSP with the recentmost values for the attributes.
    What could be a possible solution so that I retrieve the values for individual students and will be able to display on JSP?
    ((Please ignore any syntax in theabove example it is just a mock up created from the real problem)

    The issue here is while you are retrieving all the details, you are consistently overwriting them in the request.setAttribute() call before you get to the JSP to display them.
    Do you actually have a class/object called Student?
    That object should have attributes for classes, subjects, teachers (all of which are lists apparently)
    public class Student{
      String name;
      List classes;
      List subjects;
      List teachers;
      // appropriate getter/setter methods
    }Then you load each student, and populate its individual lists.
    That lets you pass the list of students, each student having its own lists for display.
    Hope this helps,
    evnafets

  • Please help on how Bex execute the query designed in query designer.

    Hi All,
    Want to know how bex execute/interpret  the query when the query is execute in analyzer.
    I mean which part of the query is executed first, like  filter,RKF or CKF etc.
    Want to do step by step analysis .Please suggest on this.
    Thanks & Regards
    Sameer Khan

    HI,
    When u execute the query...It will fetch the Global filters data first ....means filters on Default values....then restrictions on Char Restriction pannnel....Then calculate the RKF and CKF,s....Conditions and Exeptions etc.......
    Thanks

  • Please help me how to fix the yahoo messenger video call camera was not working have a line appear color green

    My new iPad air is not working the yahoo messenger video call pls help thanks

    Hello Evaorange
    If you are having an issue with the app downloaded form the App Store, check out the general troubleshooting article below to resolve the issue. If the camera is not working in that app, check other apps to see if the camera is working besides in that app.
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/ts1702
    Regards,
    -Norm G.

  • How to keep the connection to oracle db open  ?

    Hi
    I wrote a function that execute an oracle stored procedure , the function run for 400K times ,
    right now i open connection on every time the function called .
    the function called by another application ,
    can i create a connection that will be open just one time ?
    thank in advance ,
    rami .

    rami4tis wrote:
    Hi
    I wrote a function that execute an oracle stored procedure , the function run for 400K times , You call a db proc 400k times? You probably should look into not doing that.
    right now i open connection on every time the function called .
    the function called by another application ,
    can i create a connection that will be open just one time ?
    If not a pool than the class that does the 400k should have a Destroy/Close method that the caller would be responsible for calling when they are done.

  • How i know the version of oracle database 10 from my file not from sql

    plz i hope find answer
    thx for all.

    Hi;
    1. Please mention your OS
    2. Please try opatch lsinventory command
    3. Please check /etc/oratab entery
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • I bought an iphone 5 on 01 February 2013 from your store to use in Turkey. But the phone is sim-locked. What can I do now?  Please help urgently.

    I bought an iphone 5 from apple store in Geneva to use in Turkey. But it is sim-locked. What can I do now. Please help urgently.

    Return it to the store where you purchased & get your money back. Either that, or call the store. No one here can help you, as there is no one from Apple here.

  • Urgent: How to modfy the Report program Corresponding to a Infoset

    Hi Friends,
    I have done an infoset. I have used TCURR table for Query. I saw the Standard program of that Query having select statement like Select single * from Tcurr where Gdatum = RDD.
    Where RDD is the value having Statndard date where Gdatum is Converted Date format using some conversion routine ...So the select statement is failing in
    the standard program  AQ50MPL=========COS_EE========.
    When i tried to add an conversion routine before the select statement to convert the date to that Specific statement...When i tried to go to Change mode i got an error message like
    "Standard SAP Program Status is not modifiable" can i change the Standard program which is not asking for Access key for change..
    PLease help me how to change the standard program or How to make a copy of standard program into a Z program and how to call that z program instead of that standard program..
    Please help me..

    hi Gokul,
    It's not possible to edit the standard AQ programs that you create using Infosets rather these AQ programs are generated when you generate the Infoset and the Query.
    Secondly there's a point to be taken care of when we work on Queries and Infosets. There are two areas of Queries and Infosets namely, Global Area and Client-specific area. At this point, it's better to rush up with the jargons as you're running out of time. All you need to do is follow the steps below:
    1) Goto SQ02 *infoset* -> *give in your infoset name*change
    2) Goto EXTRAS tab or Press F5.
    3) Goto CODE tab
    4)from the drop-down  CODING SECTION *you can choose from the list wherein you need to place your code or change the existing code by traversing the list*
    5) Generate the code.
    6) Repeat steps 1-5 for Client-specific area as well *choose Environment ->Query Areas -> Client-specific* to change the code there.
    7) Generate the corresponding Query(SQ01) in a similar fashion *Global Area and Client-specific area as mentioned in step 6*
    Reward points if your requirement is met!!
    Thanks,
    Vaishnavi

Maybe you are looking for

  • Can not open a message in E 90

    Hello to everyone!!! my friend have a problem with nokia E 90 becouse he can't open a sms in inbox. He said me that he see a sign like this + (red colour) just above the message. thanks everyone in advance.

  • IPhone downloads the *oldest* 50 mails

    Hi, I created a new mail account and moved all e-mails from my old account to the new one (so to have one inbox where to received mail and from where to look up old e-mails in case I need to). I then created a new inbox on the iPhone (3G v 3.0). When

  • How to Pass the data from the class to the BSP application(ie. .html page)

    hi i had created one .html page. This page is getting opened after clicking on one of the buttton of the toolbar(say Bank Data). Now the problem is , to show the data of the bank which user had entered in the PCUI application on the .html page. Pleas

  • MIGO in case of multiple account assignment.

    Hi, I have created PO with multiple account assignment. AAC is P. While doing MIGO, FI document is not getting generated. Can anyone plz explain how multiple account assignment functionality works? Regards Nilesh

  • Can't change export settings

    Hi again, just fixed crash problem in Blue-Ray loading timeline (thanks Ann), I've another problem. I cannot change export setting. The window let me choose my best solution (example: PAL, 1440x1080, 25fps, high quality.........), click OK, but, if I