tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r536603 - in /incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb: config/GeronimoMappedName.java util/proxy/Jdk13ProxyFactory.java
Date Wed, 09 May 2007 17:56:13 GMT
Author: rickmcguire
Date: Wed May  9 10:56:12 2007
New Revision: 536603

URL: http://svn.apache.org/viewvc?view=rev&rev=536603
Log:
OpenEjb MEJB implementation needed for jsr77 mgmt support


Modified:
    incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/GeronimoMappedName.java
    incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/Jdk13ProxyFactory.java

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/GeronimoMappedName.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/GeronimoMappedName.java?view=diff&rev=536603&r1=536602&r2=536603
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/GeronimoMappedName.java
(original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/GeronimoMappedName.java
Wed May  9 10:56:12 2007
@@ -62,6 +62,9 @@
                     String refName = ref.getEjbRefName();
                     ref.setMappedName(MAPPED_NAME_PREFIX + refName);
                 }
+                if (null == mappedName && ref.getEjbRefName().equals("ejb/MEJB"))
{
+                	ref.setMappedName("MEJBGBean/MEJB");
+                }
             }
             for (MessageDestinationRef ref : enterpriseBean.getMessageDestinationRef()) {
                 String refName = ref.getMessageDestinationRefName();

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/Jdk13ProxyFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/Jdk13ProxyFactory.java?view=diff&rev=536603&r1=536602&r2=536603
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/Jdk13ProxyFactory.java
(original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/Jdk13ProxyFactory.java
Wed May  9 10:56:12 2007
@@ -127,7 +127,20 @@
             throw new IllegalArgumentException("It's boring to implement 0 interfaces!");
         }
         Jdk13InvocationHandler handler = new Jdk13InvocationHandler(h);
-        return Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
+        try {
+            return Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
+        } catch (IllegalArgumentException e) {
+            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+            try {
+                Class tcclHomeClass = tccl.loadClass(interfaces[0].getName());
+                if (tcclHomeClass == interfaces[0]) {
+                    return Proxy.newProxyInstance(tccl, interfaces, handler);
+                }
+            } catch (ClassNotFoundException e1) {
+                throw e;
+            }
+            throw e;
+        }
     }
 }
 



Mime
View raw message