Hi there, 

I was just wondering how you guys out there are developing with Seam? Are there 
any tricks or special tools/plugins you are using?

I am using eclipse for coding, but the build is driven via maven2. This means 
that in order to see a simple change in say an xhtml page I have to rebuild the 
whole ear file and redeploy it (via cargo start/stop). That's takes a fair bit 
of time and is far from optimal. 

I am trying for days to have some sort of war:inplace working within in webapp 
subproject. So far without success. My idea was to build and deploy the ear as 
normal (via cargo), but at the same time deploy the webapp also standalone in a 
separate tomcat instance running on a different port. For this to (possibly) 
work I am adding additional classes (via cargo) to the standard webapp  
classpath. It looks something like this:

  | <plugin>
  |             <groupId>org.codehaus.cargo</groupId>
  |             <artifactId>cargo-maven2-plugin</artifactId>
  |             <configuration>
  |                     <wait>true</wait>
  |                     <container>
  |                             <containerId>tomcat5x</containerId>
  |                             <zipUrlInstaller>
  |                                     <url>
  |                                             
http://www.apache.org/dist/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.zip
  |                                     </url>
  |                                     <installDir>
  |                                             ${tomcat.install}
  |                                     </installDir>
  |                             </zipUrlInstaller>
  |                             <output>
  |                                     ${project.build.directory}/tomcat.log
  |                             </output>
  |                             <log>
  |                                     
${project.build.directory}/cargo-startup.log
  |                             </log>
  |                             <dependencies>
  |                                     <dependency>
  |                                             <groupId>jboss</groupId>
  |                                             <artifactId>
  |                                                     jboss-ejb3-client
  |                                             </artifactId>
  |                                     </dependency>
  |                                     <dependency>
  |                                             <groupId>
  |                                                     javax.persistence
  |                                             </groupId>
  |                                             <artifactId>ejb</artifactId>
  |                                     </dependency>
  |                                     <dependency>
  |                                             <groupId>jboss</groupId>
  |                                             <artifactId>
  |                                                     javassist
  |                                             </artifactId>
  |                                     </dependency>
  |                                     <dependency>
  |                                             <groupId>concurrent</groupId>
  |                                             <artifactId>
  |                                                     concurrent
  |                                             </artifactId>
  |                                     </dependency>
  |                                     <dependency>
  |                                             <groupId>jboss</groupId>
  |                                             <artifactId>
  |                                                     jboss-ejb3-all
  |                                             </artifactId>
  |                                     </dependency>
  |                                     <dependency>
  |                                             <groupId>jboss-seam</groupId>
  |                                             <artifactId>
  |                                                     hibernate-all
  |                                             </artifactId>
  |                                     </dependency>
  |                             </dependencies>
  |                     </container>
  |                     <configuration>
  |                             <home>
  |                                     ${project.build.directory}/tomcat5x
  |                             </home>
  |                             <properties>
  |                                     <!--<cargo.jvmargs>-Xdebug -Xnoagent 
-Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,address=8888,server=n,suspend=n -Xms128m 
-Xmx512m</cargo.jvmargs>-->
  |                                     <cargo.logging>high</cargo.logging>
  |                                     <cargo.servlet.port>
  |                                             9090
  |                                     </cargo.servlet.port>
  |                             </properties>
  |                             <deployables>
  |                                     <deployable>
  |                                             <location>
  |                                                     
${basedir}/src/main/webapp/
  |                                             </location>
  |                                     </deployable>
  |                             </deployables>
  |                     </configuration>
  |             </configuration>
  |     </plugin>
  | 
I also add the ejb jar itself to the lib directory of the webapp, because Seam 
has to be able to find the annotated 'named' entities at startup ( I think).  
Of course the actual beans are still deployed in the ear file.  I also changed 
all interfaces to be remote. Uhh, pretty complicated I know. I am not even sure 
if this can work at all. Has anyone a comment to this approach? Basically Seam 
starts up and it makes calls to the ejbs deployed in JBoss. Some pages even 
work, but others just refuse to work.

Another apporach would be to use Tomcat only for development and deploy the 
webapp together with an embedded JBoss. Something along this: 
http://docs.jboss.org/ejb3/embedded/embedded.html.

Of course the whole war:inplace thing might be not worth the effort at all and 
there is a much better way of doing things. Any ideas/comments? 

Cheers
--Hardy


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984307#3984307

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984307
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to