geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1205864 - in /geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans: SingletonCalculator.java StatefulCalculator.java
Date Thu, 24 Nov 2011 15:07:25 GMT
Author: violalu
Date: Thu Nov 24 15:07:24 2011
New Revision: 1205864

URL: http://svn.apache.org/viewvc?rev=1205864&view=rev
Log:
remove empty file

Added:
    geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/SingletonCalculator.java
Removed:
    geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/StatefulCalculator.java

Added: geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/SingletonCalculator.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/SingletonCalculator.java?rev=1205864&view=auto
==============================================================================
--- geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/SingletonCalculator.java
(added)
+++ geronimo/samples/branches/3.0-beta/samples/javaee6/singletonejb-javaee6/singletonejb-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/singletonejb/sessionBeans/SingletonCalculator.java
Thu Nov 24 15:07:24 2011
@@ -0,0 +1,49 @@
+/*
+    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.
+*/
+package org.apache.geronimo.samples.javaee6.singletonejb.sessionBeans;
+
+import javax.ejb.Singleton;
+
+
+@Singleton
+public class SingletonCalculator {
+
+    // Add business logic below. (Right-click in editor and choose
+    // "Insert Code > Add Business Method")
+    String output = "Start the calculator process:<br/>";
+    double result = 0;
+
+    public double add(double d) {
+        double tmp = result + d;
+        this.output += result + " + " + d + " equals " + tmp + "<br/>";
+        result = tmp;
+        return result;
+    }
+
+    public String getOutput() {
+        return this.output;
+    }
+
+    public double sub(double d) {
+        double tmp = result - d;
+        this.output += result + " - " + d + " equals " + tmp + "<br/>";
+        result = tmp;
+        return result;
+    }
+}



Mime
View raw message