Author: ptahchiev
Date: Wed Jan 16 07:36:58 2008
New Revision: 612487

URL: http://svn.apache.org/viewvc?rev=612487&view=rev
Log:
some changes on the samples/ejb submodule

Added:
    
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
Removed:
    
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/cactus/
Modified:
    jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/build.xml
    jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/pom.xml

Modified: 
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/build.xml?rev=612487&r1=612486&r2=612487&view=diff
==============================================================================
--- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/build.xml 
(original)
+++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/build.xml 
Wed Jan 16 07:36:58 2008
@@ -46,7 +46,7 @@
      ========================================================================
   -->
        <target name="resolve" description="Retrieve dependencies with ivy" 
depends="prepare">
-               <ivy:configure file="${basedir}/../ivysettings.xml" />
+               <ivy:configure file="../ivysettings.xml" />
                <ivy:retrieve file="../ivy.xml" sync="true"/>
   </target>
 
@@ -68,21 +68,13 @@
   -->
        <!--Note that if some dependency is missing in the classpath, instead 
of compilation errors,
       Ivy reports to Maven 'No Compiler Found' error. -->
-       <target name="compile" depends="load.tasks">
-               
+       <target name="compile" depends="load.tasks" description="Compiles the 
needed classes.">
+
                <javac srcdir="${src.dir}"
                       destdir="${build.dir}"
                       classpathref="cactus.classpath"/>
                
-               <javac srcdir="${cactus.src.dir}"
-                      destdir="${cactus.build.dir}">
-                      <classpath>
-                         <path refid="cactus.classpath"/>
-                         <dirset dir="${build.dir}">
-                             <include name="**"/>
-                         </dirset>
-                      </classpath>
-               </javac>
+
        </target>
        
        <!--
@@ -129,17 +121,6 @@
     </ear>
   </target>
   
-  <target name="cactifywar" depends="package-war" 
-        description="Cactifies the given war file.">
-    <!-- Cactify the web-app archive -->
-    <cactifywar srcfile="${target.dir}/${project.name}.war"
-        destfile="${target.dir}/${project.name}-cactified.war"
-        mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
-      <classes dir="${cactus.build.dir}"/>
-    </cactifywar>
-
-  </target>
-
        <!--
      ========================================================================
        Cactify the ready-made ear file.
@@ -151,7 +132,9 @@
         destfile="${target.dir}/${project.name}-cactified.war"
         mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml"
         context="/">
-        <classes dir="${cactus.build.dir}"/>
+        <classes dir="${build.dir}">
+          <include name="org/apache/cactus/sample/ejb/Test*.class"/>
+        </classes>
       </cactuswar>
                </cactifyear>
                

Modified: 
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/pom.xml?rev=612487&r1=612486&r2=612487&view=diff
==============================================================================
--- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/pom.xml 
(original)
+++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/pom.xml 
Wed Jan 16 07:36:58 2008
@@ -27,7 +27,7 @@
        <artifactId>cactus.samples.ejb</artifactId>
        <name>Cactus Ejb Samples - Parent Project</name>
        <description>Cactus Ejb Samples - the parent project</description>
-       <packaging>pom</packaging>
+       <packaging>jar</packaging>
                <dependencies>
                <dependency>
                        <groupId>javax.servlet</groupId>
@@ -70,6 +70,10 @@
                        <version>2.0.0-beta1</version>
                </dependency>
        </dependencies>
+       <properties>
+               <container.id>tomcat5x</container.id>
+               
<container.home>/home/peter/bin/apache/jakarta-tomcat-5.0.28/</container.home>
+       </properties>
        <build>
                <plugins>
                  <plugin>

Added: 
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
URL: 
http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java?rev=612487&view=auto
==============================================================================
--- 
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
 (added)
+++ 
jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/samples/samples-ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
 Wed Jan 16 07:36:58 2008
@@ -0,0 +1,60 @@
+/* 
+ * ========================================================================
+ * 
+ * Copyright 2001-2003 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ========================================================================
+ */
+package org.apache.cactus.sample.ejb;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import org.apache.cactus.ServletTestCase;
+
+/**
+ * Sample Cactus test for a session bean.
+ *
+ * @version $Id: TestConverterEJB.java 238816 2004-02-29 16:36:46Z vmassol $
+ */
+public class TestConverterEJB extends ServletTestCase
+{
+    /**
+     * Class under test
+     */
+    private Converter converter;
+
+    /**
+     * @see TestCase#setUp()
+     */ 
+    public void setUp() throws Exception
+    {
+        Context ctx = new InitialContext();
+        ConverterHome home = (ConverterHome) PortableRemoteObject.narrow(
+            ctx.lookup("Converter"), ConverterHome.class);
+        this.converter = home.create();
+    }
+
+    /**
+     * Verify yen to dollars conversion works.
+     * @throws Exception on error
+     */
+    public void testConvert() throws Exception
+    {
+        double dollar = this.converter.convertYenToDollar(100.0);
+        assertEquals("dollar", 1.0, dollar, 0.01);
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to