<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    9910

    單飛

       :: 首頁 :: 聯系 :: 聚合  :: 管理

    #

         摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><script type="text/javascript">/**  * 時間對象的格式化;  */  Dat...  閱讀全文
    posted @ 2012-12-06 11:36 單飛 閱讀(8554) | 評論 (2)編輯 收藏

    /db/flare/flare/bin/flared --daemonize --data-dir /db/flare/data/proxy/ --index-server-name 127.0.0.1 --index-server-port 12120 --server-name 127.0.0.1 --server-port 11211
    /db/flare/flare/bin/flared --daemonize --data-dir /db/flare/data/master1/ --index-server-name 127.0.0.1 --index-server-port 12120 --server-name 127.0.0.1 --server-port 11212  
    /db/flare/flare/bin/flared --daemonize -f /db/flare/flare/etc/flare-proxy.conf
     
    data-dir = /db/flare/data/proxy
    index-server-name = localhost
    index-server-port = 12120
    log-facility = local1
    server-name = localhost
    server-port = 11211
     
    1.查看flare日志:
    [flare@server logs]# vi /etc/syslog.conf

    # falre logs
    local0.*                                                /opt/logs/flare-index.log
    local2.*                                               /opt/logs/flare-master.log
    local1.*                                               /opt/logs/flare-proxy.log
     
     
    [flare@server flare]$ cd /opt/logs/
    [flare@server logs]$ ll
    總計 15836
    -rw------- 1 flare flare 11889779 09-10 10:16 flare-index.log
    -rw------- 1 flare flare    23490 09-04 17:15 flare-master.log
    -rw------- 1 flare flare  4270801 09-10 09:55 flare-proxy.log
     
     
    分析日志查詢為啥起不起來。

    [flare@server logs]# tail -f flare-proxy.log
     
    2.查看端口是否被占用
    [flare@server logs]# lsof -i:11212
    [flare@server logs]# lsof -i:11211
    [flare@server logs]# lsof -i:11210

    3.查看tmp臨時目錄文件是否正常
    vi /db/flare/tmp/flare.xml
    發現改文件損壞,從備份程序拷貝
    cp /opt/flare/tmp/flare.xml /db/flare/tmp/


    啟動成功
    posted @ 2012-11-21 10:40 單飛 閱讀(427) | 評論 (0)編輯 收藏

    cccccccccccccccccccccccccccccccccccccc
    posted @ 2012-11-20 13:52 單飛 閱讀(718) | 評論 (0)編輯 收藏

    《蔡康永的說話之道》
    《內向者的無敵》
    《餐巾紙的背面》
    《筆仙》
    《尋人啟事》
    《你的知識需要管理》
    《內向者的優勢》
    《把時間當做朋友》
    《氣場》
    《如何消除內心的恐懼》
    《哪來的天才》
    《一萬小時理論》
    《番茄工作法》
    《淡定的力量》
    《Your money brother》
    《思考的技術》
    《暗時間》
    posted @ 2012-11-20 09:15 單飛 閱讀(368) | 評論 (0)編輯 收藏

    1 private static String getMethodName(String fildeName){
    2 byte[] items = fildeName.getBytes();
    3 items[0= (byte)((char)items[0]-'a'+'A');;
    4 return new String(items);
    5 }


    效率是最高的.
    posted @ 2012-03-20 17:15 單飛 閱讀(2893) | 評論 (1)編輯 收藏

    在開發環境,只能用localhost (本機機器名) 來訪問站點,因為在DotNet環境下,
    域名的設置不能單單通過設置hosts文件實現,必須在IIS里面配置。
    另外:
     <casClientConfig
            casServerLoginUrl="https://××××.net:8443/cas/login"
            casServerUrlPrefix="https://××××.net:8443/cas/"
            serverName="http://localhost:1054/CasTest"

    如果serverName 配置不當也會導致循環重定向。
    在確定

    <sessionState mode="StateServer" cookieless="UseCookies" timeout="36000"></sessionState>

    配置沒有問題的時候,可能因為serverName 的配置問題導致循環重定向。
    CasAuthentication.cs
       internal static void ProcessRequestAuthentication()
            {
                HttpContext context = HttpContext.Current;

                // Look for a valid FormsAuthenticationTicket encrypted in a cookie.
                CasAuthenticationTicket casTicket = null;
                FormsAuthenticationTicket formsAuthenticationTicket = GetFormsAuthenticationTicket();
                if (formsAuthenticationTicket != null)
                {
                    ICasPrincipal principal;
                    if (ServiceTicketManager != null)
                    {
                        string serviceTicket = formsAuthenticationTicket.UserData;
                        casTicket = ServiceTicketManager.GetTicket(serviceTicket);
                        if (casTicket != null)
                        {
                            IAssertion assertion = casTicket.Assertion;

                            if (!ServiceTicketManager.VerifyClientTicket(casTicket))
                            {
                                Trace.WriteLine(String.Format("{0}:Ticket failed verification." + Environment.NewLine, CommonUtils.MethodName));

    這里是調試的斷點設置。
    posted @ 2012-03-13 14:26 單飛 閱讀(3245) | 評論 (1)編輯 收藏

    catalina.sh

    JAVA_OPTS="$JAVA_OPTS
    -server -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M -Xms2200m
    -Djava.rmi.server.hostname=172.16.4.200
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=9004
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false"

    增加一行配置.
    可以使用jconsole 來遠程連接,查看內存使用.服務器端,應用所需的內存,最好一次申請到位,即使不用也要占著
    posted @ 2012-02-23 12:52 單飛 閱讀(367) | 評論 (0)編輯 收藏

    參考
    http://gwt-ext.com/forum/viewtopic.php?t=1682


    import com.google.gwt.user.client.rpc.RemoteService;
    import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

    @RemoteServiceRelativePath("sessout")
    public interface MyService extends RemoteService {
        public Integer getUserSessionTimeoutMillis();
    }


    import com.google.gwt.user.client.rpc.AsyncCallback;

    public interface MyServiceAsync {
        void getUserSessionTimeoutMillis(AsyncCallback async);
    }



    import com.google.gwt.user.server.rpc.RemoteServiceServlet;

    @SuppressWarnings("serial")
    public class MyServiceImpl extends RemoteServiceServlet implements MyService {

        public Object getLoggedInUser() {
            return getThreadLocalRequest().getSession().getAttribute(EConstants.USER);
        }

        /**
         * Should be the first RPC call from all UIDef*.onModuleLoad()
         *
         * @return java.lang.Integer (-1 if the user session has already timed out,
         *         otherwise, the number of milliseconds)
         */
        public Integer getUserSessionTimeoutMillis() {
            Integer returnObj = null;
            if (getLoggedInUser() != null) {
                returnObj = new Integer(EduConstants.SESSION_TIMEOUT_MILLIS); // milliseconds
            } else {
                returnObj = new Integer(-1);
            }
            return returnObj;
        }
    }

    public class EConstants {

        public static final String USER = "sessuser";

        public static final int SESSION_TIMEOUT_MILLIS = 1800; // 30 minute
    }


    web.xml

      <servlet>
        <servlet-name>sessServlet</servlet-name>
        <servlet-class>com.chinaedu.edupass.server.MyServiceImpl</servlet-class>
      </servlet>
     
      <servlet-mapping>
        <servlet-name>sessServlet</servlet-name>
        <url-pattern>/ldapmanager/sessout</url-pattern>
      </servlet-mapping>


    public class LManager implements EntryPoint {


        private Timer sessionTimeoutTimer = null;
    private MyServiceAsync service;
    public void onModuleLoad() {

    service = (MyServiceAsync) GWT.create(MyService.class);

            showLogin();
    }

    private void showLogin() {
            final LoginDialog dialog = new LoginDialog() {
                protected void showMainView() {
                    super.showMainView();
                    doShowMainView();
                    // 登錄后開始計時
                    initSessionTimers();
                }

            };
            dialog.setAutoCenter(true);
            dialog.setIsModal(true);
            dialog.setShowHeader(false);
            dialog.setShowToolbar(false);
            dialog.setEdgeSize(10);
            dialog.setWidth(300);
            dialog.setHeight(180);

            dialog.show();
        }


        private void doShowMainView() {


    /**
         * 客戶端在超時后執行跳轉登錄
         *
         * @sessionTimeInMillis Integer
         */
        private void initSessionTimers() {
            // Allow 30 seconds to get the RPC call constructed and called.
            sessionTimeoutTimer = new Timer() {
                public void run() {
                    service.getUserSessionTimeoutMillis(new AsyncCallback() {
                        public void onSuccess(Object result) {
                            int sessionTimeMillis = ((Integer) result).intValue();
                            if (sessionTimeMillis == -1) {
                                // 超時后執行跳轉到登錄窗口
                                displaySessionTimedOut();
                            } else {
                                sessionTimeoutTimer.cancel();
                                initSessionTimers();
                            }
                        }

                        public void onFailure(final Throwable caught) {
                            SC.say(LdapI18N.ldapMessages().failed());
                        }
                    });
                }
            };
            // 31 minutes 服務器端設置為30分鐘超時,如果30分鐘沒有操作
            // 就會返回超時,如果期間有操作,則在等31分鐘后再輪詢
            sessionTimeoutTimer.schedule(31*60*1000);

        }

        private void displaySessionTimedOut() {
            SC.say(LI18N.ldapMessages().sessionTimeOut(), new BooleanCallback() {
                public void execute(Boolean value) {
                    showLogin();
                }
            });
        }
    posted @ 2011-08-03 18:18 單飛 閱讀(698) | 評論 (0)編輯 收藏

    GWT SmartGWT
    1.發布到Tomcat/Jetty.
        在發布之前需要使用Eclipse中的GWT-Compile
        選中工程->右鍵菜單-Google-GWT Comile
        編譯后的文件在/war 目錄下面,拷貝此文件到Tomcat的Webapp下面就可以訪問了。


    2.SmartGWT的可用性和GXT相比,差別巨大。
        GXT前端展示非常成熟,具體表現:a.Grid 控件、表單。而SmartGWT 的GridList控件非常簡單,甚至不支持分頁,要自己DIY。
        不推薦使用SmartGWT做項目。

    3.開發上可以只用GWT做前端,使用Hessian來調用另外一個工程的Service,Hessian調用servlet已經封裝的很好。
        在開發上要分為兩個工程:Project-webapp Project-GWT.


    4.編譯后的文件體積有點龐大,至少50M。

    5.具體開發細節可以參<<GWT揭秘>>,里面有很多最佳實踐,另外不要吝嗇銀子,最好使用GXT。
    posted @ 2011-07-27 10:48 單飛 閱讀(790) | 評論 (0)編輯 收藏

    安裝Maven后每次啟動出現警告信息:

    Eclipse is running in a JRE, but a JDK is required
    Some Maven plugins may not work when importing projects or updating source folders.



    直接創建一個快捷方式,加入啟動參數
    -vm D:\server\jdk1.6.0_21\bin\javaw

    修改eclipse.ini好多次都不成功。

    參考幫助文檔:
    eclipse -vm c:\jdk1.4.2\jre\bin\javaw

    終于解決問題了。
    posted @ 2011-07-05 10:12 單飛 閱讀(1218) | 評論 (0)編輯 收藏

    僅列出標題
    共12頁: 上一頁 1 2 3 4 5 6 7 8 9 下一頁 Last 
    主站蜘蛛池模板: 国产亚洲男人的天堂在线观看| 免费看无码特级毛片| 亚洲国产精品成人久久蜜臀| 高清永久免费观看| 亚洲精品视频在线免费| 成人毛片18女人毛片免费96| h片在线观看免费| 亚洲最大黄色网站| 亚洲国产日韩成人综合天堂| 最近中文字幕大全中文字幕免费| 亚洲A∨精品一区二区三区下载 | 中文字幕亚洲综合久久男男| 久久ww精品w免费人成| 国产成人人综合亚洲欧美丁香花 | 亚洲入口无毒网址你懂的| 亚洲AⅤ永久无码精品AA| 久久国产免费观看精品3| 在线观看亚洲免费| 亚洲网站免费观看| 日日噜噜噜噜夜夜爽亚洲精品| 日韩精品无码区免费专区| 在线观看免费播放av片| 国产精品亚洲综合一区在线观看 | 亚洲国产午夜精品理论片在线播放 | 免费看污成人午夜网站| 久久国产免费直播| 无码天堂亚洲国产AV| 亚洲国产电影在线观看| 亚洲精品国产成人片| 亚洲av无码成人精品区| 手机在线免费视频| 99久久人妻精品免费一区| 国产成人无码精品久久久久免费| 日本亚洲免费无线码 | 亚洲中文字幕日本无线码| 国产成人亚洲综合无码精品| 亚洲AⅤ永久无码精品AA| 波多野结衣久久高清免费| 成人免费毛片内射美女-百度| 久久精品成人免费看| 国产精品无码免费专区午夜|