[jboss-cvs] JBossAS SVN: r82556 - projects/ejb3/trunk/docs/tutorial/mdb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 29 04:42:00 EST 2008
Author: jaikiran
Date: 2008-12-29 04:42:00 -0500 (Mon, 29 Dec 2008)
New Revision: 82556
Modified:
projects/ejb3/trunk/docs/tutorial/mdb/build.xml
projects/ejb3/trunk/docs/tutorial/mdb/custom-ejb3-interceptors-aop.xml
projects/ejb3/trunk/docs/tutorial/mdb/pom.xml
Log:
EJBTHREE-1607 Working version of the MDB tutorial on JBoss-5 GA
Modified: projects/ejb3/trunk/docs/tutorial/mdb/build.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/mdb/build.xml 2008-12-29 09:36:35 UTC (rev 82555)
+++ projects/ejb3/trunk/docs/tutorial/mdb/build.xml 2008-12-29 09:42:00 UTC (rev 82556)
@@ -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="build.dir" value="${basedir}/build"/>
- <property name="build.classes.dir" value="${build.dir}/classes"/>
+ <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-mdb.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,18 +50,18 @@
</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>
- <fileset dir=".">
- <include name="custom-ejb3-interceptors-aop.xml"/>
- </fileset>
</jar>
- <copy file="queue-example-service.xml" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
- <!--copy file="custom-ejb3-interceptors-aop.xml" todir="${jboss.home}/server/${jboss.server.config}/deploy"/-->
- <sleep seconds="5"/>
- <copy file="build/tutorial.jar" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ <copy file="${basedir}/custom-ejb3-interceptors-aop.xml" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ <sleep seconds="8"/>
+ <copy file="${basedir}/queue-example-service.xml" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+ <sleep seconds="8"/>
+
+ <copy file="build/${build.artifact}" todir="${jboss.home}/server/${jboss.server.config}/deploy"/>
+
</target>
<target name="run" depends="ejbjar">
@@ -86,8 +80,10 @@
<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/queue-example-service.xml"/>
- <!--delete file="${jboss.home}/server/${jboss.server.config}/deploy/custom-ejb3-interceptors-aop.xml"/-->
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/${build.artifact}"/>
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/queue-example-service.xml"/>
+ <delete file="${jboss.home}/server/${jboss.server.config}/deploy/custom-ejb3-interceptors-aop.xml"/>
+
</target>
Modified: projects/ejb3/trunk/docs/tutorial/mdb/custom-ejb3-interceptors-aop.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/mdb/custom-ejb3-interceptors-aop.xml 2008-12-29 09:36:35 UTC (rev 82555)
+++ projects/ejb3/trunk/docs/tutorial/mdb/custom-ejb3-interceptors-aop.xml 2008-12-29 09:42:00 UTC (rev 82556)
@@ -1,28 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">
+ <!-- TODO: Jaikiran - These interceptor declarations need not be here since they
+ are already declared through the ejb3-interceptors-aop.xml. Duplicating them leads to
+ deployment errors. However, if this custom-ejb3-interceptors-aop.xml needs to be
+ independent, then we must find a better way of declaring these. Right now, commenting these
+ out, can be looked at later. -->
+ <!--
<interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
<interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/>
- <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/>
<interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
<interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/>
- <interceptor factory="org.jboss.ejb3.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
-
- <domain name="Custom Message Driven Bean">
- <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
- <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
- </bind>
- <bind pointcut="execution(public * *->*(..))">
- <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
- <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
- <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
- </bind>
- <annotation expr="!class(@org.jboss.annotation.ejb.Pool)">
- @org.jboss.annotation.ejb.Pool (value="StrictMaxPool", maxSize=15, timeout=10000)
+
+ <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/>
+ <interceptor factory="org.jboss.aspects.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
+ -->
+ <domain name="Custom Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
+
+ <annotation expr="!class(@org.jboss.ejb3.annotation.DefaultActivationSpecs)">
+ @org.jboss.ejb3.annotation.DefaultActivationSpecs (value={@javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="queue/tutorial/defaultedexample")})
</annotation>
- <annotation expr="!class(@org.jboss.annotation.ejb.DefaultActivationSpecs)">
- @org.jboss.annotation.ejb.DefaultActivationSpecs (value={@javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="queue/tutorial/defaultedexample")})
- </annotation>
</domain>
</aop>
Modified: projects/ejb3/trunk/docs/tutorial/mdb/pom.xml
===================================================================
--- projects/ejb3/trunk/docs/tutorial/mdb/pom.xml 2008-12-29 09:36:35 UTC (rev 82555)
+++ projects/ejb3/trunk/docs/tutorial/mdb/pom.xml 2008-12-29 09:42:00 UTC (rev 82556)
@@ -9,7 +9,7 @@
<!-- Model Version -->
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-tutorial-common</artifactId>
@@ -18,24 +18,22 @@
</parent>
<properties>
- <jboss.ejb3.tutorial.deployables>${build.resource.directory}/queue-example-service.xml,${build.resource.directory}/custom-ejb3-interceptors-aop.xml,${pom.build.directory}/${pom.artifactId}.${pom.packaging}</jboss.ejb3.tutorial.deployables>
+ <jboss.ejb3.tutorial.deployables>${basedir}/queue-example-service.xml,${basedir}/custom-ejb3-interceptors-aop.xml,${pom.build.directory}/${pom.artifactId}.${pom.packaging}</jboss.ejb3.tutorial.deployables>
<ejb3.tutorial.client>org.jboss.tutorial.mdb.client.Client</ejb3.tutorial.client>
</properties>
+
-
<artifactId>jboss-ejb3-tutorial-mdb</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Message Driven Beans in EJB3</name>
<url>http://labs.jboss.com/jbossejb3/</url>
<description>
- Tutorial about using Message driven beans in EJB3
- </description>
+ Tutorial about using Message driven beans in EJB3
+ </description>
-
-
</project>
More information about the jboss-cvs-commits
mailing list