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

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

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

    編程生活

       :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      113 隨筆 :: 0 文章 :: 18 評(píng)論 :: 0 Trackbacks

    Running Seam 2.0 on Tomcat(EJB3) using Maven and Cargo
     Created: Fri 12 Oct 2007 Posted by: wesleyhales under Java [2] Comments In this article I review a simple Seam 2.0.0.CR2 app that deploys to Tomcat 6.0.13 with JBoss Embedded Beta2.

    It's great to see Seam move to Maven because tracking and installing all those dependencies in a local repository was a pain in the ass! This project is moving fast, and if you wanted to keep up with the latest version, it was a lot of work. So now that my life is easier, I thought I would make the Seam+EJB+Tomcat user's life a little easier also.

    The following is included in this sample app:

    Trinidad 1.0.2
    JBoss RichFaces
    JAAS
    Drools
    JBPM
    And everything else that seam and Embedded/EJB3 provides out of box.
    All you need to have is Maven 2.0.x installed. The rest is cake. During the installation Cargo will download a zip file from the JBoss Maven repository. This is the Tomcat 6.0.13 distro with Embedded already installed and setup. Nothing else has been added to it.

    Directions
    Download the Seam Maven application
    Unzip and navigate to the root of the project.
    run mvn install
    *Note - This will install and download all the dependencies along with downloading the tomcat+embedded distro, so it may take a few minutes. Also, If you want to disable the automatic starting of the Tomcat server, go to the web/pom.xml and disable the <executions> node of the cargo plugin if you want to disable this feature.
    navigate to [app_root]/web/src/main/webapp/META-INF and change the context.xml to point to [app_root]/web/target/seamtestapp
    Open a new terminal and navigate to the [app_root]/web and run mvn cargo:deploy
    navigate to http://localhost:8080/seamtestapp
    Thats it! You may see an error on the deploy, Cargo just pings a page to see if it actually deployed. The error is because Trinidad doesn't understand the user agent... anyways, don't worry about it ;)
    *Note - I used a stub for the datasource in TOMCAT_HOME/lib/deploy. Don't forget that this deploy directory is supposed to be the same as JBoss AS deploy directory.

    I used a few cool things in the maven pom setup:

    It seems you can trick cargo into using the latest version of tomcat. The documentation says Tomcat5x is only supported for the container, but I didn't have any problems using 6.0.x with the Tomcat5x containerId
    The cargo.container.url can be local, there is an example in the web/pom.xml (at the bottom)...So once you have this downloaded in you target dir, I would copy it somewhere outside of target and change the cargo.container.url to point to it. It will save time from downloading and bandwidth. It would be cool to add it as a dependency and then unzip from your local maven repo, but I haven't tried it yet.
    Like I mentioned earlier, if you want to disable auto start of the Tomcat server you should disable this section of the cargo plugin in web/pom.xml                    <executions>
                          <execution>
                            <id>start</id>
                            <phase>install</phase>

                            <goals>
                              <goal>start</goal>
                            </goals>
                          </execution>

                          <execution>
                            <id>deploy-app</id>
                            <phase>install</phase>
                            <goals>

                              <goal>deployer-deploy</goal>
                            </goals>
                          </execution>
                      </executions>
                     
    I have another version of this sample app that uses profiles to build either an EAR for JBoss or a WAR for Tomcat+Embedded. Michael Yuan recently touched on this subject about the EAR+Seam maven impl and did a great job breaking it down. I will try to post the sample app that lets you build a war for Tomcat or an EAR for JBoss all based on the maven profile i.e... mvn install -Ptomcat or mvn install -Pjboss This is the power of Maven2 and there is soo much more you can do with it.
    btw, I haven't blogged since I've become an employee for JBoss, a division of Red Hat. I'm working on the JBoss Portal Team and I must say that the company is awesome, my team is awesome, and everyone I have met and talked to have been, you guessed it, AWESOME!

     

    posted on 2007-11-10 15:36 wilesun 閱讀(549) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 日本人成在线视频免费播放| 永久免费无码日韩视频| 人妻无码久久一区二区三区免费| 亚洲午夜精品一级在线播放放| 亚洲最大的成人网站| 免费涩涩在线视频网| 亚洲aⅴ无码专区在线观看| 国产yw855.c免费视频| 精品视频免费在线| 亚洲第一区精品观看| 国产免费内射又粗又爽密桃视频| 亚洲午夜AV无码专区在线播放| 中文在线免费观看| 18亚洲男同志videos网站| 69av免费观看| 亚洲熟伦熟女专区hd高清| 国产极品粉嫩泬免费观看| 一本一道dvd在线观看免费视频| 中文字幕亚洲天堂| 在线免费中文字幕| 亚洲熟伦熟女专区hd高清| 亚洲成a人片在线观看国产| 人妻在线日韩免费视频| 亚洲码在线中文在线观看| 在线观看免费a∨网站| 一个人晚上在线观看的免费视频| 亚洲av之男人的天堂网站| 在线视频免费观看高清| 手机永久免费的AV在线电影网| 国产亚洲美女精品久久久久狼| 亚洲高清成人一区二区三区| 又长又大又粗又硬3p免费视频| 亚洲人成人一区二区三区| 成人午夜免费福利视频| 无遮挡呻吟娇喘视频免费播放| 久久亚洲综合色一区二区三区| 91精品免费在线观看| fc2成年免费共享视频18| 亚洲男人电影天堂| 国产免费私拍一区二区三区| 成全在线观看免费观看大全|