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

(-)java/org/apache/catalina/session/JDBCStore.java (-1 / +6 lines)
Lines 867-872 Link Here
867
            return dbConnection;
867
            return dbConnection;
868
868
869
        if (dataSourceName != null && dataSource == null) {
869
        if (dataSourceName != null && dataSource == null) {
870
            org.apache.catalina.Context context = getManager().getContext();
871
            ClassLoader oldThreadContextCL = context.bind(Globals.IS_SECURITY_ENABLED, null);
872
870
            Context initCtx;
873
            Context initCtx;
871
            try {
874
            try {
872
                initCtx = new InitialContext();
875
                initCtx = new InitialContext();
Lines 876-882 Link Here
876
                manager.getContext().getLogger().error(
879
                manager.getContext().getLogger().error(
877
                        sm.getString(getStoreName() + ".wrongDataSource",
880
                        sm.getString(getStoreName() + ".wrongDataSource",
878
                                this.dataSourceName), e);
881
                                this.dataSourceName), e);
879
           }
882
            } finally {
883
                context.unbind(Globals.IS_SECURITY_ENABLED, oldThreadContextCL);
884
            }
880
        }
885
        }
881
886
882
        if (dataSource != null) {
887
        if (dataSource != null) {

Return to bug 61366