Results 1 to 5 of 5
  1. #1
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default Stored Procedures with java

    I must do an application J2EE to execute stored procedures, that is a hugh problem, because I really know how can I do that, but my question is the following one:

    There are stored procedures that delay long time in finishing processing, for example 5 minutes (I have one delays 20 hours), time in which my application could fall by timeout.
    The call to the procedure I am doing it within bean, my question is if somebody knows some form to cause that the application leaves to bean running the procedure, while I show a "in progress" screen so that once it finishes the application shows a final window with the summary of the process.
    It was thinking to use threads.

    Some suggestion?

    Albert:rolleyes:

  2. #2
    Felissa is offline Member
    Join Date
    Jun 2007
    Posts
    95
    Rep Power
    0

    Default

    My suggestion goes by the side of the data base. If this to your reach to modify the stored procedure, or the design of the data base,
    (I either do not have idea of the logical design of the data base ) but first I suggest to you you could not be denormalize the data base with the purpose of improving the times of the consultation.

    Perhaps you should have tables with some totals already calculated. You could update the tables “automatically” with triggers on the INSERT/DELETE/UPDATE the present tables of querys. This is going to make a little bit slower the update of the tables, but you can improve the times of the consultations.

    Which is your motor of data base?

    Felissa

  3. #3
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default

    I am working with oracle 10g, now the subject of procedures, lamentably are one that I cannot touch and that are delayed enough, in average one hour, and is executed weekly.

    Albert

  4. #4
    Eric is offline Senior Member
    Join Date
    Jun 2007
    Posts
    111
    Rep Power
    0

    Default

    If you have access to the data base, you can denormalize the design of the logical structure of the data base.

    if the Stored Procedures runs weekly, I suppose that it is batch… isn't it?
    You could leave the results in temporary tables, and what it is consulted they are these temporary tables, that become to be above every week.
    The bad thing of this you have the information one week late; although depending on the necessities of the logic of the business, could be acceptable.
    Greetings,

    Eric

  5. #5
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default

    Thanks to all, I comment as I solved my problem in case somebody needs help:

    finally I create a model in the data base where I save my process that desire to execute from the application WEB,

    and a program in java that is called from a shell through crontab that executes these processes, thus can be running in the server

    To know how it goes the progress of the single procedure I consult the state of the scheduler table,

    which is by_toexecute, inexecution, executedOk and executedwitherror.

    Albert

Similar Threads

  1. Executing stored procedures
    By mew in forum JDBC
    Replies: 3
    Last Post: 08-20-2008, 06:47 PM
  2. unable to exceute stored procedures
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 03:39 AM
  3. Stored Procedures
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 03:34 AM
  4. stored procedures in Hibernate
    By Alan in forum JDBC
    Replies: 2
    Last Post: 05-31-2007, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •