geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r156198 - in geronimo/trunk/modules: connector-builder/src/test/org/apache/geronimo/connector/deployment/ j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/ jetty-builder/src/test/org/apache/geronimo/jetty/deployment/ naming-builder/src/java/org/apache/geronimo/naming/deployment/ naming/src/java/org/apache/geronimo/naming/java/
Date Fri, 04 Mar 2005 21:14:17 GMT
Author: djencks
Date: Fri Mar  4 13:14:13 2005
New Revision: 156198

URL: http://svn.apache.org/viewcvs?view=rev&rev=156198
Log:
Bind HandleDelegate in java:comp

Modified:
    geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
    geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
    geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
    geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java

Modified: geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
Fri Mar  4 13:14:13 2005
@@ -108,6 +108,10 @@
         public Reference createEJBRemoteReference(String objectName, boolean isSession, String
home, String remote) throws DeploymentException {
             return null;
         }
+
+        public Object createHandleDelegateReference() {
+            return null;
+        }
     };
 
     private ResourceReferenceBuilder resourceReferenceBuilder = new ResourceReferenceBuilder()
{

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java
Fri Mar  4 13:14:13 2005
@@ -29,4 +29,6 @@
 
     Reference createEJBRemoteReference(String objectName, boolean isSession, String home,
String remote) throws DeploymentException;
 
+    Object createHandleDelegateReference();
+
 }

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
Fri Mar  4 13:14:13 2005
@@ -221,6 +221,10 @@
         return ejbReferenceBuilder.createEJBLocalReference(objectName, isSession, localHome,
local);
     }
 
+    public Object getHandleDelegateReference() {
+        return ejbReferenceBuilder.createHandleDelegateReference();
+    }
+
     public Reference getEJBRemoteRef(URI module, String ejbLink, boolean isSession, String
home, String remote) throws DeploymentException {
         String name = ejbLink.substring(ejbLink.lastIndexOf('#') + 1);
         String containerId = getContainerId(module, ejbLink, (Map) ejbRemoteIndex.get(name));

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
Fri Mar  4 13:14:13 2005
@@ -172,6 +172,10 @@
             public Reference createEJBRemoteReference(String objectName, boolean isSession,
String home, String remote) {
                 return new FakeReference(objectName);
             }
+
+            public Object createHandleDelegateReference() {
+                return null;
+            }
         }, new ResourceReferenceBuilder() {
 
             public Reference createResourceRef(String containerId, Class iface) {

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
Fri Mar  4 13:14:13 2005
@@ -76,4 +76,8 @@
     public Reference createEJBRemoteReference(String objectName, boolean isSession, String
home, String remote) throws DeploymentException {
         return null;
     }
+
+    public Object createHandleDelegateReference() {
+        return null;
+    }
 }

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Fri Mar  4 13:14:13 2005
@@ -158,6 +158,10 @@
                     public Reference createEJBRemoteReference(String objectName, boolean
isSession, String home, String remote) throws DeploymentException {
                         return null;
                     }
+
+                    public Object createHandleDelegateReference() {
+                        return null;
+                    }
                 },
                 new ResourceReferenceBuilder() {
 

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Fri Mar  4 13:14:13 2005
@@ -183,8 +183,6 @@
                     builder.bind(name, new URL(gerResourceRef.getUrl()));
                 } catch (MalformedURLException e) {
                     throw  new DeploymentException("Could not convert " + gerResourceRef.getUrl()
+ " to URL", e);
-                } catch (NamingException e) {
-                    throw  new DeploymentException("Could not bind " + name, e);
                 }
             } else {
                 //determine jsr-77 type from interface
@@ -201,11 +199,7 @@
                 String containerId = getResourceContainerId(name, j2eeType, uri, gerResourceRef,
refContext, j2eeContext, earContext);
 
                 ref = refContext.getConnectionFactoryRef(containerId, iface);
-                try {
-                    builder.bind(name, ref);
-                } catch (NamingException e) {
-                    throw new DeploymentException("Invalid resource-ref definition for name:
" + name, e);
-                }
+                builder.bind(name, ref);
             }
         }
 
@@ -260,11 +254,7 @@
             String containerId = getAdminObjectContainerId(name, uri, gerResourceEnvRef,
refContext, j2eeContext);
             Reference ref = refContext.getAdminObjectRef(containerId, iface);
 
-            try {
-                builder.bind(name, ref);
-            } catch (NamingException e) {
-                throw new DeploymentException("Invalid resource-ref definition for name:
" + name, e);
-            }
+            builder.bind(name, ref);
         }
     }
 
@@ -314,11 +304,7 @@
             //throws exception if it can't locate ref.
             String containerId = refContext.getAdminObjectContainerId(uri, linkName, earContext.getJ2eeContext());
             Reference ref = refContext.getAdminObjectRef(containerId, iface);
-            try {
-                builder.bind(name, ref);
-            } catch (NamingException e) {
-                throw new DeploymentException("Invalid message-destination-ref definition
for name: " + name, e);
-            }
+            builder.bind(name, ref);
 
         }
 
@@ -379,11 +365,7 @@
                     ejbReference = refContext.getImplicitEJBRemoteRef(uri, ejbRefName, isSession,
home, remote);
                 }
             }
-            try {
-                builder.bind(ejbRefName, ejbReference);
-            } catch (NamingException e) {
-                throw new DeploymentException("Unable to to bind ejb-ref: ejb-ref-name="
+ ejbRefName);
-            }
+            builder.bind(ejbRefName, ejbReference);
         }
     }
 
@@ -436,11 +418,7 @@
             } else {
                 ejbReference = refContext.getImplicitEJBLocalRef(uri, ejbLink, isSession,
localHome, local);
             }
-            try {
-                builder.bind(ejbRefName, ejbReference);
-            } catch (NamingException e) {
-                throw new DeploymentException("Unable to to bind ejb-local-ref: ejb-ref-name="
+ ejbRefName);
-            }
+            builder.bind(ejbRefName, ejbReference);
         }
     }
 
@@ -503,11 +481,7 @@
 
             //we could get a Reference or the actual serializable Service back.
             Object ref = refContext.getServiceReference(serviceInterface, wsdlURI, jaxrpcMappingURI,
serviceQName, portComponentRefMap, handlerInfos, portLocationMap, earContext, module, cl);
-            try {
-                builder.bind(name, ref);
-            } catch (NamingException e) {
-                throw new DeploymentException("Invalid resource-ref definition for name:
" + name, e);
-            }
+            builder.bind(name, ref);
         }
 
     }
@@ -656,11 +630,12 @@
         ComponentContextBuilder builder = new ComponentContextBuilder();
 
         if (userTransaction != null) {
-            try {
-                builder.addUserTransaction(userTransaction);
-            } catch (NamingException e) {
-                throw new DeploymentException("Could not bind UserTransaction", e);
-            }
+            builder.addUserTransaction(userTransaction);
+        }
+
+        Object handleDelegateReference = earContext.getRefContext().getHandleDelegateReference();
+        if (handleDelegateReference != null) {
+            builder.addHandleDelegateReference(handleDelegateReference);
         }
 
         URI uri = module.getConfigId();

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java?view=diff&r1=156197&r2=156198
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
Fri Mar  4 13:14:13 2005
@@ -41,11 +41,15 @@
         return context;
     }
 
-    public void addUserTransaction(UserTransaction userTransaction) throws NamingException
{
+    public void addUserTransaction(UserTransaction userTransaction) {
         context.put("UserTransaction", userTransaction);
     }
 
-    public void bind(String name, Object value) throws NamingException {
+    public void addHandleDelegateReference(Object handleDelegateReference) {
+        context.put("HandleDelegate", handleDelegateReference);
+    }
+
+    public void bind(String name, Object value) {
         context.put(ENV + name, value);
     }
 
@@ -97,4 +101,5 @@
         }
         context.put(ENV + name, value);
     }
+
 }



Mime
View raw message