JDBC / JTA Timeouts : How to set a timeout on the fetching of a query ?

Hi !
I'm working on an Application running on Weblogic Server 11g. This app executes a query on an Oracle 11g database ...
The problem is that this query returns millions of records ... and the app fetches the results during tens of minutes.
We would like to set a timeout, wich will abandon the transaction, hang the database connection, destroy the socket ... or anything else ...
This timeout will prevent the thread to become in STUCK state and stucking the weblogic managed server.
Is this possible ?
Thank's for your answers.
Steve.
Edited by: 966918 on 10 avr. 2013 07:18

Abandon timeout will not help. That is only used if a database crashes during the second phase of commit. It specifies how long the transaction manager should keep trying to complete the transaction.
JTA timeout will only work if you are using XA datasources and two-phase commit transactions. When the timeout occurs, it guarantees that the transaction cannot be committed. Eventually, all of the participant resources will be notified and will not allow any more work to take place on the transaction. It does not stop the threads and the application must be written to handle exceptions appropriately.
Edited by: Steve Felts on Apr 17, 2013 8:32 AM

Similar Messages

  • How do set operation timeout in tomcat server?

    hi all
    suppose i have one endless loop program(jsp) that program run under tomcat server,
    so it's keep on runing in tomcat server.
    i want, after some time the server send error message like operation timeout.
    how do set operation timeout in tomcat server?
    if anybody know help me.
    my mail id [email protected]

    Well, the server.xml file has connection time outs, but that is for idle time, I think... I'm not sure what would happen in a loop... , especially if you are sending some data back to the client in each iteration. Generally you shouldn't be starting a loop that will really run forever. Maybe have some type of counter to break out if something hasn't occurred within x iterations, or create a separate thread that can sleep for x seconds and set a flag to break the loop after that time.

  • How to set white spaces between the fields in dataset??

    Hi all,
    I am writing a set on information to from infotypes to a text file. Its a fixed width file. How do set white spaces in the fields for dataset?
    Example:
    TYPES: begin of header,
                    filler(40)  type c,
                    id(3)        type c,
                    filler2(7) type  c,
                    delimiter  type  c,
                 end of header.
    DATA header type header.
    header-filler1 = ' '.
    header-id       = '100'.
    header-filler2 = ' '.
    header-delimiter = cl_abap_char_utilities=>newline.   ( do it to get a new line)
    my_table = header.
    append my_table.
    DATA: out_file(256) type C,
          codepage_ref type ref to CX_SY_CONVERSION_CODEPAGE,
          out_char type c,
          size type i,
          insert_string type string,
          insert_size type i.
      out_file = filename.
      open dataset out_file for output in text mode ENCODING NON-UNICODE.
      LOOP AT my_table.
        size = strlen( my_table ).
        insert_string = ''.
        DO size TIMES.
          offset = sy-index - 1.
          try.
              out_char = my_table+offset(1).
              IF out_char = SPACE.
                CONCATENATE insert_string '' INTO insert_string SEPARATED BY SPACE.
              ELSE.
                CONCATENATE insert_string out_char INTO insert_string.
                transfer insert_string to out_file NO END OF LINE .
                insert_string = ''.
              ENDIF.
            catch CX_SY_CONVERSION_CODEPAGE.
              insert_size = strlen( insert_string ) - 1.
              insert_string = insert_string(insert_size).
          endtry.
        ENDDO.
       transfer CL_ABAP_CHAR_UTILITIES=>NEWLINE TO out_file NO END OF LINE.
      ENDLOOP.
      close dataset out_file.
    How do I get to insert the space for filler1 and filler2?
    Edited by: Siong Chao on Oct 4, 2011 4:56 AM
    Edited by: Siong Chao on Oct 4, 2011 8:27 AM
    Edited by: Siong Chao on Oct 4, 2011 8:29 AM

    problem lies in the open dataset codes
    Used:
    open dataset out_file for output in text mode encoding non-unicode message msg.
    if sy-subrc= 0.
    loop at my_table.
    transfer my_table to out_file
    transfer cl_abap_char_utilities=>newline to out_file no end of line.
    endloop.

  • How to set a song in the playlist to be phone ringtone

    how to set my song in the playlist to be my ringtone

    you have to convert it to a ringtone first. searching google will give you many ways to do it. also, there are some ringtone apps with pros and cons to each one. you cannot just pick a song on your phone and make it a ringtone unfourtunately.

  • How to set a cookie in the browser from an html page called via an Iview

    How to set a cookie in the browser from an html page called via an Iview
    Hello all,
    I have an issue which is causing problems. I have a snap survey (html form with submit and cookie setting) which is embedded in a url iview.
    Although the submit and the form work fine, the portal will not allow the cookie to be set it seems.
    Is there a way to allow cookies to be set from an embedded page in a url iview??
    You will make my day if you know!
    System: EP7 SP13
    Kind regards
    Alex

    Hi,
    Check this:
    http://www.oracle.com/technology/products/ias/portal/html/same_cookie_domain_with_pdkv2.html
    Cookie Basics
    Web browsers have built in rules for receiving and sending cookies. When a browser makes a request to a web server and the web server returns cookies with the response, the browser will only accept a cookie if the domain associated with the cookie matches that of the original request. Similarly, when a browser makes a subsequent request, it will only send those cookies whose domain matches that of the target web server.
    These rules are designed to ensure that information encoded in cookies is only "seen" by the web server(s) that the originator of the cookie intended. These rules also ensure that the cookie cannot be corrupted or imitated by another server. By default, the domain associated with a cookie exactly matches that of the server that created it. However, it is possible to modify the domain at the time the cookie is created. Relaxing the cookie domain increases the scope of the cookie's visibility making it available to a wider "audience" of web servers.
    For example, if a cookie is created by a.us.oracle.com, it's domain will usually be set to a.us.oracle.com. This means that the browser will only send the cookie to a.us.oracle.com. It will never send it to any other servers. However, if at the time of creation, the domain of the cookie is set to .us.oracle.com, the browser will send the cookie to any server whose domain falls within .us.oracle.com. such as portal.us.oracle.com, provider.us.oracle.com, app.us.oracle.com etc
    Regards,
    Praveen Gudapati

  • TS4006 how to set a tracking from the computer if someone stolen the ipod

    how to set a tracking from the computer if someone stolen the ipod

    Welcome to the Apple Community.
    You can only locate your device when it is logged into iCloud and 'Find My Phone' is enabled, additionally the device will need to be switched on and connected to a wifi or cellular network.
    Unfortunately, you cannot activate iCloud or 'Find My Phone' remotely.

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • How to set default values on the screen painter parameters?

    Hello ABAP Gurus,
    I would just want to ask how to set default values on the screen painter parameters.
    Thank you for your replies.

    Hi,
    To set default values for screen painter parameters initialize the field names with default values in the PBO module....
    say u have the field name as f_field1....
    in the PBO of that screen initialize it....
    f_field1 = '100'  "here 100 is the default value.
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

  • C How to Set Isolation Level in the Connection String

    How to Set Isolation Level in the Connection String using the "Microsoft OLE DB Provider for DB2 Version 4.0"?
    We are trying to move from Crystal Reporting that run against a IBM DB2 database on a mainfram to SSRS reporting and we have downloaded the "Microsoft OLE DB Provider for DB2 Version 4.0" and then worked with the DB2 Administrator to create the
    Packages.  We only have access to use the "Read Uncommitted ("MSUR001") package.   We were able to connect and pull data before he removed access to the other packages, but after setting access the Connection keeps trying to use
    the 'Cursor Stability (MSCS001)" package.   How do we change the Default to the "Read Uncommitted ("MSUR001") package???   Since it is keeps defaulting to the the other package
    we can't connect to do it in the T-SQL query, it has to be set at the Connection String level.

    Hi Dannyboy1263,
    According to your description, you want to set the Transaction Isolation Level in Connection String. Right?
    In Reporting Services, the Connection String for OLE DB Connection can only contains Provider, Data Source and Initial Catalog. There's no property for setting Transaction Isolation Level in the Connection String. Based on my knowledge, we can
    only set the Transaction Isolation Level at Query level or set it by using code (C#, VB, Java...) to call the property of Connection. So unfortunately your requirement can't be achieved currently.
    Reference:
    OLE DB Connection Type (SSRS)
    Data Connections, Data Sources, and Connection Strings in Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to set Password change in the WAD Browser

    Hello All
    Before dropping my question i will explain you what was the Real scenario, i am using WAD 3.50 Version and server is BW 3.0B.we are not using portal, and Enduser will view the reports in the browser through the WAD execute Http link.
    Question.
    whenever the enduser uses Http link of web template in the browser, he will connect through VPN and they can able view the reports. the question is *Some system Enduser won't have SAPGUI in their system so they wants to change the password because they won't know even if it is expire.
    Please Help me how to set Change Password in the browser for the WAD Application*.

    To do this you will have to use either make use of portal or BSP application or Dynpro..
    It is not possible for the user to change the password just from the web query

  • Can anybody tell me how I set an hiperlink in the new Adobe Muse CC 2014...

    Can anybody tell me how I set an hiperlink in the new Adobe Muse CC 2014...?

    Check out: http://helpx.adobe.com/muse/using/creating-hyperlinks.html
    Cheers,
    Vikas

  • How to set InDesign CS5 as the default in the system having InDesign CS4 has the default ?

    How to set InDesign CS5 as the default .indd application when you have InDesign CS4 and CS5 installed and InDesign CS4 is the current default (InDesign CS4 was installed after CS5 installation)

    Thanks, but I already tried it at first but it is not the effective method.
    I think its because of the this reason :
    Both - InDesign CS4 and InDesign CS5 have their application/program/exe named as "indesign.exe".
    Installation of either InDesign CS4 or InDesign CS5, sets a Windows default path for the "indesign.exe". In this case, since InDesign CS4 was installed later (after InDesign CS5 was already installed), the "indesign.exe" which was directing InDesign CS5's "indesign.exe" was replaced by InDesign CS4's "indesign.exe".
    But after long google and search through regedit, I've got the solution :
    Locate HKEY_CLASSES_ROOT\InDesign.Document\Shell\Open\Command in regedit
    Change the value of (Default) attribute to "C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5\InDesign.exe" "%1"     // Include the quotes
    Message was edited by: Vidit Kothari

  • Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place. Tks

    Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place? I know there are different possibilities to set.
    I tried but it not helped for me. What I can do? How and where can set this they stay on their place?
    Thanks.
    laci

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

  • How to set HttpURLConnection timeout while reading a stream?

    I want it got time out if the connection if lose while i read a stream from URL
    try {
         int timeout = 700;
         HttpURLConnection connection = (HttpURLConnection) downloadURl.openConnection();
         connection.setConnectTimeout(timeout);
         connection.setRequestProperty("Range","bytes=" + downloaded + "-");
         connection.connect();
         if (connection.getResponseCode() / 100 != 2) {
              error();
         int contentLength = connection.getContentLength();
         if (contentLength < 1) {
              error();
         if (status == DOWNLOADING){
              if (size == -1) {
                   size = contentLength;
              file = new RandomAccessFile(saveTmpName+".tmp", "rw");
              file.seek(downloaded);
         byte buffer[];
         stream = connection.getInputStream();
    connection.setReadTimeout(timeout);
         while (status == DOWNLOADING) { 
              if (size - downloaded > MAX_BUFFER_SIZE) {
                   buffer = new byte[MAX_BUFFER_SIZE];
              } else {
                   buffer = new byte[(int)(size - downloaded)];
              int read = stream.read(buffer); // how to set timeout while it is reading stream
              if (read <= 0)
                   break;
              file.write(buffer, 0, read);
              downloaded += read;
         if (status == DOWNLOADING) {
              status = COMPLETE;
    } catch (SocketTimeoutException  e) {
         error();
    } catch (IllegalArgumentException e) {
         error();
    } catch (Exception e) {
         error();
    } finally {
         if (file != null) {
              try {
                   file.close();
              } catch (Exception e) {}
         if (stream != null) {
              try {
                   stream.close();
              } catch (Exception e) {}
    }I try to set "setReadTimeout()" but is still not through timeout Exception

    ejp wrote:
    Because, there's no FTP client command that allows to do such thing.Socket.setSoTimeout().I agree with you on this one but the OP is talking about the FTPClient API from Apache.
    To the OP,
    BTW, I have reread the Javadoc about the [*API*|http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html] : indeed, there's no setTimeout method, but there is a setDataTimeout method : +Sets the timeout in milliseconds to use when reading from the data connection+ .

  • How to set command timeout for table object?

    I have a report that is generating an error during rendering in a CrystalReportViewer control (v10.5).  The error is "Failed to open a rowset." which appears to be caused by a timeout.  I'm currenlty setting the connection info and location of the sproc programmatically.  How can I set the command timeout as well?  Can I set this via the Attributes collection of the ConnectionInfo object?  (This appears to be a command timeout, not a connection timeout, which I'm already including in the Attributes collection of the ConnectionInfo object and setting at 15 seconds.  I've tried making this as much as 60 seconds but it doesn't change the behavior.)

    The error message includes text that states the timeout was exceeded (in bold below)...
    CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Timeout expired
    SQL State: HYT00Error in File J:\DOCUME1\ADMINI1\LOCALS~1\Temp\SpecificationSummaryReport {42EDFEA3-DD0D-4F5E-BC0B-F9CC1126A872}.rpt:
    Failed to open a rowset. ---> System.Runtime.InteropServices.COMException (0x800002D3): Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Timeout expired
    SQL State: HYT00Error in File J:\DOCUME1\ADMINI1\LOCALS~1\Temp\SpecificationSummaryReport {42EDFEA3-DD0D-4F5E-BC0B-F9CC1126A872}.rpt:
    Failed to open a rowset.
    1)  Is there a Service Pack for CR 10.5???  That is the runtime that is in use - not XI.
    2)  The report viewer app is in version 10.5 (as mentioned in the first post) but the report was created in the designer for version 11.  Before we assume that is a problem - I have other reports created this way that work fine.
    3)  The data source is SQL 2005.
    4)  The connection type is OLE DB - Microsoft OLE DB provider for SQL Server.
    I think the issue is due to corruption in the report file.  I've seen this many times with reports (over the last 10 years).  I've had reports that refuse to work but if I recreate them from scratch the new report works fine.  In fact, I've recreated the data portion of this report (using the same sprocs) and that one works.

Maybe you are looking for

  • Audio stereo signal split into 3 or 4 stereo audio signals (in one single clip)?

    Hi, facing massice transcoding issues when exporting a project I had to analyse the involved video/audioclips... and found out that for some of the video clips the audio signals have been split into even 3 or 4 complementary stereo channels. Note: Ea

  • Error while creating a scheduler

    Hi, I have created a scheduler to reconcile the data from trusted resource. It ran fine yesterday and was pushing users in OIm. Now I am not able to push the users. 2nd record has been deleted for OIM console, thereofre it is throwing below error: or

  • Opening a pdf in browser

    I'm unable to open pdf's in mozilla firefox. Opens fine in other browsers like Chrome and Safari. Solution? Tried add ons, doesn't work. Thanks

  • Old generation Apple TV loses wireless connection

    I have an older gen Apple TV (silver).  Recently it upgraded the software...can't remember if it's ever been updated prior to that.  I've had it for at least 3 years...no problems connecting to the internet.  Now it loses connection once per day...go

  • Can't download fro ITunes

    I can access ITunes and the music store but when I try to download anything ITunes tells me its accessing music store and just carries on like this forever and never downloads anything. Help!!!!!!