Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2007, 08:40 PM
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-07-2007, 08:58 PM
Member
 
Join Date: Jun 2007
Posts: 95
Felissa is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-08-2007, 06:55 AM
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-08-2007, 06:57 AM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-08-2007, 06:59 AM
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing stored procedures mew Database 2 04-22-2008 04:22 AM
unable to exceute stored procedures geeta_ravikanti Database 1 04-22-2008 03:39 AM
Stored Procedures geeta_ravikanti Database 1 04-22-2008 03:34 AM
Calling stored procedures JavaForums Java Blogs 0 12-24-2007 01:30 PM
stored procedures in Hibernate Alan Database 2 05-31-2007 05:49 PM


All times are GMT +3. The time now is 01:15 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org