[jboss-cvs] JBossAS SVN: r82560 - in projects/ejb3/trunk/docs/tutorial: timer and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 29 05:35:59 EST 2008
Author: jaikiran
Date: 2008-12-29 05:35:59 -0500 (Mon, 29 Dec 2008)
New Revision: 82560
Added:
projects/ejb3/trunk/docs/tutorial/timer/
projects/ejb3/trunk/docs/tutorial/timer/pom.xml
Modified:
projects/ejb3/trunk/docs/tutorial/timer/build.xml
projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/bean/ExampleTimerBean.java
projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/client/Client.java
Log:
EJBTHREE-1607 Working Timer tutorial for JBoss-5 GA
Copied: projects/ejb3/trunk/docs/tutorial/timer (from rev 82032, projects/oldstuff/ejb3/docs/tutorial/timer)
Modified: projects/ejb3/trunk/docs/tutorial/timer/build.xml
===================================================================
--- projects/oldstuff/ejb3/docs/tutorial/timer/build.xml 2008-12-04 08:31:45 UTC (rev 82032)
+++ projects/ejb3/trunk/docs/tutorial/timer/build.xml 2008-12-29 10:35:59 UTC (rev 82560)
@@ -8,26 +8,20 @@
<property environment="env"/>
<property name="src.dir" value="${basedir}/src"/>
- <property name="jboss.home" value="${env.JBOSS_HOME}"/> <property name="jboss.server.config" value="all"/>
+ <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+ <property name="jboss.server.config" value="default"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
+ <property name="build.artifact" value="jboss-ejb3-tutorial-timer.jar"/>
<!-- Build classpath -->
<path id="classpath">
<!-- So that we can get jndi.properties for InitialContext -->
<pathelement location="${basedir}"/>
- <fileset dir="${jboss.home}/lib">
- <include name="**/*.jar"/>
+ <!-- Only the jbossall-client.jar should ideally be sufficient -->
+ <fileset dir="${jboss.home}/client">
+ <include name="**/jbossall-client.jar"/>
</fileset>
- <fileset dir="${jboss.home}/server/${jboss.server.config}/lib">
- <include name="**/*.jar"/>
- </fileset>
- <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/ejb3.deployer">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${jboss.home}/server/${jboss.server.config}/deploy/jboss-aop-jdk50.deployer">
- <include name="*.jar"/>
- </fileset>
<pathelement location="${build.classes.dir}"/>
</path>
@@ -56,12 +50,12 @@
</target>
<target name="ejbjar" depends="compile">
- <jar jarfile="build/tutorial.jar">
+ <jar jarfile="build/${build.artifact}">
<fileset dir="${build.classes.dir}">
<include name="**/*.class"/>
</fileset>
</jar>
- <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ <copy file="build/${build.artifact}" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
</target>
<target name="run" depends="ejbjar">
@@ -79,7 +73,7 @@
<target name="clean">
<delete dir="${build.dir}"/>
- <delete file="${jboss.home}/server/${jboss.server.config}/deploy/tutorial.jar"/>
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/${build.artifact}"/>
</target>
Added: projects/ejb3/trunk/docs/tutorial/timer/pom.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/timer/pom.xml (rev 0)
+++ projects/ejb3/trunk/docs/tutorial/timer/pom.xml 2008-12-29 10:35:59 UTC (rev 82560)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+
+
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-tutorial-common</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../common/</relativePath>
+ </parent>
+
+ <properties>
+ <ejb3.tutorial.client>org.jboss.tutorial.timer.client.Client</ejb3.tutorial.client>
+ </properties>
+
+
+ <artifactId>jboss-ejb3-tutorial-timer</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>EJB3 Timer Service</name>
+ <url>http://labs.jboss.com/jbossejb3/</url>
+ <description>
+ Tutorial about using timer service in JBoss
+ </description>
+
+
+
+
+
+
+</project>
Property changes on: projects/ejb3/trunk/docs/tutorial/timer/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/bean/ExampleTimerBean.java
===================================================================
--- projects/oldstuff/ejb3/docs/tutorial/timer/src/org/jboss/tutorial/timer/bean/ExampleTimerBean.java 2008-12-04 08:31:45 UTC (rev 82032)
+++ projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/bean/ExampleTimerBean.java 2008-12-29 10:35:59 UTC (rev 82560)
@@ -38,6 +38,9 @@
public void scheduleTimer(long milliseconds)
{
ctx.getTimerService().createTimer(new Date(new Date().getTime() + milliseconds), "Hello World");
+ System.out.println("---------------------");
+ System.out.println("Created a timer event to be triggered after " + milliseconds + " milli seconds");
+ System.out.println("---------------------");
}
@Timeout
Modified: projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/client/Client.java
===================================================================
--- projects/oldstuff/ejb3/docs/tutorial/timer/src/org/jboss/tutorial/timer/client/Client.java 2008-12-04 08:31:45 UTC (rev 82032)
+++ projects/ejb3/trunk/docs/tutorial/timer/src/org/jboss/tutorial/timer/client/Client.java 2008-12-29 10:35:59 UTC (rev 82560)
@@ -33,5 +33,6 @@
InitialContext ctx = new InitialContext();
ExampleTimer timer = (ExampleTimer) ctx.lookup("ExampleTimerBean/remote");
timer.scheduleTimer(5000);
+ System.out.println("Timer scheduled to trigger after 5 seconds");
}
}
More information about the jboss-cvs-commits
mailing list