From 3724be47b6be2d64062c1257db0607fbd371d917 Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 17 Jul 2018 21:56:48 +0800 Subject: [PATCH] =?UTF-8?q?CORE-113=20Session=E7=AE=A1=E7=90=86=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=94=B9=E8=BF=9B+=E5=88=A0=E9=99=A4=E4=BE=B5?= =?UTF-8?q?=E5=85=A5=E6=80=A7=E5=BC=BA=E7=9A=84=E6=97=A5=E5=BF=97=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=BE=85=E9=87=8D=E6=9E=84=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=9F=BA=E6=9C=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/file/FileFILE.java | 24 +++++++++---------- .../errorinfo/ErrorInfoLogAppender.java | 12 +++++----- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FileFILE.java b/designer-base/src/main/java/com/fr/file/FileFILE.java index 4655ae1f30..decf027f09 100644 --- a/designer-base/src/main/java/com/fr/file/FileFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileFILE.java @@ -1,23 +1,22 @@ package com.fr.file; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; - -import javax.swing.Icon; -import javax.swing.filechooser.FileSystemView; - import com.fr.base.io.XMLEncryptUtils; import com.fr.design.gui.itree.filetree.FileComparator; import com.fr.design.gui.itree.filetree.FileTreeIcon; import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogManager; +import com.fr.general.SessionLocalManager; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; +import javax.swing.*; +import javax.swing.filechooser.FileSystemView; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; + public class FileFILE implements FILE { private File file; @@ -199,12 +198,11 @@ public class FileFILE implements FILE { if (file == null || !file.exists()) { return null; } - FRLogManager.declareResourceWriteStart(file.getAbsolutePath()); java.io.OutputStream out = null; try { out = new FileOutputStream(file); } catch (Exception e) { - throw FRLogManager.createLogPackedException(e); + throw SessionLocalManager.createLogPackedException(e); } return out; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index 74b36372b5..46efc15814 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -4,19 +4,19 @@ import com.fr.base.io.IOFile; import com.fr.base.io.XMLReadHelper; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; -import com.fr.general.FRLogManager; +import com.fr.general.SessionLocalManager; import com.fr.general.Inter; -import com.fr.general.LogDuration; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; +import com.fr.stable.web.SessionProvider; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; import com.fr.third.apache.log4j.AppenderSkeleton; import com.fr.third.apache.log4j.Level; import com.fr.third.apache.log4j.spi.LoggingEvent; -import com.fr.web.core.SessionDealWith; -import com.fr.web.core.SessionIDInfor; +import com.fr.web.core.SessionPoolManager; +import com.fr.web.core.TemplateSessionIDInfo; import com.fr.workspace.WorkContext; import java.io.ByteArrayInputStream; @@ -96,13 +96,13 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { } private String readTemplateID() { - LogDuration logDuration = FRLogManager.getSession(); + SessionProvider logDuration = SessionLocalManager.getSession(); if (logDuration == null) { return StringUtils.EMPTY; } String sessionID = logDuration.getSessionID(); - SessionIDInfor infor = SessionDealWith.getSessionIDInfor(sessionID); + TemplateSessionIDInfo infor = SessionPoolManager.getSessionIDInfor(sessionID, TemplateSessionIDInfo.class); if (infor == null) { return StringUtils.EMPTY; }