tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r630581 - in /openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee: EjbLocalRef.java EjbRef.java EjbReference.java JndiReference.java
Date Sun, 24 Feb 2008 03:39:44 GMT
Author: dblevins
Date: Sat Feb 23 19:39:43 2008
New Revision: 630581

URL: http://svn.apache.org/viewvc?rev=630581&view=rev
Log:
Add new interface for EjbReference implemented by EjbRef and EjbLocalRef

Added:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbReference.java
Modified:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbLocalRef.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbRef.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JndiReference.java

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbLocalRef.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbLocalRef.java?rev=630581&r1=630580&r2=630581&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbLocalRef.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbLocalRef.java
Sat Feb 23 19:39:43 2008
@@ -62,7 +62,7 @@
         "mappedName",
         "injectionTarget"
         })
-public class EjbLocalRef implements JndiReference {
+public class EjbLocalRef implements EjbReference {
 
     @XmlElement(required = true)
     protected List<Text> description;
@@ -87,14 +87,14 @@
     public EjbLocalRef() {
     }
 
-    public EjbLocalRef(EjbRef ref) {
-        this.ejbRefName = ref.getEjbRefName();
+    public EjbLocalRef(EjbReference ref) {
+        this.ejbRefName = ref.getName();
         this.ejbRefType = ref.getEjbRefType();
         this.ejbLink = ref.getEjbLink();
         this.mappedName = ref.getMappedName();
         this.description = ref.getDescription();
         this.injectionTarget = ref.getInjectionTarget();
-        this.local = ref.getRemote();
+        this.local = ref.getInterface();
         this.localHome = ref.getHome();
     }
 
@@ -156,6 +156,21 @@
 
     public String getLocalHome() {
         return localHome;
+    }
+
+    public String getHome() {
+        return getLocalHome();
+    }
+
+    public String getInterface() {
+        return getLocal();
+    }
+
+    public Type getRefType() {
+        return Type.LOCAL;
+    }
+
+    public void setRefType(Type refType) {
     }
 
     public void setLocalHome(String value) {

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbRef.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbRef.java?rev=630581&r1=630580&r2=630581&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbRef.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbRef.java
Sat Feb 23 19:39:43 2008
@@ -64,7 +64,7 @@
         "mappedName",
         "injectionTarget"
         })
-public class EjbRef implements JndiReference {
+public class EjbRef implements EjbReference {
 
     @XmlElement(required = true)
     protected List<Text> description;
@@ -85,10 +85,6 @@
     @XmlID
     protected String id;
 
-    public static enum Type {
-        UNKNOWN, LOCAL, REMOTE;
-    }
-
     @XmlTransient
     protected Type refType = Type.REMOTE;
 
@@ -165,6 +161,10 @@
 
     public String getRemote() {
         return remote;
+    }
+
+    public String getInterface() {
+        return getRemote();
     }
 
     public void setRemote(String value) {

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbReference.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbReference.java?rev=630581&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbReference.java
(added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EjbReference.java
Sat Feb 23 19:39:43 2008
@@ -0,0 +1,43 @@
+/**
+ * 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.openejb.jee;
+
+import java.util.List;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface EjbReference extends JndiReference {
+
+    Type getRefType();
+
+    void setRefType(EjbRef.Type refType);
+
+    String getHome();
+
+    String getInterface();
+
+    EjbRefType getEjbRefType();
+
+    String getEjbLink();
+
+    List<Text> getDescription();
+
+    static enum Type {
+        UNKNOWN, LOCAL, REMOTE;
+    }
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JndiReference.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JndiReference.java?rev=630581&r1=630580&r2=630581&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JndiReference.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/JndiReference.java
Sat Feb 23 19:39:43 2008
@@ -28,4 +28,5 @@
 
     String getMappedName();
     void setMappedName(String mappedName);
+
 }



Mime
View raw message