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

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

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

    隨筆-13  評論-9  文章-9  trackbacks-0
      2007年2月16日

    正常的cookie只能在一個應用中共享,即一個cookie只能由創建它的應用獲得。
    1.可在同一應用服務器內共享方法:設置cookie.setPath("/");
    本機tomcat/webapp下面有兩個應用:cas和webapp_b,
    1)原來在cas下面設置的cookie,在webapp_b下面獲取不到,path默認是產生cookie的應用的路徑。
    2)若在cas下面設置cookie的時候,增加一條cookie.setPath("/");或者cookie.setPath("/webapp_b/");就可以在webapp_b下面獲取到cas設置的cookie了。
    3)此處的參數,是相對于應用服務器存放應用的文件夾的根目錄而言的(比如tomcat下面的webapp),因此cookie.setPath("/");之后,可以在webapp文件夾下的所有應用共享cookie,而cookie.setPath("/webapp_b/");是指cas應用設置的cookie只能在webapp_b應用下的獲得,即便是產生這個cookie的cas應用也不可以。
    4)設置cookie.setPath("/webapp_b/jsp")或者cookie.setPath("/webapp_b/jsp/")的時候,只有在webapp_b/jsp下面可以獲得cookie,在webapp_b下面但是在jsp文件夾外的都不能獲得cookie。
    5)設置cookie.setPath("/webapp_b");,是指在webapp_b下面才可以使用cookie,這樣就不可以在產生cookie的應用cas下面獲取cookie了
    6)有多條cookie.setPath("XXX");語句的時候,起作用的以最后一條為準。
    6)設置多個path的方法???

    2.跨域共享cookie的方法:設置cookie.setDomain(".jszx.com");
    A機所在的域:home.langchao.com,A有應用cas
    B機所在的域:jszx.com,B有應用webapp_b
    1)在cas下面設置cookie的時候,增加cookie.setDomain(".jszx.com");,這樣在webapp_b下面就可以取到cookie。
    2)這個參數必須以“.”開始。
    3)輸入url訪問webapp_b的時候,必須輸入域名才能解析。比如說在A機器輸入:http://lc-bsp.jszx.com:8080/webapp_b,可以獲取cas在客戶端設置的cookie,而B機器訪問本機的應用,輸入:http://localhost:8080/webapp_b則不可以獲得cookie。
    4)設置了cookie.setDomain(".jszx.com");,還可以在默認的home.langchao.com下面共享。
    5)設置多個域的方法???
    最近的工作經常用到cookie,看了一些資料,雖然原來依賴cookie比較多的方案已經改成現在這個了,但是當時看得一些東西還是最好記下來,免得過些天就一干二凈了,怪可惜的。老梁說過這樣的文字最好不要是純文本的,說得是。本來就已經很抽象了,最好弄點圖表,就算用123列出來也好

    posted @ 2007-10-30 09:10 Dragonofson 閱讀(9317) | 評論 (5)編輯 收藏

    對于spring-modules-jbpm31對jbpm的支持。我開篇就想說一個"暈"字。看完了springmodules自己的說明文檔。進行配置后。再查看源碼。發現很多配置華而不實。比如:jbpmTemplate的配置。

    bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate">
            <constructor-arg index="0" ref="jbpmConfiguration"/>
            <constructor-arg index="1" ref="websaleWorkflow"/>
        </bean>

       <constructor-arg index="1" ref="websaleWorkflow"/>的配置。根本就沒有很好的必要性。從源碼就可以看出來。
    而且jbpmTemplate對獲取jbpmcontext的封裝做的不好。在web程序里面。總是會出現錯誤。不是session關閉就是session不能提交。獲取不能很好的獲取流程對象。


    個還好。還有地方需要部署的文件根本就沒部署上去
     <bean id="websaleWorkflow" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean">
            <property name="definitionLocation"    value="classpath:com/telemd/jbpm/processdefinition.xml"/>
        </bean>

    這里只部署了配置文件。圖形文件沒有部署上去。結果流程圖根本顯示不出來。調試了好久。

    不過整體來說還有一點好處是:
     <handler  config-type="bean" class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy">
           <targetBean>aduitDecide</targetBean>
                   <factoryKey>jbpmConfiguration</factoryKey>
      </handl>

    可以把jbpm的action類、handle類。通過spring容器來管理。而不是直接部署到數據庫端。可以更好的跟業務相結合
    posted @ 2007-06-19 09:49 Dragonofson 閱讀(2607) | 評論 (1)編輯 收藏

    手動發布JBPM默認Demo到Tomcat和MySQL

    關鍵字: JBoss   jbpm    
    Step 1 下載 jbpm-starters-kit-3.1.4 ,減壓: D:\jbpm-starters-kit-3.1.4
    Step 2 Eclipse (已經安裝了 jbpm-designer 插件)里導入工程 D:\jbpm-starters-kit-3.1.4\jbpm ,如下圖:這時,你可以看到 JBPM 的源代碼和 Demo 的代碼。
    jbpmeclipse.gif
    Step 3
    下載 mysql, 并且讓它啟動(參考如何啟動 Mysql 的資料),創建一個數據庫 jbpmdb 。并且執行腳本: D:\jbpm-starters-kit-3.1.4\jbpm-db\build\mysql\scripts\mysql.create.sql
    Step 4 添加 Demo 默認的用戶數據,執行下面的腳本:
    sql 代碼
    1. insert   into  JBPM_ID_USER (ID_, CLASS_, NAME_, EMAIL_, PASSWORD_)    
    2.  values     
    3. ( ' 1 ' ,  ' U ' ,  ' cookie monster ' ,  ' cookie.monster@sesamestreet.tv ' ,  ' crunchcrunch ' ),   
    4. ( ' 2 ' ,  ' U ' ,  ' ernie ' ,  ' ernie@sesamestreet.tv ' ,  ' canthereyoubert,theresabananainmyear ' ),   
    5. ( ' 3 ' ,  ' U ' ,  ' bert ' ,  ' bert@sesamestreet.tv ' ,  ' ernie,theresabananainyourear ' );   
    6. ( ' 4 ' ,  ' U ' ,  ' grover ' ,  ' grover@sesamestreet.tv ' ,  ' mayday mayday ' );   
    Step 5 下載 Tomcat5.5.17 ,并讓它啟動 ( 參考如何啟動 Tomcat 的資料 ) 。假設它在 D:\Tools\tomcat-5.5.17
    Step 6 減壓 D:\jbpm-starters-kit-3.1.4\jbpm-server\server\jbpm\deploy\jbpm.war( 可以先修改 war rar 擴展名 ) 。并把它復制到 D:\Tools\tomcat-5.5.17\webapps 目錄下:
     
    Step 7 Jbpm 這個 context (在 Tomcat 的稱呼,其實就是一個應用),添加支持庫,一般都在 D:\jbpm-starters-kit-3.1.4 能搜索到,最后 D:\Tools\tomcat-5.5.17\webapps\jbpm\WEB-INF\lib 目錄下的文件有:
    jbpmlib.gif
    Step 8
    Jbpm Demo 提供 3 個配置文件,在 D:\Tools\tomcat-5.5.17\webapps\jbpm\WEB-INF\classes 目錄下,添加 3 個文件: jbpm.cfg.xml hibernate.cfg.xml log4j.properties 。他們來自 D:\jbpm-starters-kit-3.1.4\jbpm\src\config.files 目錄, hibernate.cfg.xml 開頭需要做一些改動,如下代碼,顯然 mysql 的用戶 root 的密碼這里是空的:
    xml 代碼
    1. <session-factory>  
    2. <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>  
    3. <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>  
    4. <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>  
    5. <property name="hibernate.connection.username">root</property>  
    6. <property name="hibernate.connection.password"></property>  
    7. <!-- ############################################ -->  
    8. <!-- # mapping files with external dependencies # -->  
    9. <!-- ############################################ -->  
    Step 9 為這個 Jbpm context 發布默認的 Demo mysql tomcat 都已啟動的時候)。在 Eclipse 中打開 processdefinition.xml ,如下圖所示的設置(這里的 tomcat 端口我改用 8082 ),先后電機 test connection deploy process archive (實際這個過程是往數據庫里存放了一些數據)。

    機制是訪問upload的servlet。讀入文件流。在往數據庫里面插入數據



    總結:其實jbpm部署到tomcat上面還是jboss上面的區別不是很大。jbpm的部署主要是往jbpm數據庫里面添加數據。在從數據庫里面讀取數據。值得注意的是jbpm的Action等類也是以2進制格式存放到數據庫中。
    posted @ 2007-05-10 15:48 Dragonofson 閱讀(1570) | 評論 (0)編輯 收藏

    基本環境:

    jdk : jdk1.5.0_06

    jbpm : jbpm-starters-kit-3.1.2

    ant : apache-ant-1.5.4

    配置好$ANT_HOME和$JAVA_HOME等環境變量

    解壓jbpm-starters-kit-3.1.2,我的解壓完畢路徑為E:\datum\jbpm\jbpm-starters-kit-3.1.2\

    進入E:\datum\jbpm\jbpm-starters-kit-3.1.2\下,把 jbpm 文件夾改名為 jbpm.3

    進入E:\datum\jbpm\jbpm-starters-kit-3.1.2\jbpm.3\下 修改 build.properties 文件

    修改如下:

    # jbpm.version only used for creating javadocs and the distribution package
    jbpm.version=3.1.2

    # ant.home is only used in the ant.install.libs target for copying the junit and clover libs(對應的ANT_HOME)
    ant.home=E:/datum/ant/apache-ant-1.5.4

    # jbpm.home is only to allow build scripts to open the browser with the html test results(對應的JBPM_HOME)
    jbpm.home=E:/datum/jbpm/jbpm-starters-kit-3.1.2/jbpm.3

    # jboss config proper only used for deployment(對應的JBOSS,本人現在還沒有jboss所以沒有設置,不會影響生成oracle腳本)
    jboss.home=c:/software/jboss-4.0.3
    jboss.version=4.0.x
    jboss.source.configuration=default

    # for creating the distribution
    jbpm.gpd.version=3.0.4

    E:\datum\jbpm\jbpm-starters-kit-3.1.2\jbpm-db\oracle\lib 放入class12.jar

    修改 xx\jbpm-starters-kit-3.1\jbpm-db下的 build.xml 文件,這個文件中,雖然把oracle 或者db2的腳本生成進行了描述
      但是卻在編譯命令中沒有加載。所以我們只需要加一點內容就可以了:
     
        找到下邊內容
       
        
        depends="daffodildb.test,derby.test,firebird.test,
              hsqldb.test,mssql.test,mysql.test,postgresql.test,sybase.test"
        description="test jBPM on all databases and produces html reports in the build directory"/>

     
        depends="prepare,daffodildb.scripts,derby.scripts,
              firebird.scripts,hsqldb.scripts,mssql.scripts,mysql.scripts,
              postgresql.scripts,sybase.scripts"
        description="generates all database scripts for all databases in the build directory"/>
       
        改成 
        depends="daffodildb.test,derby.test,firebird.test,
              hsqldb.test,mssql.test,mysql.test,postgresql.test,oracle.test,sybase.test"
        description="test jBPM on all databases and produces html reports in the build directory"/>

     
        depends="prepare,daffodildb.scripts,derby.scripts,
              firebird.scripts,hsqldb.scripts,mssql.scripts,mysql.scripts,
              postgresql.scripts,oracle.scripts,sybase.scripts"
        description="generates all database scripts for all databases in the build directory"/> 
    ant jbpm-db\build.xml文件。就可以在buile文件夾下面查看到oracle的script

    posted @ 2007-05-09 09:10 Dragonofson 閱讀(1683) | 評論 (0)編輯 收藏
    jsf標準的datatable標簽缺點比較明顯,沒有擴展的jsf datatable好用:比如:

    1、不能夠保存DataModel的狀態。
    2、分頁使用datatable在最后一頁。不能完整的顯示,總是把最后一頁填充滿。(個人沒有找到解決辦法,主要是有新的擴展datatable已經解決一個問題)
    3、實現列頭排列比較麻煩。


    jsf擴展datatable標簽<t:datatable>
    解決了上面的問題,而且完成了新的擴展對于分頁和排序有很好的實現。

    posted @ 2007-02-16 18:05 Dragonofson 閱讀(1892) | 評論 (0)編輯 收藏
    主站蜘蛛池模板: 在线视频网址免费播放| 一区二区免费国产在线观看 | 97免费人妻无码视频| 亚洲成AV人片在线观看| 你是我的城池营垒免费看| 亚洲午夜久久久久久久久久| 伊人免费在线观看| 亚洲狠狠久久综合一区77777| 伊人久久免费视频| 亚洲经典在线观看| 免费做爰猛烈吃奶摸视频在线观看 | 日韩精品免费电影| 色五月五月丁香亚洲综合网| 亚洲成A人片77777国产| 国产在线精品观看免费观看| 亚洲AV无码1区2区久久| 四虎1515hh永久久免费| 国产亚洲精品成人AA片| 日本中文一区二区三区亚洲| 黄色短视频免费看| 久久久无码精品亚洲日韩按摩| 免费国产成人高清在线观看网站| 亚洲精品无码专区在线| 亚洲国产一区二区三区| 暖暖免费在线中文日本| 亚洲一级免费视频| 伊人久久亚洲综合影院| 精品亚洲永久免费精品 | 亚洲国产精品免费视频| 成人AV免费网址在线观看| 黄床大片30分钟免费看| 亚洲日本在线观看视频| 日韩精品人妻系列无码专区免费| 亚洲中文字幕乱码一区| 中文字幕亚洲综合久久菠萝蜜| 亚洲欧洲免费视频| 国产亚洲综合视频| 2022年亚洲午夜一区二区福利| 免费中文熟妇在线影片| 日韩a级无码免费视频| 亚洲黄页网在线观看|