[weld-dev] added features in weld-translator example

Arbi Sookazian asookazian at gmail.com
Fri Apr 23 19:48:40 EDT 2010


http://github.com/asookazian/weld-examples

Key points:

1) added event fire + observer
2) added JPA persist to insert into hsqldb
3) add the weld-pastecode-ds.xml to server/default/deploy in JBoss 6.0.0.M2
4) setup for JRebel 3 via the javarebel-maven-plugin in ejb module POM:


   <build>
      <finalName>weld-translator</finalName>
      <plugins>
          <plugin>
              <groupId>org.zeroturnaround</groupId>
              <artifactId>javarebel-maven-plugin</artifactId>
              <version>1.0.5</version>
              <executions>
                  <execution>
                      <id>generate-rebel-xml</id>
                      <phase>process-resources</phase>
                      <goals>
                          <goal>generate</goal>
                      </goals>
                  </execution>
              </executions>
          </plugin>
      </plugins>
   </build>

The above plugin generates the rebel.xml file which is used by JRebel to
know which directories/files to monitor for hot redeploy when the bytecode
is modified (new .class files generated on local fileserver).  You need one
rebel.xml for each JAR and WAR that you want to hot redeploy enable.  In
this case there's only one for the ejb JAR.

I added the 2nd commandButton to test the adding/deleting of local interface
session bean methods (foo2) which is working ok thus far via JRebel 3 hot
reload.  Follow the tutorial I wrote here:
http://community.jboss.org/wiki/JRebel3withSeam2xtutorial

VM args: -Drebel.log=true -noverify -javaagent:/opt/jrebel/jrebel/jrebel.jar
-Drebel.jboss_plugin=true -Drebel.allow_bytecode_proxy=true -Drebel.log=true
-Dprogram.name="JBossTools: JBoss 6.0 Runtime" -Xms256m -Xmx768m
-XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-Djava.endorsed.dirs="/opt/jboss/jboss-6.0.0.20100216-M2/lib/endorsed"

use nightly version of JRebel:
http://www.zeroturnaround.com/jrebel/next-releases/

Enjoy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20100423/05328337/attachment-0001.html 


More information about the weld-dev mailing list