You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ec...@apache.org on 2008/04/08 08:41:00 UTC
svn commit: r645776 [3/9] - in /geronimo/samples/branches/1.1: ./
migration-ejb-bmp/ migration-ejb-bmp/config/
migration-ejb-bmp/config/geronimo/ migration-ejb-bmp/config/jboss/
migration-ejb-bmp/src/ migration-ejb-bmp/src/META-INF/ migration-ejb-bmp/s...
Added: geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt Mon Apr 7 23:40:31 2008
@@ -0,0 +1,350 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] 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.
+
+=========================================================================
+J2G, Commons Logging, commons-el, jasper-runtime, jasper-compiler,
+jasper-compiler-jdt, geronimo-jsp_spec, and geronimo-servlet-spec use the
+above Apache License v2.0.
+=========================================================================
+
+=========================================================================
+== Dom4j License ==
+=========================================================================
+
+Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
+
+Redistribution and use of this software and associated documentation
+("Software"), with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain copyright
+ statements and notices. Redistributions must also contain a
+ copy of this document.
+
+2. Redistributions in binary form must reproduce the
+ above copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+3. The name "DOM4J" must not be used to endorse or promote
+ products derived from this Software without prior written
+ permission of MetaStuff, Ltd. For written permission,
+ please contact dom4j-info@metastuff.com.
+
+4. Products derived from this Software may not be called "DOM4J"
+ nor may "DOM4J" appear in their names without prior written
+ permission of MetaStuff, Ltd. DOM4J is a registered
+ trademark of MetaStuff, Ltd.
+
+5. Due credit should be given to the DOM4J Project -
+ http://www.dom4j.org
+
+THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=========================================================================
+== Jaxen License ==
+=========================================================================
+
+ Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the Jaxen Project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=========================================================================
+== PullParser License ==
+=========================================================================
+
+Copyright 2002 The Trustees of Indiana University.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1) All redistributions of source code must retain the above
+ copyright notice, the list of authors in the original source
+ code, this list of conditions and the disclaimer listed in this
+ license;
+
+2) All redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the disclaimer
+ listed in this license in the documentation and/or other
+ materials provided with the distribution;
+
+3) Any documentation included with all redistributions must include
+ the following acknowledgement:
+
+ "This product includes software developed by the Indiana
+ University Extreme! Lab. For further information please visit
+ http://www.extreme.indiana.edu/"
+
+ Alternatively, this acknowledgment may appear in the software
+ itself, and wherever such third-party acknowledgments normally
+ appear.
+
+4) The name "Indiana Univeristy" and "Indiana Univeristy
+ Extreme! Lab" shall not be used to endorse or promote
+ products derived from this software without prior written
+ permission from Indiana University. For written permission,
+ please contact http://www.extreme.indiana.edu/.
+
+5) Products derived from this software may not use "Indiana
+ Univeristy" name nor may "Indiana Univeristy" appear in their name,
+ without prior written permission of the Indiana University.
+
+Indiana University provides no reassurances that the source code
+provided does not infringe the patent or any other intellectual
+property rights of any other entity. Indiana University disclaims any
+liability to any recipient for claims brought by any other entity
+based on infringement of intellectual property rights or otherwise.
+
+LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH
+NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA
+UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT
+SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR
+OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT
+SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP
+DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE
+RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
+AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING
+SOFTWARE.
+
+
+
+
+
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/LICENSE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt Mon Apr 7 23:40:31 2008
@@ -0,0 +1,46 @@
+=========================================================================
+== NOTICE file corresponding to section 4(d) of the Apache License, ==
+== Version 2.0, in this case for the Apache Geronimo distribution. ==
+=========================================================================
+
+Apache Geronimo
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of the J2G Conversion Tool were orginally developed by International
+Business Machines Corporation and are licensed to the Apache Software
+Foundation under the "Software Grant and Corporate Contribution License
+Agreement", informally known as the "IBM Console CLA".
+
+=========================================================================
+== Commons-logging Notice ==
+=========================================================================
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+=========================================================================
+== Dom4j Notice ==
+=========================================================================
+
+Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
+
+=========================================================================
+== Jaxen Notice ==
+=========================================================================
+
+Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+=========================================================================
+== PullParser Notice ==
+=========================================================================
+
+Copyright 2002 The Trustees of Indiana University.
+All rights reserved.
+
+This product includes software developed by the Indiana
+University Extreme! Lab. For further information please visit
+http://www.extreme.indiana.edu/
+
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/NOTICE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/build.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/build.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/build.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/build.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,270 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!-- ======================================================================
+ JBoss to Geronimo Migration Samples
+ ====================================================================== -->
+<project name="Computer" default="all">
+ <property name="src.dir" value="src" />
+ <property name="dest.dir" value="releases" />
+ <property name="web.dir" value="web" />
+ <property name="config.dir" value="config" />
+ <property name="src.meta-inf.dir" value="src/META-INF" />
+
+ <property file="${config.dir}/build.properties"/>
+
+
+ <!-- =================================================================== -->
+ <!-- Define the class path -->
+ <!-- =================================================================== -->
+ <path id="class.path">
+ <fileset dir="${xdoclet.home}/lib">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${geronimo.home}/repository/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/">
+ <include name="geronimo-j2ee_1.4_spec-1.1.jar" />
+ </fileset>
+ </path>
+
+ <!-- =================================================================== -->
+ <!-- target: all -->
+ <!-- =================================================================== -->
+ <target name="all" depends="geronimo,jboss"/>
+
+ <!-- =================================================================== -->
+ <!-- target: geronimo -->
+ <!-- =================================================================== -->
+ <target name="geronimo" depends="geronimo-jar,geronimo-war">
+ <jar destfile="${dest.dir}/geronimo/Computer.ear">
+ <zipfileset dir="${dest.dir}/geronimo/ear">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/geronimo/ear"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- target: jboss -->
+ <!-- =================================================================== -->
+ <target name="jboss" depends="jboss-jar,jboss-war">
+ <jar destfile="${dest.dir}/jboss/Computer.ear">
+ <zipfileset dir="${dest.dir}/jboss/ear">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/jboss/ear"/>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- target: geronimo-compile-ejb -->
+ <!-- =================================================================== -->
+ <target name="geronimo-jar" depends="geronimo-compile-ejb">
+ <jar destfile="${dest.dir}/geronimo/ear/ComputerEJB.jar">
+ <zipfileset dir="${dest.dir}/geronimo/ear/ejb">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/geronimo/ear/ejb"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- target: jboss-compile-ejb -->
+ <!-- =================================================================== -->
+ <target name="jboss-jar" depends="jboss-compile-ejb">
+ <jar destfile="${dest.dir}/jboss/ear/ComputerEJB.jar">
+ <zipfileset dir="${dest.dir}/jboss/ear/ejb">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/jboss/ear/ejb"/>
+ </target>
+
+ <!-- =================================
+ target: geronimo-compile-ejb
+ ================================= -->
+ <target name="geronimo-compile-ejb" depends="package">
+ <javac srcdir="${src.dir}" destdir="${dest.dir}/geronimo/ear/ejb">
+ <classpath path="${geronimo.home}/repository/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/geronimo-j2ee_1.4_spec-1.1.jar" />
+ </javac>
+
+ <delete>
+ <fileset dir="${dest.dir}/geronimo/ear/ejb">
+ <include name="org/apache/geronimo/samples/computer/web/*.class" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =================================
+ target: jboss-compile-ejb
+ ================================= -->
+ <target name="jboss-compile-ejb" depends="package">
+ <javac srcdir="${src.dir}" destdir="${dest.dir}/jboss/ear/ejb">
+ <classpath path="${geronimo.home}/repository/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/geronimo-j2ee_1.4_spec-1.1.jar" />
+ </javac>
+ <delete>
+ <fileset dir="${dest.dir}/jboss/ear/ejb">
+ <include name="org/apache/geronimo/samples/computer/web/*.class" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =================================
+ target: geronimo-compile-web
+ ================================= -->
+ <target name="geronimo-compile-web" depends="package">
+ <javac srcdir="${src.dir}" destdir="${dest.dir}/geronimo/ear/war/WEB-INF/classes">
+ <classpath path="${geronimo.home}/repository/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/geronimo-j2ee_1.4_spec-1.1.jar" />
+ </javac>
+ <delete>
+ <fileset dir="${dest.dir}/geronimo/ear/war/WEB-INF/classes">
+ <include name="org/apache/geronimo/samples/computer/ejb/*.class" />
+ <include name="org/apache/geronimo/samples/computer/dto/*.class" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =================================
+ target: jboss-compile-web
+ ================================= -->
+ <target name="jboss-compile-web" depends="package">
+ <javac srcdir="${src.dir}" destdir="${dest.dir}/jboss/ear/war/WEB-INF/classes">
+ <classpath path="${geronimo.home}/repository/org/apache/geronimo/specs/geronimo-j2ee_1.4_spec/1.1/geronimo-j2ee_1.4_spec-1.1.jar" />
+ </javac>
+
+ <delete>
+ <fileset dir="${dest.dir}/jboss/ear/war/WEB-INF/classes">
+ <include name="org/apache/geronimo/samples/computer/ejb/*.class" />
+ <include name="org/apache/geronimo/samples/computer/dto/*.class" />
+ </fileset>
+ </delete>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- target: geronimo-war -->
+ <!-- =================================================================== -->
+ <target name="geronimo-war" depends="geronimo-compile-web">
+
+ <delete file="${dest.dir}/geronimo/ear/war/WEB-INF/jboss-web.xml"/>
+
+ <jar destfile="${dest.dir}/geronimo/ear/ComputerWeb.war">
+ <zipfileset dir="${dest.dir}/geronimo/ear/war">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/geronimo/ear/war"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- target: jboss-war -->
+ <!-- =================================================================== -->
+ <target name="jboss-war" depends="jboss-compile-web">
+
+ <delete file="${dest.dir}/jboss/ear/war/WEB-INF/geronimo-web.xml"/>
+
+ <jar destfile="${dest.dir}/jboss/ear/ComputerWeb.war">
+ <zipfileset dir="${dest.dir}/jboss/ear/war">
+ </zipfileset>
+ </jar>
+ <delete dir="${dest.dir}/jboss/ear/war"/>
+ </target>
+
+
+
+ <!-- =================================
+ package: build directory structure
+ ================================= -->
+ <target name="package" depends="ejbdoclet">
+ <mkdir dir="${dest.dir}/geronimo" />
+ <mkdir dir="${dest.dir}/jboss" />
+ <mkdir dir="${dest.dir}/geronimo/ear" />
+ <mkdir dir="${dest.dir}/jboss/ear" />
+ <mkdir dir="${dest.dir}/jboss/ear/META-INF" />
+
+ <copy todir="${dest.dir}/geronimo/ear/META-INF">
+ <fileset file="${config.dir}/application.xml" />
+ <fileset file="${config.dir}/geronimo-application.xml" />
+ </copy>
+
+ <copy todir="${dest.dir}/jboss/ear/META-INF">
+ <fileset file="${config.dir}/application.xml" />
+ </copy>
+
+ <mkdir dir="${dest.dir}/geronimo/ear/war" />
+ <mkdir dir="${dest.dir}/jboss/ear/war" />
+
+ <mkdir dir="${dest.dir}/geronimo/ear/ejb" />
+ <mkdir dir="${dest.dir}/geronimo/ear/ejb/META-INF" />
+
+ <mkdir dir="${dest.dir}/jboss/ear/ejb" />
+ <mkdir dir="${dest.dir}/jboss/ear/ejb/META-INF" />
+
+ <copy todir="${dest.dir}/geronimo/ear/ejb/META-INF">
+ <fileset file="${src.dir}/META-INF/ejb-jar.xml" />
+ <fileset file="${config.dir}/openejb-jar.xml" />
+ </copy>
+
+ <copy todir="${dest.dir}/jboss/ear/ejb/META-INF">
+ <fileset file="${src.dir}/META-INF/ejb-jar.xml" />
+ <fileset file="${config.dir}/jboss.xml" />
+ </copy>
+
+ <copy todir="${dest.dir}/geronimo/ear/war">
+ <fileset dir="${web.dir}" />
+ </copy>
+
+ <mkdir dir="${dest.dir}/geronimo/ear/war/WEB-INF/classes" />
+ <mkdir dir="${dest.dir}/jboss/ear/war/WEB-INF/classes" />
+
+ <copy todir="${dest.dir}/jboss/ear/war">
+ <fileset dir="${web.dir}" />
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Invoke XDoclet's ejbdoclet -->
+ <!-- =================================================================== -->
+ <target name="ejbdoclet" depends="init">
+
+ <ejbdoclet destdir="${src.dir}" mergedir="parent-fake-to-debug" excludedtags="@version,@author,@todo" addedtags="@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}" ejbspec="2.1" force="${samples.xdoclet.force}" verbose="false">
+
+ <fileset dir="${src.dir}">
+ <include name="org/apache/geronimo/samples/computer/ejb/*Bean.java" />
+ </fileset>
+
+ <remoteinterface />
+ <localinterface />
+ <homeinterface />
+ <localhomeinterface />
+
+ <entitycmp />
+ <entitybmp />
+
+ <deploymentdescriptor destdir="${src.meta-inf.dir}" validatexml="true" mergedir="fake-to-debug" description="">
+ </deploymentdescriptor>
+
+ </ejbdoclet>
+
+ </target>
+
+
+ <!-- =================================
+ init: initialize EJBDoclet and WebDoclet Tasks
+ ================================= -->
+ <target name="init">
+ <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="class.path" />
+ </target>
+
+
+</project>
+
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/build.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<application
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+ version="1.4">
+ <display-name>Computer</display-name>
+ <module>
+ <ejb>ComputerEJB.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>ComputerWeb.war</web-uri>
+ <context-root>/computer</context-root>
+ </web>
+ </module>
+</application>
\ No newline at end of file
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/application.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties Mon Apr 7 23:40:31 2008
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+## Set the Geronimo 1.1 home here
+geronimo.home=<geronimo_home>
+
+## XDoclet 1.2.3 Home
+xdoclet.home=<xdoclet_home>
\ No newline at end of file
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/build.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <dep:moduleId>
+ <dep:groupId>org.apache.geronimo.samples</dep:groupId>
+ <dep:artifactId>Computer</dep:artifactId>
+ <dep:version>1.0</dep:version>
+ <dep:type>car</dep:type>
+ </dep:moduleId>
+ <dep:dependencies/>
+ <dep:hidden-classes/>
+ <dep:non-overridable-classes/>
+ </dep:environment>
+</application>
+
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/geronimo-application.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
+
+<jboss>
+
+ <enterprise-beans>
+
+ <session>
+ <ejb-name>ShoppingCart</ejb-name>
+ <local-jndi-name>ShoppingCart</local-jndi-name>
+
+ <method-attributes>
+ </method-attributes>
+ </session>
+ <session>
+ <ejb-name>ItemService</ejb-name>
+ <local-jndi-name>ItemService</local-jndi-name>
+
+ <method-attributes>
+ </method-attributes>
+ </session>
+
+ </enterprise-beans>
+
+ <resource-managers>
+ </resource-managers>
+
+</jboss>
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/jboss.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
+ <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <dep:moduleId>
+ <dep:groupId>org.apache.geronimo.samples</dep:groupId>
+ <dep:artifactId>ComputerEJB</dep:artifactId>
+ <dep:version>1.0</dep:version>
+ <dep:type>car</dep:type>
+ </dep:moduleId>
+ <dep:dependencies/>
+ <dep:hidden-classes/>
+ <dep:non-overridable-classes/>
+ </dep:environment>
+ <enterprise-beans>
+ <session>
+ <ejb-name>ShoppingCart</ejb-name>
+ <ejb-ref>
+ <ref-name>ejb/ItemServiceLocal</ref-name>
+ <ejb-link>ItemService</ejb-link>
+ </ejb-ref>
+ </session>
+ <session>
+ <ejb-name>ItemService</ejb-name>
+ </session>
+ </enterprise-beans>
+</openejb-jar>
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/config/openejb-jar.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml Mon Apr 7 23:40:31 2008
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
+
+ <display-name>Generated by XDoclet</display-name>
+
+ <enterprise-beans>
+
+ <!-- Session Beans -->
+ <session >
+ <description><![CDATA[ShoppingCart]]></description>
+ <display-name>ShoppingCart</display-name>
+
+ <ejb-name>ShoppingCart</ejb-name>
+
+ <local-home>org.apache.geronimo.samples.computer.ejb.ShoppingCartLocalHome</local-home>
+ <local>org.apache.geronimo.samples.computer.ejb.ShoppingCartLocal</local>
+ <ejb-class>org.apache.geronimo.samples.computer.ejb.ShoppingCartBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Container</transaction-type>
+
+ <ejb-local-ref >
+ <ejb-ref-name>ejb/ItemServiceLocal</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local-home>org.apache.geronimo.samples.computer.ejb.ItemServiceLocalHome</local-home>
+ <local>org.apache.geronimo.samples.computer.ejb.ItemServiceLocal</local>
+ <ejb-link>ItemService</ejb-link>
+ </ejb-local-ref>
+
+ </session>
+
+ <session >
+ <description><![CDATA[ItemService]]></description>
+ <display-name>ItemService</display-name>
+
+ <ejb-name>ItemService</ejb-name>
+
+ <local-home>org.apache.geronimo.samples.computer.ejb.ItemServiceLocalHome</local-home>
+ <local>org.apache.geronimo.samples.computer.ejb.ItemServiceLocal</local>
+ <ejb-class>org.apache.geronimo.samples.computer.ejb.ItemServiceBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+
+ </session>
+
+ <!--
+ To add session beans that you have deployment descriptor info for, add
+ a file to your XDoclet merge directory called session-beans.xml that contains
+ the <session></session> markup for those beans.
+ -->
+
+ <!-- Entity Beans -->
+ <!--
+ To add entity beans that you have deployment descriptor info for, add
+ a file to your XDoclet merge directory called entity-beans.xml that contains
+ the <entity></entity> markup for those beans.
+ -->
+
+ <!-- Message Driven Beans -->
+ <!--
+ To add message driven beans that you have deployment descriptor info for, add
+ a file to your XDoclet merge directory called message-driven-beans.xml that contains
+ the <message-driven></message-driven> markup for those beans.
+ -->
+
+ </enterprise-beans>
+
+ <!-- Relationships -->
+
+ <!-- Assembly Descriptor -->
+ <!--
+ To specify your own assembly descriptor info here, add a file to your
+ XDoclet merge directory called assembly-descriptor.xml that contains
+ the <assembly-descriptor></assembly-descriptor> markup.
+ -->
+
+ <assembly-descriptor >
+ <!--
+ To specify additional security-role elements, add a file in the merge
+ directory called ejb-security-roles.xml that contains them.
+ -->
+
+ <!-- method permissions -->
+ <!--
+ To specify additional method-permission elements, add a file in the merge
+ directory called ejb-method-permissions.ent that contains them.
+ -->
+
+ <!-- transactions -->
+ <!--
+ To specify additional container-transaction elements, add a file in the merge
+ directory called ejb-container-transactions.ent that contains them.
+ -->
+
+ <!-- finder transactions -->
+
+ <!-- message destinations -->
+ <!--
+ To specify additional message-destination elements, add a file in the merge
+ directory called ejb-message-destinations.ent that contains them.
+ -->
+
+ <!-- exclude list -->
+ <!--
+ To specify an exclude-list element, add a file in the merge directory
+ called ejb-exclude-list.xml that contains it.
+ -->
+ </assembly-descriptor>
+
+</ejb-jar>
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,97 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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.
+*/
+/*
+ * Created on Nov 12, 2006
+ *
+ *
+ */
+package org.apache.geronimo.samples.computer.dto;
+
+import java.io.Serializable;
+
+public class ItemDTO implements Serializable{
+
+ private static final long serialVersionUID = 1630580339616364472L;
+
+ private double unitPrice;
+ private String description;
+ private int minimumDiscountPurchase;
+ private double discountPercentage;
+ private int itemId;
+
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * @return Returns the discountPercentage.
+ */
+ public double getDiscountPercentage() {
+ return discountPercentage;
+ }
+ /**
+ * @param discountPercentage The discountPercentage to set.
+ */
+ public void setDiscountPercentage(double discountPercentage) {
+ this.discountPercentage = discountPercentage;
+ }
+ /**
+ * @return Returns the minimumDiscountPurchase.
+ */
+ public int getMinimumDiscountPurchase() {
+ return minimumDiscountPurchase;
+ }
+ /**
+ * @param minimumDiscountPurchase The minimumDiscountPurchase to set.
+ */
+ public void setMinimumDiscountPurchase(int minimumDiscountPurchase) {
+ this.minimumDiscountPurchase = minimumDiscountPurchase;
+ }
+ /**
+ * @return Returns the unitPrice.
+ */
+ public double getUnitPrice() {
+ return unitPrice;
+ }
+ /**
+ * @param unitPrice The unitPrice to set.
+ */
+ public void setUnitPrice(double unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+ /**
+ * @return Returns the itemId.
+ */
+ public int getItemId() {
+ return itemId;
+ }
+ /**
+ * @param itemId The itemId to set.
+ */
+ public void setItemId(int itemId) {
+ this.itemId = itemId;
+ }
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/ItemDTO.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,89 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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.
+*/
+/*
+ * Created on Nov 13, 2006
+ *
+ *
+ */
+package org.apache.geronimo.samples.computer.dto;
+
+import java.io.Serializable;
+
+public class TransactionDTO implements Serializable{
+
+ private static final long serialVersionUID = 5607246400461657743L;
+ private int itemId;
+ private int quantity;
+ private double discountRecieved;
+ private double price;
+
+ /**
+ *
+ */
+ public TransactionDTO() {
+ super();
+ }
+
+ /**
+ * @return Returns the discountRecieved.
+ */
+ public double getDiscountRecieved() {
+ return discountRecieved;
+ }
+ /**
+ * @param discountRecieved The discountRecieved to set.
+ */
+ public void setDiscountRecieved(double discountRecieved) {
+ this.discountRecieved = discountRecieved;
+ }
+ /**
+ * @return Returns the itemId.
+ */
+ public int getItemId() {
+ return itemId;
+ }
+ /**
+ * @param itemId The itemId to set.
+ */
+ public void setItemId(int itemId) {
+ this.itemId = itemId;
+ }
+ /**
+ * @return Returns the price.
+ */
+ public double getPrice() {
+ return price;
+ }
+ /**
+ * @param price The price to set.
+ */
+ public void setPrice(double price) {
+ this.price = price;
+ }
+ /**
+ * @return Returns the quantity.
+ */
+ public int getQuantity() {
+ return quantity;
+ }
+ /**
+ * @param quantity The quantity to set.
+ */
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/dto/TransactionDTO.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,234 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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.
+*/
+/*
+ * Created on Nov 12, 2006
+ *
+ *
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+import javax.ejb.CreateException;
+
+import org.apache.geronimo.samples.computer.dto.ItemDTO;
+
+/**
+ *
+ * @ejb.bean name="ItemService"
+ * display-name="ItemService"
+ * description="ItemService"
+ * local-jndi-name="ItemService"
+ * type="Stateless"
+ * view-type="local"
+ * @ejb.interface generate="local" local-class="org.apache.geronimo.samples.computer.ejb.ItemServiceLocal"
+ * @ejb.home generate="local" local-class="org.apache.geronimo.samples.computer.ejb.ItemServiceLocalHome"
+ */
+public class ItemServiceBean implements SessionBean {
+
+ private static final long serialVersionUID = -3420188256774564384L;
+ /** The session context */
+ private SessionContext context;
+
+ /**
+ *
+ */
+ public ItemServiceBean() {
+ super();
+ }
+
+ /**
+ * Set the associated session context. The container calls this method
+ * after the instance creation.
+ *
+ * The enterprise bean instance should store the reference to the context
+ * object in an instance variable.
+ *
+ * This method is called with no transaction context.
+ *
+ * @throws EJBException Thrown if method fails due to system-level error.
+ */
+ public void setSessionContext(SessionContext newContext)
+ throws EJBException {
+ context = newContext;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbRemove()
+ */
+ public void ejbRemove() throws EJBException, RemoteException {
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbActivate()
+ */
+ public void ejbActivate() throws EJBException, RemoteException {
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbPassivate()
+ */
+ public void ejbPassivate() throws EJBException, RemoteException {
+ }
+
+ /**
+ * An ejbCreate method as required by the EJB specification.
+ *
+ * The container calls the instance?s <code>ejbCreate</code> method whose
+ * signature matches the signature of the <code>create</code> method invoked
+ * by the client. The input parameters sent from the client are passed to
+ * the <code>ejbCreate</code> method. Each session bean class must have at
+ * least one <code>ejbCreate</code> method. The number and signatures
+ * of a session bean?s <code>create</code> methods are specific to each
+ * session bean class.
+ *
+ * @throws CreateException Thrown if method fails due to system-level error.
+ *
+ * @ejb.create-method
+ *
+ */
+ public void ejbCreate() throws CreateException {
+ }
+
+ /**
+ *
+ * @ejb.interface-method view-type = "local"
+ *
+ * @throws EJBException Thrown if method fails due to system-level error.
+ */
+ public List listItems() {
+ List items = new ArrayList();
+
+ //Add Processory Informatios
+ ItemDTO processor = new ItemDTO();
+ processor.setItemId(1);
+ processor.setDescription("PENTIUM-4 2.8 GZ Processor");
+ processor.setUnitPrice(12000);
+ processor.setDiscountPercentage(.05);
+ processor.setMinimumDiscountPurchase(10);
+
+ //Add Hard Disk Information
+ ItemDTO hardDisk = new ItemDTO();
+ hardDisk.setItemId(2);
+ hardDisk.setDescription("120 GB Hard disk");
+ hardDisk.setUnitPrice(9500);
+ hardDisk.setDiscountPercentage(.05);
+ hardDisk.setMinimumDiscountPurchase(8);
+
+ //Add CPU Fan Information
+ ItemDTO processorFan = new ItemDTO();
+ processorFan.setItemId(3);
+ processorFan.setDescription("10W CPU Fan");
+ processorFan.setUnitPrice(3500);
+ processorFan.setDiscountPercentage(.02);
+ processorFan.setMinimumDiscountPurchase(15);
+
+ //Add RAM Module Information
+ ItemDTO ram = new ItemDTO();
+ ram.setItemId(4);
+ ram.setDescription("1G DDR RAM");
+ ram.setUnitPrice(11500);
+ ram.setDiscountPercentage(.08);
+ ram.setMinimumDiscountPurchase(10);
+
+ //Add VGA Card Information
+ ItemDTO vga = new ItemDTO();
+ vga.setItemId(5);
+ vga.setDescription("256MB VGA Card");
+ vga.setUnitPrice(5000);
+ vga.setDiscountPercentage(.05);
+ vga.setMinimumDiscountPurchase(5);
+
+ //Add Sound Card Information
+ ItemDTO soundCard = new ItemDTO();
+ soundCard.setItemId(6);
+ soundCard.setDescription("128bit Sound Card");
+ soundCard.setUnitPrice(4000);
+ soundCard.setDiscountPercentage(.1);
+ soundCard.setMinimumDiscountPurchase(10);
+
+ //Add Monitor Information
+ ItemDTO monitor = new ItemDTO();
+ monitor.setItemId(7);
+ monitor.setDescription("17' LCD Monitor");
+ monitor.setUnitPrice(22000);
+ monitor.setDiscountPercentage(.1);
+ monitor.setMinimumDiscountPurchase(5);
+
+ //Add TV Card Information
+ ItemDTO tvCard = new ItemDTO();
+ tvCard.setItemId(8);
+ tvCard.setDescription("TV Card");
+ tvCard.setUnitPrice(5000);
+ tvCard.setDiscountPercentage(.1);
+ tvCard.setMinimumDiscountPurchase(2);
+
+ //Add Radio Card Information
+ ItemDTO radioCard = new ItemDTO();
+ radioCard.setItemId(9);
+ radioCard.setDescription("Radio Card");
+ radioCard.setUnitPrice(3000);
+ radioCard.setDiscountPercentage(.15);
+ radioCard.setMinimumDiscountPurchase(2);
+
+ //Add Printer Information
+ ItemDTO printer = new ItemDTO();
+ printer.setItemId(10);
+ printer.setDescription("Bubble-jet Printer");
+ printer.setUnitPrice(4500);
+ printer.setDiscountPercentage(.15);
+ printer.setMinimumDiscountPurchase(5);
+
+ items.add(processor);
+ items.add(hardDisk);
+ items.add(processorFan);
+ items.add(ram);
+ items.add(vga);
+ items.add(soundCard);
+ items.add(monitor);
+ items.add(tvCard);
+ items.add(radioCard);
+ items.add(printer);
+
+ return items;
+ }
+
+ /**
+ * @ejb.interface-method view-type = "local"
+ * @param item
+ * @param quantity
+ * @return
+ */
+ public double calculatePrice(ItemDTO item, int quantity){
+ double price = 0.0;
+
+ if(quantity >= item.getMinimumDiscountPurchase()){
+ price = ((1.0 - item.getDiscountPercentage())*item.getUnitPrice()) * quantity;
+ }else {
+ price = item.getUnitPrice() * quantity;
+ }
+
+ return price;
+ }
+
+}
\ No newline at end of file
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,21 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+/**
+ * Local interface for ItemService.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface ItemServiceLocal
+ extends javax.ejb.EJBLocalObject
+{
+
+ public java.util.List listItems( ) ;
+
+ public double calculatePrice( org.apache.geronimo.samples.computer.dto.ItemDTO item,int quantity ) ;
+
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocal.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,22 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+/**
+ * Local home interface for ItemService.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface ItemServiceLocalHome
+ extends javax.ejb.EJBLocalHome
+{
+ public static final String COMP_NAME="java:comp/env/ejb/ItemServiceLocal";
+ public static final String JNDI_NAME="ItemService";
+
+ public org.apache.geronimo.samples.computer.ejb.ItemServiceLocal create()
+ throws javax.ejb.CreateException;
+
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ItemServiceLocalHome.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,193 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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.
+*/
+/*
+ * Created on Nov 13, 2006
+ *
+ *
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.geronimo.samples.computer.dto.ItemDTO;
+import org.apache.geronimo.samples.computer.dto.TransactionDTO;
+
+/**
+ *
+ * @ejb.bean name="ShoppingCart"
+ * display-name="ShoppingCart"
+ * description="ShoppingCart"
+ * local-jndi-name="ShoppingCart"
+ * type="Stateful"
+ * view-type="local"
+ * @ejb.ejb-ref ejb-name="ItemService" view-type="local" ref-name="ejb/ItemServiceLocal"
+ *
+ * @ejb.interface generate="local" local-class="org.apache.geronimo.samples.computer.ejb.ShoppingCartLocal"
+ * @ejb.home generate="local" local-class="org.apache.geronimo.samples.computer.ejb.ShoppingCartLocalHome"
+ */
+public class ShoppingCartBean implements SessionBean {
+
+ private static final long serialVersionUID = -5052586584698389813L;
+ /** The session context */
+ private SessionContext context;
+ private List transactionList;
+
+ /**
+ *
+ */
+ public ShoppingCartBean() {
+ super();
+ }
+
+ /**
+ * Set the associated session context. The container calls this method
+ * after the instance creation.
+ *
+ * The enterprise bean instance should store the reference to the context
+ * object in an instance variable.
+ *
+ * This method is called with no transaction context.
+ *
+ * @throws EJBException Thrown if method fails due to system-level error.
+ */
+ public void setSessionContext(SessionContext newContext)
+ throws EJBException {
+ context = newContext;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbRemove()
+ */
+ public void ejbRemove() throws EJBException, RemoteException {
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbActivate()
+ */
+ public void ejbActivate() throws EJBException, RemoteException {
+ }
+
+ /* (non-Javadoc)
+ * @see javax.ejb.SessionBean#ejbPassivate()
+ */
+ public void ejbPassivate() throws EJBException, RemoteException {
+ }
+
+ /**
+ * Default create method
+ *
+ * @throws CreateException
+ * @ejb.create-method
+ */
+ public void ejbCreate() throws CreateException {
+ transactionList = new ArrayList();
+ }
+
+ /**
+ * @ejb.interface-method view-type = "local"
+ */
+ public boolean addToCart(ItemDTO item, int quantity) throws EJBException {
+ boolean status = false;
+
+ try {
+ for(Iterator iterator = transactionList.iterator(); iterator.hasNext();){
+ TransactionDTO temTransaction = (TransactionDTO)iterator.next();
+ if(temTransaction.getItemId() == item.getItemId()){
+ return status;
+ }
+ }
+
+ TransactionDTO transaction = new TransactionDTO();
+
+ transaction.setItemId(item.getItemId());
+ transaction.setQuantity(quantity);
+
+
+ Context context = new InitialContext();
+ ItemServiceLocalHome itemHome = (ItemServiceLocalHome)context.lookup(ItemServiceLocalHome.COMP_NAME);
+ ItemServiceLocal itemService = itemHome.create();
+
+ double newPrice = itemService.calculatePrice(item, quantity);
+ double originalPrice = item.getUnitPrice() * quantity;
+
+ if(originalPrice != newPrice){
+ transaction.setDiscountRecieved(originalPrice - newPrice);
+ }
+
+ transaction.setPrice(newPrice);
+ transactionList.add(transaction);
+
+ status = true;
+
+ } catch (NamingException e) {
+ } catch (CreateException e) {
+ }
+
+ return status;
+ }
+
+ /**
+ *
+ * @ejb.interface-method view-type = "local"
+ *
+ */
+ public List listCartTransactions(){
+ return transactionList;
+ }
+
+ /**
+ * @ejb.interface-method view-type = "local"
+ */
+ public double getTotal() {
+ double total = 0.0;
+ for(Iterator iterator= transactionList.iterator(); iterator.hasNext();){
+ TransactionDTO transaction = (TransactionDTO)iterator.next();
+
+ total += transaction.getPrice();
+ }
+ return total;
+ }
+
+ /**
+ * @ejb.interface-method view-type = "local"
+ */
+ public void removeTransaction(int itemId) {
+ for(Iterator iterator= transactionList.iterator(); iterator.hasNext();){
+ TransactionDTO transaction = (TransactionDTO)iterator.next();
+
+ if(transaction.getItemId() == itemId){
+ transactionList.remove(transaction);
+ break;
+ }
+
+ }
+ }
+
+
+}
\ No newline at end of file
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,25 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+/**
+ * Local interface for ShoppingCart.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface ShoppingCartLocal
+ extends javax.ejb.EJBLocalObject
+{
+
+ public boolean addToCart( org.apache.geronimo.samples.computer.dto.ItemDTO item,int quantity ) throws javax.ejb.EJBException;
+
+ public java.util.List listCartTransactions( ) ;
+
+ public double getTotal( ) ;
+
+ public void removeTransaction( int itemId ) ;
+
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocal.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java?rev=645776&view=auto
==============================================================================
--- geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java (added)
+++ geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java Mon Apr 7 23:40:31 2008
@@ -0,0 +1,22 @@
+/*
+ * Generated by XDoclet - Do not edit!
+ */
+package org.apache.geronimo.samples.computer.ejb;
+
+/**
+ * Local home interface for ShoppingCart.
+ * @xdoclet-generated at ${TODAY}
+ * @copyright The XDoclet Team
+ * @author XDoclet
+ * @version ${version}
+ */
+public interface ShoppingCartLocalHome
+ extends javax.ejb.EJBLocalHome
+{
+ public static final String COMP_NAME="java:comp/env/ejb/ShoppingCartLocal";
+ public static final String JNDI_NAME="ShoppingCart";
+
+ public org.apache.geronimo.samples.computer.ejb.ShoppingCartLocal create()
+ throws javax.ejb.CreateException;
+
+}
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/samples/branches/1.1/migration-ejb-session/src/org/apache/geronimo/samples/computer/ejb/ShoppingCartLocalHome.java
------------------------------------------------------------------------------
svn:mime-type = text/plain