<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年5月9日

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

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

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

    對于spring-modules-jbpm31對jbpm的支持。我開篇就想說一個(gè)"暈"字。看完了springmodules自己的說明文檔。進(jìn)行配置后。再查看源碼。發(fā)現(xiàn)很多配置華而不實(shí)。比如: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程序里面。總是會(huì)出現(xiàn)錯(cuò)誤。不是session關(guān)閉就是session不能提交。獲取不能很好的獲取流程對象。


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

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

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

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

    手動(dòng)發(fā)布JBPM默認(rèn)Demo到Tomcat和MySQL

    關(guān)鍵字: JBoss   jbpm    
    Step 1 下載 jbpm-starters-kit-3.1.4 ,減壓: D:\jbpm-starters-kit-3.1.4
    Step 2 Eclipse (已經(jīng)安裝了 jbpm-designer 插件)里導(dǎo)入工程 D:\jbpm-starters-kit-3.1.4\jbpm ,如下圖:這時(shí),你可以看到 JBPM 的源代碼和 Demo 的代碼。
    jbpmeclipse.gif
    Step 3
    下載 mysql, 并且讓它啟動(dòng)(參考如何啟動(dòng) Mysql 的資料),創(chuàng)建一個(gè)數(shù)據(jù)庫 jbpmdb 。并且執(zhí)行腳本: D:\jbpm-starters-kit-3.1.4\jbpm-db\build\mysql\scripts\mysql.create.sql
    Step 4 添加 Demo 默認(rèn)的用戶數(shù)據(jù),執(zhí)行下面的腳本:
    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 ,并讓它啟動(dòng) ( 參考如何啟動(dòng) Tomcat 的資料 ) 。假設(shè)它在 D:\Tools\tomcat-5.5.17
    Step 6 減壓 D:\jbpm-starters-kit-3.1.4\jbpm-server\server\jbpm\deploy\jbpm.war( 可以先修改 war rar 擴(kuò)展名 ) 。并把它復(fù)制到 D:\Tools\tomcat-5.5.17\webapps 目錄下:
     
    Step 7 Jbpm 這個(gè) context (在 Tomcat 的稱呼,其實(shí)就是一個(gè)應(yīng)用),添加支持庫,一般都在 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 個(gè)配置文件,在 D:\Tools\tomcat-5.5.17\webapps\jbpm\WEB-INF\classes 目錄下,添加 3 個(gè)文件: jbpm.cfg.xml hibernate.cfg.xml log4j.properties 。他們來自 D:\jbpm-starters-kit-3.1.4\jbpm\src\config.files 目錄, hibernate.cfg.xml 開頭需要做一些改動(dòng),如下代碼,顯然 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 為這個(gè) Jbpm context 發(fā)布默認(rèn)的 Demo mysql tomcat 都已啟動(dòng)的時(shí)候)。在 Eclipse 中打開 processdefinition.xml ,如下圖所示的設(shè)置(這里的 tomcat 端口我改用 8082 ),先后電機(jī) test connection deploy process archive (實(shí)際這個(gè)過程是往數(shù)據(jù)庫里存放了一些數(shù)據(jù))。

    機(jī)制是訪問upload的servlet。讀入文件流。在往數(shù)據(jù)庫里面插入數(shù)據(jù)



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

    基本環(huán)境:

    jdk : jdk1.5.0_06

    jbpm : jbpm-starters-kit-3.1.2

    ant : apache-ant-1.5.4

    配置好$ANT_HOME和$JAVA_HOME等環(huán)境變量

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

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

    進(jìn)入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(對應(yīng)的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(對應(yīng)的JBPM_HOME)
    jbpm.home=E:/datum/jbpm/jbpm-starters-kit-3.1.2/jbpm.3

    # jboss config proper only used for deployment(對應(yīng)的JBOSS,本人現(xiàn)在還沒有jboss所以沒有設(shè)置,不會(huì)影響生成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 文件,這個(gè)文件中,雖然把oracle 或者db2的腳本生成進(jìn)行了描述
      但是卻在編譯命令中沒有加載。所以我們只需要加一點(diǎn)內(nèi)容就可以了:
     
        找到下邊內(nèi)容
       
        
        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)編輯 收藏
    主站蜘蛛池模板: 亚洲午夜福利精品久久| 亚洲美女色在线欧洲美女| 国产妇乱子伦视频免费| 污网站在线观看免费| 久久久久久亚洲AV无码专区| 国产大片51精品免费观看| 亚洲网站在线免费观看| 九九免费观看全部免费视频| 亚洲国产电影在线观看| 亚洲中久无码不卡永久在线观看| 亚洲国产精品自产在线播放| 精品久久久久国产免费| 18禁止看的免费污网站| 免费在线看黄网站| 疯狂做受xxxx高潮视频免费| 亚洲伊人精品综合在合线| 亚洲一区二区三区在线观看精品中文| 亚洲三级高清免费| 国产精品免费大片| 九九久久国产精品免费热6| 亚洲一卡2卡三卡4卡无卡下载 | 一日本道a高清免费播放| 亚洲性猛交xx乱| 亚洲va中文字幕无码久久| 全黄性性激高免费视频| 大陆一级毛片免费视频观看| 人妻丰满熟妇无码区免费| 国产99精品一区二区三区免费 | 91人成网站色www免费下载| www免费黄色网| 羞羞视频免费网站入口| 亚洲一久久久久久久久| 亚洲精品在线播放| 亚洲精品无码高潮喷水在线| 在线a亚洲v天堂网2018| 在线观看免费精品国产| 毛片a级毛片免费播放100| 日韩版码免费福利视频| 99免费在线观看视频| 欧洲人成在线免费| 国偷自产一区二区免费视频|