Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean isItemProcessing = false;
- public void scanConsolidationShelf(String shelfLabel, boolean isStrictAdvisingMode) {
- if (isItemProcessing) {
- return;
- }
- try {
- if (consolidationShelfName.isPresent() && !consolidationShelfName.equals(fromNullable(shelfLabel))) {
- if (isStrictAdvisingMode) {
- throw new LMException(CONSOLIDATION_WRONG_SHELF, shelfLabel, consolidationShelfName.get());
- }
- }
- this.consolidationShelfName = fromNullable(shelfLabel);
- isItemProcessing = true;
- consolidationFacade.putItemInConsolidationShelf(shelfLabel, itemLabel.get());
- } catch (EJBTransactionRolledbackException e) {
- throw new LMException(e, CONSOLIDATION_WRONG_SHELF, shelfLabel, getAssignedConsolidationShelf());
- } finally {
- isItemProcessing = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement