If an error occurs while processing a batch of lines, the transaction is rolled back. The loader sets the status property of the loaderProgress item to “failed,” and sets the statusDetail property to a string describing the failure. Once you have resolved the problem, you can reinitiate the load process by clicking the Return to Queue link in the entry for the failed load in the Component Browser. This changes the value of the status property to “in progress,” so the loader will attempt to continue processing the file when the next schedule load time arrives. Alternately, you can use the loadAllAvailable method to start loading immediately.

The Loader class implements logic that enables it to deal with failures such as a JVM crashes. Before a loader component looks in the queue for a file to load, it first looks for loaderProgress items whose status properties are set to “in progress.” If the loader finds a loaderProgress item in this state, it uses the ClientLockManager to try to obtain a lock on the item. If the lock is not granted, this means some other process has the lock, and is currently loading the file (for instance, if there is separate instance of the same loader running on another Oracle ATG Web Commerce instance).

If the lock is granted, this means that either a loader crashed earlier while loading the file (leaving the loaderProgress item in this state), or that a load failed and the associated Return to Queue link was subsequently clicked. In this situation, the loader will continue loading the file, starting from the first record that has not yet been successfully processed.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices