View | Details | Raw Unified | Return to bug 62175
Collapse All | Expand All

(-)a/java/org/apache/catalina/session/PersistentManagerBase.java (-15 / +20 lines)
Lines 709-728 public abstract class PersistentManagerBase extends ManagerBase Link Here
709
            if (session == null) {
709
            if (session == null) {
710
                try {
710
                try {
711
                    if (SecurityUtil.isPackageProtectionEnabled()){
711
                    if (SecurityUtil.isPackageProtectionEnabled()){
712
                        try {
712
                        session = securedStoreLoad(id);
713
                            session = AccessController.doPrivileged(
714
                                    new PrivilegedStoreLoad(id));
715
                        } catch (PrivilegedActionException ex) {
716
                            Exception e = ex.getException();
717
                            log.error(sm.getString(
718
                                    "persistentManager.swapInException", id),
719
                                    e);
720
                            if (e instanceof IOException){
721
                                throw (IOException)e;
722
                            } else if (e instanceof ClassNotFoundException) {
723
                                throw (ClassNotFoundException)e;
724
                            }
725
                        }
726
                    } else {
713
                    } else {
727
                         session = store.load(id);
714
                         session = store.load(id);
728
                    }
715
                    }
Lines 769-774 public abstract class PersistentManagerBase extends ManagerBase Link Here
769
    }
756
    }
770
757
771
758
759
    private Session securedStoreLoad(String id) throws IOException, ClassNotFoundException {
760
        try {
761
            return AccessController.doPrivileged(
762
                    new PrivilegedStoreLoad(id));
763
        } catch (PrivilegedActionException ex) {
764
            Exception e = ex.getException();
765
            log.error(sm.getString(
766
                    "persistentManager.swapInException", id),
767
                    e);
768
            if (e instanceof IOException){
769
                throw (IOException)e;
770
            } else if (e instanceof ClassNotFoundException) {
771
                throw (ClassNotFoundException)e;
772
            }
773
        }
774
        return null;
775
    }
776
777
772
    /**
778
    /**
773
     * Remove the session from the Manager's list of active
779
     * Remove the session from the Manager's list of active
774
     * sessions and write it out to the Store. If the session
780
     * sessions and write it out to the Store. If the session
775
- 

Return to bug 62175