tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r830888 - in /tuscany/branches/sca-java-1.x/modules: contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/ contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/ implementation-web/src/main/java/...
Date Thu, 29 Oct 2009 10:49:11 GMT
Author: vamsic007
Date: Thu Oct 29 10:49:10 2009
New Revision: 830888

URL: http://svn.apache.org/viewvc?rev=830888&view=rev
Log:
Injection info for SCA references from Java EE optional extension

Added:
    tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
  (with props)
Modified:
    tuscany/branches/sca-java-1.x/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java
    tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EjbReferenceInfo.java
    tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java
    tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
    tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java

Modified: tuscany/branches/sca-java-1.x/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java?rev=830888&r1=830887&r2=830888&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee-impl/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEIntrospectorImpl.java
Thu Oct 29 10:49:10 2009
@@ -38,6 +38,7 @@
 import org.apache.openejb.jee.EnterpriseBean;
 import org.apache.openejb.jee.EnvEntry;
 import org.apache.openejb.jee.Filter;
+import org.apache.openejb.jee.InjectionTarget;
 import org.apache.openejb.jee.Listener;
 import org.apache.openejb.jee.MessageDrivenBean;
 import org.apache.openejb.jee.Servlet;
@@ -187,6 +188,11 @@
 
         ejbReferenceInfo.ejbLink = ejbRef.getEjbLink();
         ejbReferenceInfo.mappedName = ejbRef.getMappedName();
+        if(ejbRef.getInjectionTarget().size() > 0) {
+            InjectionTarget it = ejbRef.getInjectionTarget().iterator().next();
+            ejbReferenceInfo.injectionTarget.targetClass = it.getInjectionTargetClass();
+            ejbReferenceInfo.injectionTarget.targetName = it.getInjectionTargetName();
+        }
 
         return ejbReferenceInfo;
     }

Modified: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EjbReferenceInfo.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EjbReferenceInfo.java?rev=830888&r1=830887&r2=830888&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EjbReferenceInfo.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/EjbReferenceInfo.java
Thu Oct 29 10:49:10 2009
@@ -30,4 +30,5 @@
     public Class<?> businessInterface;
     public String ejbLink;
     public String mappedName;
+    public InjectionTarget injectionTarget = new InjectionTarget();
 }

Added: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java?rev=830888&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
(added)
+++ tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
Thu Oct 29 10:49:10 2009
@@ -0,0 +1,28 @@
+/*
+ * 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.tuscany.sca.contribution.jee;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class InjectionTarget {
+    public String targetClass;
+    public String targetName;
+}

Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tuscany/branches/sca-java-1.x/modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/InjectionTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java?rev=830888&r1=830887&r2=830888&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/WebImplementation.java
Thu Oct 29 10:49:10 2009
@@ -21,6 +21,7 @@
 import java.util.Map;
 
 import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.contribution.jee.InjectionTarget;
 import org.apache.tuscany.sca.implementation.java.impl.JavaElementImpl;
 import org.apache.tuscany.sca.implementation.java.impl.JavaResourceImpl;
 
@@ -63,4 +64,6 @@
      * @return Map with injection points for SCA resources
      */
     Map<String, JavaResourceImpl> getResourceInjectionPoints();
+    
+    Map<InjectionTarget, Class<?>> getOptExtensionReferenceInjectionPoints();
 }

Modified: tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java?rev=830888&r1=830887&r2=830888&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
Thu Oct 29 10:49:10 2009
@@ -30,6 +30,7 @@
 import org.apache.tuscany.sca.assembly.Service;
 import org.apache.tuscany.sca.assembly.builder.ComponentPreProcessor;
 import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
+import org.apache.tuscany.sca.contribution.jee.InjectionTarget;
 import org.apache.tuscany.sca.implementation.java.impl.JavaElementImpl;
 import org.apache.tuscany.sca.implementation.java.impl.JavaResourceImpl;
 import org.apache.tuscany.sca.implementation.web.WebImplementation;
@@ -48,6 +49,8 @@
     private Map<String, JavaElementImpl> referenceInjectionPoints = new HashMap<String,
JavaElementImpl>();
 
     private Map<String, JavaResourceImpl> resourceInjectionPoints = new HashMap<String,
JavaResourceImpl>();
+    
+    private Map<InjectionTarget, Class<?>> optExtReferenceInjectionPoints = new
HashMap<InjectionTarget, Class<?>>();
     /**
      * Constructs a new Web implementation.
      */
@@ -153,4 +156,7 @@
         return resourceInjectionPoints;
     }
 
+    public Map<InjectionTarget, Class<?>> getOptExtensionReferenceInjectionPoints()
{
+        return optExtReferenceInjectionPoints;
+    }
 }

Modified: tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java?rev=830888&r1=830887&r2=830888&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
Thu Oct 29 10:49:10 2009
@@ -35,6 +35,7 @@
 import org.apache.tuscany.sca.assembly.ComponentType;
 import org.apache.tuscany.sca.assembly.xml.Constants;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.jee.EjbReferenceInfo;
 import org.apache.tuscany.sca.contribution.jee.JspReferenceTagInfo;
 import org.apache.tuscany.sca.contribution.jee.WebModuleInfo;
 import org.apache.tuscany.sca.contribution.jee.JavaEEExtension;
@@ -142,6 +143,11 @@
                 ComponentType ct = jeeOptionalExtension.createImplementationWebComponentType(webModuleInfo);
                 implementation.getReferences().addAll(ct.getReferences());
                 implementation.getProperties().addAll(ct.getProperties());
+                // Injection points from optional extension
+                for(Map.Entry<String, EjbReferenceInfo> entry : webModuleInfo.getEjbReferences().entrySet())
{
+                    EjbReferenceInfo ejbRef = entry.getValue();
+                    implementation.getOptExtensionReferenceInjectionPoints().put(ejbRef.injectionTarget,
ejbRef.businessInterface);
+                }
             }
             
             // Introspection of classes



Mime
View raw message