Results 1 to 2 of 2
  1. #1
    turanan is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Handling Weblogic server crash


    Here is my problem. I want to deploy a Java application to a Weblogic server. This application fetches contacts from the database in batches, 100 contacts at a time. When a batch is processed, all the contacts are updated with the status 'Processed' in the database and another 100 contacts are fetched.

    Now, my concern is - what happens if the application has processed, lets say, 70 contacts, and then the Weblogic server crashed. I have a startup class defined which will restart my application on server restart. However, since those 70 contacts that were processed were not updated in the database as "Processed", they will be fetched again and processed again which is unacceptable.

    What I want is to somehow be able to reinitialize and get my 100 contacts back into the application, without loosing the knowledge of which contacts were and were not processed.

    The simplest way I know how this can be done is by updating each contact right after it has been processed. However, this is pretty heavy on the database.

    If anyone else has encountered such a problem and knows another way to audit the changes made, or any other way of solving this problem, please share.


  2. #2
    pandeyvic is offline Member
    Join Date
    Jan 2011
    Rep Power

    Smile You need to know Transaction

    Application servers support transaction, Weblogic has quite good support for it. you just need to put you code in a transaction so that it can be treated as a single unit of work. even you can use database commit mechanism

Similar Threads

  1. Migrating Application from weblogic 8.1 to weblogic 10.0 - Urgent
    By phanindar in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 01-07-2011, 09:47 PM
  2. Replies: 0
    Last Post: 08-20-2010, 01:24 PM
  3. I cannot use WebLogic server in Eclipse Europa
    By jason.3dmagic in forum Eclipse
    Replies: 1
    Last Post: 02-17-2010, 12:01 PM
  4. Replies: 12
    Last Post: 02-17-2010, 08:50 AM

Posting Permissions

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