{"id":10113,"date":"2012-06-21T08:00:42","date_gmt":"2012-06-20T23:00:42","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=10113"},"modified":"2012-06-19T09:43:57","modified_gmt":"2012-06-19T00:43:57","slug":"jboss5-0-1-seam-2-1-1","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/10113.html","title":{"rendered":"JBoss5.0.1 + Seam 2.1.1"},"content":{"rendered":"<p>\u624b\u5143\u306b\u74b0\u5883\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u53e4\u3044\u306e\u3067\u3059\u304c\u3001JBoss5.0.1 + Seam 2.1.1\u3067Seam\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u78ba\u8a8d\u3092\u3057\u3066\u307f\u307e\u3057\u305f\u3002Mac OS X \u3067\u52d5\u4f5c\u3055\u305b\u3066\u3044\u307e\u3059\u3002<br \/>\n<!--more--><br \/>\n\u6b21\u306e\u3088\u3046\u306a\u74b0\u5883\u3092\u7528\u610f\u3057\u3066\u3044\u307e\u3059\u3002workspace\/seam-gen\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7f6e\u304f\u305f\u3081\u306e\u4f5c\u696d\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n\/Users\/user001\/Desktop\/workspace\/seam-gen\r\n\/Users\/user001\/applications\/jboss-5.0.1.GA\r\n\/Users\/user001\/applications\/jboss-seam-2.1.1.GA\r\n<\/pre>\n<p>seam setup \u3092\u6b21\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3001\u5bfe\u8a71\u7684\u306b\u5024\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3067\u3001seam-gen\/build.properties\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cd ~\/applications\/jboss-seam-2.1.1.GA\/\r\n$ chmod 755 seam\r\n$ JAVA_HOME=\/Library\/Java\/Home .\/seam setup\r\nSEAM_HOME: .\r\nUsing seam-gen sources from: .\/seam-gen\r\nBuildfile: .\/seam-gen\/build.xml\r\n\r\ninit:\r\n\r\nsetup:\r\n     [echo] Welcome to seam-gen :-)\r\n    [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:\/Projects] [C:\/Projects]\r\n\/Users\/user001\/Desktop\/workspace\/seam-gen\r\n    [input] Enter your JBoss AS home directory [C:\/Program Files\/jboss-4.2.3.GA] [C:\/Program Files\/jboss-4.2.3.GA]\r\n\/Users\/user001\/applications\/jboss-5.0.1.GA\r\n    [input] Enter the project name [myproject] [myproject]\r\nsampleproject\r\n     [echo] Accepted project name as: sampleproject\r\n    [input] Do you want to use ICEfaces instead of RichFaces [n] (y, [n])\r\n\r\n    [input] skipping input as property icefaces.home.new has already been set.\r\n    [input] Select a RichFaces skin [classic] (blueSky, [classic], deepMarine, DEFAULT, emeraldTown, japanCherry, ruby, wine)\r\njapanCherry\r\n    [input] Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [ear] ([ear], war)\r\n\r\n    [input] Enter the Java package name for your session beans [com.mydomain.sampleproject] [com.mydomain.sampleproject]\r\ncom.example.sampleproject.session\r\n    [input] Enter the Java package name for your entity beans [com.example.sampleproject.session] [com.example.sampleproject.session]\r\ncom.example.sampleproject.entity\r\n    [input] Enter the Java package name for your test cases [com.example.sampleproject.session.test] [com.example.sampleproject.session.test]\r\ncom.example.sampleproject.test\r\n    [input] What kind of database are you using? [hsql] ([hsql], mysql, oracle, postgres, mssql, db2, sybase, enterprisedb, h2)\r\n\r\n    [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.HSQLDialect] [org.hibernate.dialect.HSQLDialect]\r\n\r\n    [input] Enter the filesystem path to the JDBC driver jar [\/Users\/user001\/Applications\/jboss-seam-2.1.1.GA\/lib\/hsqldb.jar] [\/Users\/user001\/Applications\/jboss-seam-2.1.1.GA\/lib\/hsqldb.jar]\r\n\r\n    [input] Enter JDBC driver class for your database [org.hsqldb.jdbcDriver] [org.hsqldb.jdbcDriver]\r\n\r\n    [input] Enter the JDBC URL for your database [jdbc:hsqldb:.] [jdbc:hsqldb:.]\r\n\r\n    [input] Enter database username [sa] [sa]\r\n\r\n    [input] Enter database password [] []\r\n\r\n    [input] Enter the database schema name (it is OK to leave this blank) [] []\r\n\r\n    [input] Enter the database catalog name (it is OK to leave this blank) [] []\r\n\r\n    [input] Are you working with tables that already exist in the database? [n] (y, [n])\r\n\r\n    [input] Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [n] (y, [n])\r\n\r\n[propertyfile] Creating new property file: \/Users\/user001\/Applications\/jboss-seam-2.1.1.GA\/seam-gen\/build.properties\r\n     [echo] Installing JDBC driver jar to JBoss AS\r\n     [copy] Copying 1 file to \/Users\/user001\/applications\/jboss-5.0.1.GA\/server\/default\/lib\r\n     [echo] Type &#039;.\/seam create-project&#039; to create the new project\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 1 minute 3 seconds\r\n<\/pre>\n<p>\u3067\u304d\u3042\u304c\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u300c\/Users\/user001\/Applications\/jboss-seam-2.1.1.GA\/seam-gen\/build.properties\u300d\u3067\u306f\u306a\u304f\u3001\u300c\/Users\/user001\/applications\/jboss-seam-2.1.1.GA\/seam-gen\/build.properties\u300d\u3067\u3059\u3002\u306a\u305cApplications\u3068\u8868\u793a\u3055\u308c\u308b\u306e\u304b\u306f\u8b0e\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n#Generated by seam setup\r\n#Tue Jun 19 09:34:53 JST 2012\r\nhibernate.connection.password=\r\nworkspace.home=\/Users\/user001\/Desktop\/workspace\/seam-gen\r\nmodel.package=com.example.sampleproject.entity\r\ndriver.jar=\/Users\/user001\/Applications\/jboss-seam-2.1.1.GA\/lib\/hsqldb.jar\r\naction.package=com.example.sampleproject.session\r\ntest.package=com.example.sampleproject.test\r\ndatabase.type=hsql\r\nrichfaces.skin=japanCherry\r\nhibernate.default_catalog.null=\r\nhibernate.default_schema.null=\r\ndatabase.drop=n\r\nproject.name=sampleproject\r\nhibernate.connection.username=sa\r\nhibernate.connection.driver_class=org.hsqldb.jdbcDriver\r\nhibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider\r\nproject.type=ear\r\nicefaces.home=\r\ndatabase.exists=n\r\njboss.home=\/Users\/user001\/applications\/jboss-5.0.1.GA\r\nhibernate.dialect=org.hibernate.dialect.HSQLDialect\r\nhibernate.connection.url=jdbc\\:hsqldb\\:.\r\nicefaces=n\r\n<\/pre>\n<p>seam\u306e\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/Library\/Java\/Home .\/seam create-project\r\n<\/pre>\n<p>\u7121\u4e8b\u751f\u6210\u3055\u308c\u308b\u3068\u3001\u305d\u308c\u3067\u3082\u3046\u6e96\u5099OK\u3067\u3059\u3002\/Users\/user001\/Desktop\/workspace\/seam-gen\/SeamGenSample\/ \u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u304c\u3067\u304d\u3042\u304c\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002Eclipse\u3078\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3057\u3001NetBeans\u3078\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n\u7565\r\ncreate-project:\r\n     [echo] A new Seam project named &#039;sampleproject&#039; was created in the \/Users\/user001\/Desktop\/workspace\/seam-gen directory\r\n     [echo] Type &#039;.\/seam explode&#039; and go to http:\/\/localhost:8080\/sampleproject\r\n     [echo] Eclipse Users: Import the project using File &gt; Import... &gt; Existing Projects into Workspace, set the root directory to \/Users\/user001\/Desktop\/workspace\/seam-gen, then select the project named sampleproject\r\n     [echo] NetBeans Users: Open the project using File &gt; Open project... and select the project folder \/Users\/user001\/Desktop\/workspace\/seam-gen\/sampleproject \r\n     [echo] IDEA Users: Open the project using File &gt; Open project... and select the file \/Users\/user001\/Desktop\/workspace\/seam-gen\/sampleproject\/sampleproject.ipr\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 12 seconds\r\n<\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u3066seam explode\u3059\u308b\u3068\u3001JBoss\u3078\u5c55\u958b\u3057\u305f\u5f62\u3067\u30d5\u30a1\u30a4\u30eb\u304c\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u307e\u3059\u3002\u52d5\u4f5c\u78ba\u8a8d\u3092\u3059\u308b\u306b\u306f\u3001JBoss\u3092\u8d77\u52d5\u3057\u3066\u304b\u3089\u3001http:\/\/localhost:8080\/sampleproject \u3078Web\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ JAVA_HOME=\/Library\/Java\/Home .\/seam explode\r\n$ \/Users\/user001\/applications\/jboss-5.0.1.GA\/bin\/run.sh\r\n<\/pre>\n<p>HSQLDB\u3092\u30b5\u30fc\u30d0\u30fc\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u3059\u306e\u306f\u306a\u305c\u304b\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002DB\u306e\u8a2d\u5b9a\u5468\u308a\u306b\u3064\u3044\u3066\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u3059\u308c\u3070\u826f\u3044\u306f\u305a\u306a\u306e\u3067\u3059\u304c&#8230;<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\nhsql\r\norg.hibernate.dialect.HSQLDialect\r\norg.hsqldb.jdbcDriver\r\njdbc:hsqldb:hsql:\/\/localhost\/\r\nsa\r\n<\/pre>\n<p>\u307e\u305f\u3001HSQLDB\u3092\u30b5\u30fc\u30d0\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b\u305f\u3081\u306bhsqldb-ds.xml\u306e\u4fee\u6b63\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001standalone\u30e2\u30fc\u30c9\u304b\u3089server\u30e2\u30fc\u30c9\u3078\u5909\u66f4\u3057\u305f\u306e\u3067\u3059\u304c&#8230;<\/p>\n<pre class=\"brush: bash; gutter: true\">\r\n$ cat ~\/applications\/jboss-5.0.1.GA\/server\/default\/deploy\/hsqldb-ds.xml \r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;datasources&gt;\r\n   &lt;local-tx-datasource&gt;\r\n      &lt;jndi-name&gt;DefaultDS&lt;\/jndi-name&gt;\r\n      &lt;connection-url&gt;jdbc:hsqldb:hsql:\/\/${jboss.bind.address}:1701&lt;\/connection-url&gt;\r\n&lt;!--\r\n      &lt;connection-url&gt;jdbc:hsqldb:${jboss.server.data.dir}${\/}hypersonic${\/}localDB&lt;\/connection-url&gt;\r\n--&gt;\r\n      &lt;driver-class&gt;org.hsqldb.jdbcDriver&lt;\/driver-class&gt;\r\n      &lt;user-name&gt;sa&lt;\/user-name&gt;\r\n      &lt;password&gt;&lt;\/password&gt;\r\n      &lt;min-pool-size&gt;0&lt;\/min-pool-size&gt;\r\n      &lt;max-pool-size&gt;20&lt;\/max-pool-size&gt;\r\n      &lt;idle-timeout-minutes&gt;0&lt;\/idle-timeout-minutes&gt;\r\n      &lt;track-statements\/&gt;\r\n      &lt;security-domain&gt;HsqlDbRealm&lt;\/security-domain&gt;\r\n      &lt;prepared-statement-cache-size&gt;32&lt;\/prepared-statement-cache-size&gt;\r\n&lt;!--\r\n      &lt;depends&gt;jboss:service=Hypersonic,database=localDB&lt;\/depends&gt;\r\n--&gt;\r\n      &lt;depends&gt;jboss:service=Hypersonic&lt;\/depends&gt;\r\n   &lt;\/local-tx-datasource&gt;\r\n   &lt;mbean code=&quot;org.jboss.jdbc.HypersonicDatabase&quot; \r\n     name=&quot;jboss:service=Hypersonic&quot;&gt;\r\n     &lt;attribute name=&quot;Port&quot;&gt;1701&lt;\/attribute&gt;\r\n     &lt;attribute name=&quot;BindAddress&quot;&gt;${jboss.bind.address}&lt;\/attribute&gt;     \r\n     &lt;attribute name=&quot;Silent&quot;&gt;true&lt;\/attribute&gt;\r\n     &lt;attribute name=&quot;Database&quot;&gt;default&lt;\/attribute&gt;\r\n     &lt;attribute name=&quot;Trace&quot;&gt;false&lt;\/attribute&gt;\r\n     &lt;attribute name=&quot;No_system_exit&quot;&gt;true&lt;\/attribute&gt;\r\n   &lt;\/mbean&gt;\r\n&lt;!--\r\n   &lt;mbean code=&quot;org.jboss.jdbc.HypersonicDatabase&quot; \r\n     name=&quot;jboss:service=Hypersonic,database=localDB&quot;&gt;\r\n     &lt;attribute name=&quot;Database&quot;&gt;localDB&lt;\/attribute&gt;\r\n     &lt;attribute name=&quot;InProcessMode&quot;&gt;true&lt;\/attribute&gt;\r\n   &lt;\/mbean&gt;\r\n--&gt;\r\n&lt;\/datasources&gt;\r\n<\/pre>\n<p>\u3053\u3061\u3089\u306f\u3001DataSource\u307e\u308f\u308a\u306e\u8a2d\u5b9a\u306e\u3068\u3053\u308d\u3067\u4f55\u304b\u554f\u984c\u304c\u8d77\u304d\u3066\u3044\u308b\u3068\u8003\u3048\u3089\u308c\u308b\u306e\u3067\u3001\u307e\u305f\u5225\u9014\u78ba\u8a8d\u3092\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u305d\u3082\u305d\u3082\u3001\u3044\u307e\u3069\u304d\u3060\u3068\u3001JBoss7\u3092\u4f7f\u3046\u306e\u304c\u666e\u901a\u3067\u3057\u3087\u3046\u304b\u3089\u3001\u3053\u306e\u7d44\u307f\u5408\u308f\u305b\u306f\u3061\u3087\u3063\u3068\u53e4\u3044\u3067\u3059\u3088\u306d&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u624b\u5143\u306b\u74b0\u5883\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u53e4\u3044\u306e\u3067\u3059\u304c\u3001JBoss5.0.1 + Seam 2.1.1\u3067Seam\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u78ba\u8a8d\u3092\u3057\u3066\u307f\u307e\u3057\u305f\u3002Mac OS X \u3067\u52d5\u4f5c\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[1207,246,709],"class_list":["post-10113","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-jboss","tag-mac-os"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/10113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=10113"}],"version-history":[{"count":8,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/10113\/revisions"}],"predecessor-version":[{"id":10362,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/10113\/revisions\/10362"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=10113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=10113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=10113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}