Author: pete.muir(a)jboss.org
Date: 2008-12-19 13:25:48 -0500 (Fri, 19 Dec 2008)
New Revision: 591
Added:
ri/trunk/jboss/
ri/trunk/jboss/build.properties
ri/trunk/jboss/build.xml
ri/trunk/jboss/jboss-structure.xml
ri/trunk/jboss/resources/
ri/trunk/jboss/webbeans-deployers-jboss-beans.xml
Removed:
ri/trunk/build.properties
ri/trunk/build.xml
ri/trunk/webbeans-ri/jboss-structure.xml
ri/trunk/webbeans-ri/webbeans-deployers-jboss-beans.xml
Modified:
ri/trunk/examples/build.xml
ri/trunk/examples/readme.txt
ri/trunk/webbeans-api/
ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java
Log:
make jboss dir
Deleted: ri/trunk/build.properties
===================================================================
--- ri/trunk/build.properties 2008-12-19 18:24:14 UTC (rev 590)
+++ ri/trunk/build.properties 2008-12-19 18:25:48 UTC (rev 591)
@@ -1 +0,0 @@
-jboss.home=/Applications/jboss-5.0.0.GA
Deleted: ri/trunk/build.xml
===================================================================
--- ri/trunk/build.xml 2008-12-19 18:24:14 UTC (rev 590)
+++ ri/trunk/build.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<project name="JBoss5DeployerInstall" default="update"
basedir="." xmlns:artifact="urn:maven-artifact-ant">
-
- <path id="maven-ant-tasks.classpath"
path="lib/maven-ant-tasks.jar" />
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"
/>
-
- <property name="maven.dir" location="${basedir}/maven" />
-
- <property file="build.properties" />
-
- <target name="update" depends="install-jboss-ejb3-update">
-
- <fail unless="jboss.home" message="Please pass in
-Djboss.home=..."/>
-
- <delete dir="${jboss.home}/server/default/deployers/webbeans.deployer"
failonerror="false" />
-
- <mkdir dir="target/webbeans.deployer"/>
-
- <artifact:dependencies filesetId="jboss5.deployer.fileset"
versionsId="jboss5.deployer.versions">
- <dependency groupId="org.jboss.webbeans.integration"
artifactId="webbeans-ri-int-microcontainer"
version="5.2.0-SNAPSHOT"/>
- <dependency groupId="org.jboss.webbeans.integration"
artifactId="webbeans-ri-int-jbossas" version="5.2.0-SNAPSHOT"/>
- <remoteRepository id="snapshots.jboss.org"
url="http://snapshots.jboss.org/maven2">
- <snapshots updatePolicy="always" />
- </remoteRepository>
- <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
- </artifact:dependencies>
-
- <artifact:dependencies filesetId="google.collections.fileset">
- <dependency groupId="com.google.collections"
artifactId="google-collections" version="0.8"/>
- </artifact:dependencies>
-
- <copy todir="target/webbeans.deployer">
- <fileset refid="jboss5.deployer.fileset"/>
- <flattenmapper />
- </copy>
-
- <mkdir dir="target/webbeans.deployer/META-INF" />
-
- <copy todir="target/webbeans.deployer/META-INF">
- <fileset dir="${basedir}/webbeans-ri">
- <include name="webbeans-deployers-jboss-beans.xml"/>
- <include name="jboss-structure.xml"/>
- </fileset>
- </copy>
-
- <copy
todir="${jboss.home}/server/default/deployers/webbeans.deployer">
- <fileset dir="target/webbeans.deployer">
- <include name="**/*.xml" />
- <include name="webbeans-*.jar" />
- <include name="google*.jar" />
- </fileset>
- <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${jboss5.deployer.versions}" to="flatten" />
- </copy>
-
- </target>
-
- <target name="install-jboss-ejb3-update">
-
- <fail unless="jboss.home" message="Please pass in
-Djboss.home=..."/>
-
- <artifact:dependencies filesetId="jboss.ejb3.plugin.fileset"
versionsId="jboss.ejb3.plugin.versions">
- <dependency groupId="org.jboss.ejb3"
artifactId="jboss-ejb3-plugin" version="1.0.0-Alpha1"
classifier="installer"/>
- <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
- </artifact:dependencies>
-
- <mkdir dir="target/ejb3.plugin"/>
- <copy todir="target/ejb3.plugin">
- <fileset refid="jboss.ejb3.plugin.fileset"/>
- <chainedmapper>
- <flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${jboss.ejb3.plugin.versions}" to="flatten" />
- </chainedmapper>
- </copy>
- <java jar="target/ejb3.plugin/jboss-ejb3-plugin-installer.jar"
fork="true">
- <arg line="${jboss.home}" />
- </java>
- </target>
-
- <macrodef name="maven">
- <attribute name="target" />
- <attribute name="basedir" />
- <element name="args" implicit="true" optional="true"
/>
- <sequential>
- <java classname="org.codehaus.classworlds.Launcher" fork="true"
dir="@{basedir}">
- <classpath>
- <fileset dir="${maven.dir}/boot">
- <include name="*.jar" />
- </fileset>
- <fileset dir="${maven.dir}/bin">
- <include name="*.*" />
- </fileset>
- </classpath>
- <sysproperty key="classworlds.conf"
value="${maven.dir}/bin/m2.conf" />
- <sysproperty key="maven.home" value="${maven.dir}" />
- <args />
- <arg line="@{target}" />
- </java>
- </sequential>
- </macrodef>
-
-</project>
\ No newline at end of file
Modified: ri/trunk/examples/build.xml
===================================================================
--- ri/trunk/examples/build.xml 2008-12-19 18:24:14 UTC (rev 590)
+++ ri/trunk/examples/build.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -6,6 +6,8 @@
<property file="${wbri.dir}/build.properties"/>
+ <property name="final.url"
value="http://localhost:8080/${example.name}" />
+
<property name="type" value="war" />
<condition property="war">
@@ -37,6 +39,7 @@
<target name="deploy" depends="package">
<copy todir="${jboss.home}/server/default/deploy/"
file="${artifact.target.dir}/${example.name}.${type}"/>
+ <echo message="The app can be accessed at ${final.url}" />
</target>
<target name="clean">
@@ -52,6 +55,7 @@
</target>
<target name="restart" depends="restart.war, restart.ear">
+ <echo message="The app can be accessed at ${final.url}" />
</target>
<target name="undeploy">
Modified: ri/trunk/examples/readme.txt
===================================================================
--- ri/trunk/examples/readme.txt 2008-12-19 18:24:14 UTC (rev 590)
+++ ri/trunk/examples/readme.txt 2008-12-19 18:25:48 UTC (rev 591)
@@ -1,8 +1,11 @@
-The Web Beans RI currently comes with a single example, webbeans-numberguess.
+The Web Beans RI currently comes with a two examples, webbeans-numberguess (a
+war example) and webbeans-translator (an EJB example).
To run the example on JBoss AS 5.0.0.GA, you need to add the Web Beans RI
-deployer to JBoss 5. First, set the path to JBoss 5 in ../build.properties.
-Then, run ant -f ../build.xml install-jboss5 in the examples directory.
+deployer to JBoss 5. First, set the path to JBoss 5 in ../build.properties.
+Make sure you have the ANT_HOME environment variable set, and pointing to your
+ant install. Then, run ant -f ../build.xml install-jboss5 in the examples
+directory.
To deploy the example to JBoss AS 5, change into numberguess directory and
choose between:
Copied: ri/trunk/jboss/build.properties (from rev 568, ri/trunk/build.properties)
===================================================================
--- ri/trunk/jboss/build.properties (rev 0)
+++ ri/trunk/jboss/build.properties 2008-12-19 18:25:48 UTC (rev 591)
@@ -0,0 +1 @@
+jboss.home=/Applications/jboss-5.0.0.GA
Copied: ri/trunk/jboss/build.xml (from rev 590, ri/trunk/build.xml)
===================================================================
--- ri/trunk/jboss/build.xml (rev 0)
+++ ri/trunk/jboss/build.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<project name="JBoss5DeployerInstall" default="update"
basedir="." xmlns:artifact="urn:maven-artifact-ant">
+
+ <path id="maven-ant-tasks.classpath"
path="lib/maven-ant-tasks.jar" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"
/>
+
+ <property name="maven.dir" location="${basedir}/maven" />
+
+ <property file="build.properties" />
+
+ <target name="update" depends="install-jboss-ejb3-update">
+
+ <fail unless="jboss.home" message="Please pass in
-Djboss.home=..."/>
+
+ <delete dir="${jboss.home}/server/default/deployers/webbeans.deployer"
failonerror="false" />
+
+ <mkdir dir="target/webbeans.deployer"/>
+
+ <artifact:dependencies filesetId="jboss5.deployer.fileset"
versionsId="jboss5.deployer.versions">
+ <dependency groupId="org.jboss.webbeans.integration"
artifactId="webbeans-ri-int-microcontainer"
version="5.2.0-SNAPSHOT"/>
+ <dependency groupId="org.jboss.webbeans.integration"
artifactId="webbeans-ri-int-jbossas" version="5.2.0-SNAPSHOT"/>
+ <remoteRepository id="snapshots.jboss.org"
url="http://snapshots.jboss.org/maven2">
+ <snapshots updatePolicy="always" />
+ </remoteRepository>
+ <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
+ </artifact:dependencies>
+
+ <artifact:dependencies filesetId="google.collections.fileset">
+ <dependency groupId="com.google.collections"
artifactId="google-collections" version="0.8"/>
+ </artifact:dependencies>
+
+ <copy todir="target/webbeans.deployer">
+ <fileset refid="jboss5.deployer.fileset"/>
+ <flattenmapper />
+ </copy>
+
+ <mkdir dir="target/webbeans.deployer/META-INF" />
+
+ <copy todir="target/webbeans.deployer/META-INF">
+ <fileset dir="${basedir}/webbeans-ri">
+ <include name="webbeans-deployers-jboss-beans.xml"/>
+ <include name="jboss-structure.xml"/>
+ </fileset>
+ </copy>
+
+ <copy
todir="${jboss.home}/server/default/deployers/webbeans.deployer">
+ <fileset dir="target/webbeans.deployer">
+ <include name="**/*.xml" />
+ <include name="webbeans-*.jar" />
+ <include name="google*.jar" />
+ </fileset>
+ <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${jboss5.deployer.versions}" to="flatten" />
+ </copy>
+
+ </target>
+
+ <target name="install-jboss-ejb3-update">
+
+ <fail unless="jboss.home" message="Please pass in
-Djboss.home=..."/>
+
+ <artifact:dependencies filesetId="jboss.ejb3.plugin.fileset"
versionsId="jboss.ejb3.plugin.versions">
+ <dependency groupId="org.jboss.ejb3"
artifactId="jboss-ejb3-plugin" version="1.0.0-Alpha1"
classifier="installer"/>
+ <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
+ </artifact:dependencies>
+
+ <mkdir dir="target/ejb3.plugin"/>
+ <copy todir="target/ejb3.plugin">
+ <fileset refid="jboss.ejb3.plugin.fileset"/>
+ <chainedmapper>
+ <flattenmapper />
+ <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${jboss.ejb3.plugin.versions}" to="flatten" />
+ </chainedmapper>
+ </copy>
+ <java jar="target/ejb3.plugin/jboss-ejb3-plugin-installer.jar"
fork="true">
+ <arg line="${jboss.home}" />
+ </java>
+ </target>
+
+ <macrodef name="maven">
+ <attribute name="target" />
+ <attribute name="basedir" />
+ <element name="args" implicit="true" optional="true"
/>
+ <sequential>
+ <java classname="org.codehaus.classworlds.Launcher" fork="true"
dir="@{basedir}">
+ <classpath>
+ <fileset dir="${maven.dir}/boot">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${maven.dir}/bin">
+ <include name="*.*" />
+ </fileset>
+ </classpath>
+ <sysproperty key="classworlds.conf"
value="${maven.dir}/bin/m2.conf" />
+ <sysproperty key="maven.home" value="${maven.dir}" />
+ <args />
+ <arg line="@{target}" />
+ </java>
+ </sequential>
+ </macrodef>
+
+</project>
\ No newline at end of file
Copied: ri/trunk/jboss/jboss-structure.xml (from rev 568,
ri/trunk/webbeans-ri/jboss-structure.xml)
===================================================================
--- ri/trunk/jboss/jboss-structure.xml (rev 0)
+++ ri/trunk/jboss/jboss-structure.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<structure>
+ <context>
+ <path name=""/>
+ <metaDataPath>
+ <path name="META-INF"/>
+ </metaDataPath>
+ <classpath>
+ <path name="" suffixes=".jar" />
+ </classpath>
+ </context>
+</structure>
Copied: ri/trunk/jboss/webbeans-deployers-jboss-beans.xml (from rev 568,
ri/trunk/webbeans-ri/webbeans-deployers-jboss-beans.xml)
===================================================================
--- ri/trunk/jboss/webbeans-deployers-jboss-beans.xml (rev 0)
+++ ri/trunk/jboss/webbeans-deployers-jboss-beans.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Web Beans RI + JBossAS integration
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Web Beans deployer -->
+ <bean name="WebBeansDeployer"
class="org.jboss.webbeans.integration.microcontainer.WebBeanDiscoveryDeployer"/>
+
+</deployment>
Property changes on: ri/trunk/webbeans-api
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
target
+ .classpath
.project
target
cobertura.ser
Modified: ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-12-19 18:24:14 UTC
(rev 590)
+++ ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-12-19 18:25:48 UTC
(rev 591)
@@ -1,4 +1,4 @@
-#Wed Dec 10 10:36:17 CET 2008
+#Tue Dec 16 18:57:16 GMT 2008
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.5
Deleted: ri/trunk/webbeans-ri/jboss-structure.xml
===================================================================
--- ri/trunk/webbeans-ri/jboss-structure.xml 2008-12-19 18:24:14 UTC (rev 590)
+++ ri/trunk/webbeans-ri/jboss-structure.xml 2008-12-19 18:25:48 UTC (rev 591)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<structure>
- <context>
- <path name=""/>
- <metaDataPath>
- <path name="META-INF"/>
- </metaDataPath>
- <classpath>
- <path name="" suffixes=".jar" />
- </classpath>
- </context>
-</structure>
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-12-19
18:24:14 UTC (rev 590)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-12-19
18:25:48 UTC (rev 591)
@@ -91,4 +91,6 @@
*/
public String getEjbName();
+ public String getLocalJndiName();
+
}
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java 2008-12-19
18:24:14 UTC (rev 590)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java 2008-12-19
18:25:48 UTC (rev 591)
@@ -70,19 +70,14 @@
@SuppressWarnings("unchecked")
public static <T> T lookup(EjbDescriptor<T> ejbDescriptor)
{
- if (!ejbDescriptor.getLocalBusinessInterfaces().iterator().hasNext())
- {
- throw new RuntimeException("EJB must have local interface " +
ejbDescriptor);
- }
- String jndiName =
ejbDescriptor.getLocalBusinessInterfaces().iterator().next().getJndiName();
try
{
// TODO Implement enterprise proxies and select the correct jndiName
- return (T) JNDI.lookup(jndiName);
+ return (T) JNDI.lookup(ejbDescriptor.getLocalJndiName());
}
catch (Exception e)
{
- throw new CreationException("could not find the name in JNDI " +
jndiName, e);
+ throw new CreationException("could not find the name in JNDI " +
ejbDescriptor.getLocalJndiName(), e);
}
}
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java
===================================================================
---
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java 2008-12-19
18:24:14 UTC (rev 590)
+++
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java 2008-12-19
18:25:48 UTC (rev 591)
@@ -121,6 +121,11 @@
return type.isAnnotationPresent(Stateless.class);
}
+ public String getLocalJndiName()
+ {
+ return type.getSimpleName() + "/local";
+ }
+
@Override
public String toString()
{
Deleted: ri/trunk/webbeans-ri/webbeans-deployers-jboss-beans.xml
===================================================================
--- ri/trunk/webbeans-ri/webbeans-deployers-jboss-beans.xml 2008-12-19 18:24:14 UTC (rev
590)
+++ ri/trunk/webbeans-ri/webbeans-deployers-jboss-beans.xml 2008-12-19 18:25:48 UTC (rev
591)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Web Beans RI + JBossAS integration
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- Web Beans deployer -->
- <bean name="WebBeansDeployer"
class="org.jboss.webbeans.integration.microcontainer.WebBeanDiscoveryDeployer"/>
-
-</deployment>