openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r581127 [2/2] - in /openejb/trunk/openejb3: assembly/openejb-tomcat/src/main/resources/META-INF/org.apache.openejb.tomcat/ container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/a...
Date Tue, 02 Oct 2007 02:13:20 GMT
Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SuperClassInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SuperClassInterceptor.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SuperClassInterceptor.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/SuperClassInterceptor.java
Mon Oct  1 19:13:16 2007
@@ -60,7 +60,7 @@
     @SuppressWarnings("unchecked")
     @AroundInvoke
     public Object superClassInterceptor(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);        
+        Interceptor.profile(ctx, "superClassInterceptor");
         return ctx.proceed();
     }
     
@@ -81,7 +81,7 @@
             System.out.println("SessionContext is null");
         }
        */
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "superClassInterceptorPostConstruct");
         ctx.proceed();
         return;
     }
@@ -97,7 +97,7 @@
      */    
     @PostActivate
     public void superClassInterceptorPostActivate(InvocationContext ctx) throws Exception
{
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "superClassInterceptorPostActivate");
         ctx.proceed();
         return;
     }
@@ -112,7 +112,7 @@
      */    
     @PrePassivate
     public void superClassInterceptorPrePassivate(InvocationContext ctx) throws Exception
{
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "superClassInterceptorPrePassivate");
         ctx.proceed();
         return;
     }
@@ -127,7 +127,7 @@
      */    
     @PreDestroy
     public void superClassInterceptorPreDestroy(InvocationContext ctx) throws Exception {
-        Interceptor.profile(ctx);
+        Interceptor.profile(ctx, "superClassInterceptorPreDestroy");
         ctx.proceed();
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/BasicStatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/BasicStatefulInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/BasicStatefulInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/BasicStatefulInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -99,7 +99,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -113,7 +113,7 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this); 
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
         return;
     }
@@ -127,7 +127,7 @@
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
         return;
     }
@@ -140,7 +140,7 @@
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
         setContextData(ctxData);
         return;
     }
@@ -153,7 +153,7 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.openejb.test.stateless;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.LinkedHashMap;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -42,7 +42,7 @@
 public class BasicStatelessInterceptedBean extends SuperInterceptedBean 
                   implements BasicStatelessInterceptedLocal, BasicStatelessInterceptedRemote
{
     
-    private static Map<String, Object> contextData = new HashMap<String, Object>();

+    private static Map<String, Object> contextData = new LinkedHashMap<String, Object>();
 
     /**
      * A simple dummy business method to concat 2 strings
@@ -96,7 +96,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -110,9 +110,8 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
       
@@ -124,9 +123,8 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
-        return;
     }
 
 }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.java
Mon Oct  1 19:13:16 2007
@@ -17,6 +17,7 @@
 package org.apache.openejb.test.stateless;
 
 import java.util.Map;
+import java.util.List;
 
 /**
  * 

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java
Mon Oct  1 19:13:16 2007
@@ -18,6 +18,7 @@
 
 import java.util.ArrayList;
 import java.util.Map;
+import java.util.Arrays;
 
 // import javax.ejb.EJB;
 
@@ -71,6 +72,8 @@
         Map innerMap = (Map) contextData.get("reverse");
         ArrayList interceptorsList = (ArrayList) innerMap.get("INTERCEPTORS");
         // verifying interceptor chaining order
+        assertEquals(Arrays.asList("ddInterceptor","secondClassInterceptor", "superClassInterceptor",
"classInterceptor", "methodInterceptor", "superBeanInterceptor","inBeanInterceptor"), interceptorsList);
+
         assertEquals("ddInterceptor", interceptorsList.get(0)); //specified in DD
         assertEquals("secondClassInterceptor", interceptorsList.get(1)); //specified in DD
         assertEquals("superClassInterceptor", interceptorsList.get(2)); //derived from class
extension

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/SecondStatefulInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -26,7 +26,6 @@
 import javax.ejb.Stateful;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
 import javax.interceptor.Interceptors;
 import javax.interceptor.InvocationContext;
 
@@ -100,7 +99,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -114,7 +113,7 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this); 
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
         return;
     }
@@ -128,7 +127,7 @@
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
         return;
     }
@@ -141,7 +140,7 @@
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, Thread.currentThread().getStackTrace()[4].getMethodName());
         setContextData(ctxData);
         return;
     }
@@ -154,7 +153,7 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, Thread.currentThread().getStackTrace()[4].getMethodName());
         setContextData(ctxData);
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -100,7 +100,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -114,7 +114,7 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this); 
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
         return;
     }
@@ -128,7 +128,7 @@
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
         return;
     }
@@ -141,7 +141,7 @@
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
         setContextData(ctxData);
         return;
     }
@@ -154,7 +154,7 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/ThirdStatefulInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/ThirdStatefulInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/ThirdStatefulInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/ThirdStatefulInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -26,7 +26,6 @@
 import javax.ejb.Stateful;
 import javax.interceptor.AroundInvoke;
 import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
 import javax.interceptor.Interceptors;
 import javax.interceptor.InvocationContext;
 
@@ -100,7 +99,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -114,7 +113,7 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this); 
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
         return;
     }
@@ -128,7 +127,7 @@
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
         return;
     }
@@ -141,7 +140,7 @@
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
         setContextData(ctxData);
         return;
     }
@@ -154,7 +153,7 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
         return;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.openejb.test.stateless;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.LinkedHashMap;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -45,7 +45,7 @@
 public class SecondStatelessInterceptedBean extends SuperInterceptedBean 
                   implements BasicStatelessInterceptedLocal, BasicStatelessInterceptedRemote
{
     
-    private static Map<String, Object> contextData = new HashMap<String, Object>();

+    private static Map<String, Object> contextData = new LinkedHashMap<String, Object>();
 
     /**
      * A simple dummy business method to concat 2 strings
@@ -99,7 +99,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -113,9 +113,8 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
       
@@ -127,9 +126,8 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
-        return;
     }
 
 }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.openejb.test.stateless;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.LinkedHashMap;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -43,7 +43,7 @@
 public class StatelessInterceptedBean extends SuperInterceptedBean 
                   implements BasicStatelessInterceptedLocal, BasicStatelessInterceptedRemote
{
     
-    private static Map<String, Object> contextData = new HashMap<String, Object>();

+    private static Map<String, Object> contextData = new LinkedHashMap<String, Object>();
 
     /**
      * A simple dummy business method to concat 2 strings
@@ -98,7 +98,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -112,9 +112,8 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
       
@@ -126,9 +125,8 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
-        return;
     }
 
 }

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/ThirdStatelessInterceptedBean.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/ThirdStatelessInterceptedBean.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/ThirdStatelessInterceptedBean.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/ThirdStatelessInterceptedBean.java
Mon Oct  1 19:13:16 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.openejb.test.stateless;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.LinkedHashMap;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -43,7 +43,7 @@
 public class ThirdStatelessInterceptedBean extends SuperInterceptedBean 
                   implements BasicStatelessInterceptedLocal, BasicStatelessInterceptedRemote
{
     
-    private static Map<String, Object> contextData = new HashMap<String, Object>();

+    private static Map<String, Object> contextData = new LinkedHashMap<String, Object>();
 
     /**
      * A simple dummy business method to concat 2 strings
@@ -97,7 +97,7 @@
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(ctx);        
+        Map<String, Object> ctxData = Interceptor.profile(ctx, "inBeanInterceptor");
         setContextData(ctxData);
     
         return ctx.proceed();
@@ -111,9 +111,8 @@
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
       
@@ -125,9 +124,8 @@
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
-        Map<String, Object> ctxData = Interceptor.profile(this);        
+        Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPreDestroy");
         setContextData(ctxData);
-        return;
     }
 
 }

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientDataSource.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientDataSource.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientDataSource.java
(original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClientDataSource.java
Mon Oct  1 19:13:16 2007
@@ -17,18 +17,18 @@
 package org.apache.openejb.client;
 
 import javax.sql.DataSource;
-import java.sql.*;
-import java.sql.Connection;
 import java.io.PrintWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
 
 /**
  * @version $Rev$ $Date$
  */
 public class ClientDataSource implements DataSource {
     private final String jdbcUrl;
-    private final String jdbcDriver;
     private final String defaultPassword;
     private final String defaultUserName;
 
@@ -62,7 +62,6 @@
     public ClientDataSource(String jdbcDriver, String jdbcUrl, String defaultUserName, String
defaultPassword) {
         this.defaultPassword = defaultPassword;
         this.defaultUserName = defaultUserName;
-        this.jdbcDriver = jdbcDriver;
         this.jdbcUrl = jdbcUrl;
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         try {
@@ -95,5 +94,19 @@
     }
 
     public void setLogWriter(PrintWriter out) throws SQLException {
+    }
+
+    public boolean isWrapperFor(java.lang.Class<?> iface) {
+        if (iface == null) throw new NullPointerException("iface is null");
+        return iface.isInstance(this);
+    }
+
+    @SuppressWarnings({"unchecked"})
+    public <T> T unwrap(Class<T> iface) throws SQLException {
+        if (iface == null) throw new NullPointerException("iface is null");
+        if (iface.isInstance(this)) {
+            return (T) this;
+        }
+        throw new SQLException(getClass().getName() + " does not implement " + iface.getName());
     }
 }

Modified: openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java
(original)
+++ openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java
Mon Oct  1 19:13:16 2007
@@ -18,7 +18,6 @@
 
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.IOException;
 import java.util.List;
 
 import javax.naming.Context;
@@ -29,7 +28,6 @@
 import org.apache.openejb.DeploymentInfo;
 import org.apache.openejb.ProxyInfo;
 import org.apache.openejb.Injection;
-import org.apache.openejb.resource.jdbc.JdbcConnectionFactory;
 import org.apache.openejb.util.proxy.ProxyManager;
 import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.LogCategory;
@@ -42,6 +40,7 @@
 import org.apache.openejb.client.ResponseCodes;
 import org.apache.openejb.client.DataSourceMetaData;
 import org.apache.openejb.client.InjectionMetaData;
+import org.apache.commons.dbcp.BasicDataSource;
 import org.omg.CORBA.ORB;
 
 class JndiRequestHandler {
@@ -131,9 +130,9 @@
                     return;
                 } else if (object == null) {
                     throw new NullPointerException("lookup of '"+name+"' returned null");
-                } else if (object instanceof JdbcConnectionFactory){
-                    JdbcConnectionFactory cf = (JdbcConnectionFactory) object;
-                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getJdbcDriver(),
cf.getJdbcUrl(), cf.getDefaultUserName(), cf.getDefaultPassword());
+                } else if (object instanceof BasicDataSource){
+                    BasicDataSource cf = (BasicDataSource) object;
+                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(),
cf.getUrl(), cf.getUsername(), cf.getPassword());
                     res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                     res.setResult(dataSourceMetaData);
                     return;

Modified: openejb/trunk/openejb3/server/openejb-hsql/src/main/java/org/apache/openejb/server/hsql/HsqlService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-hsql/src/main/java/org/apache/openejb/server/hsql/HsqlService.java?rev=581127&r1=581126&r2=581127&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-hsql/src/main/java/org/apache/openejb/server/hsql/HsqlService.java
(original)
+++ openejb/trunk/openejb3/server/openejb-hsql/src/main/java/org/apache/openejb/server/hsql/HsqlService.java
Mon Oct  1 19:13:16 2007
@@ -18,11 +18,10 @@
 package org.apache.openejb.server.hsql;
 
 import org.apache.openejb.core.ConnectorReference;
-import org.apache.openejb.resource.jdbc.JdbcConnectionFactory;
 import org.apache.openejb.server.ServerService;
 import org.apache.openejb.server.ServiceException;
 import org.apache.openejb.server.SelfManaging;
-import org.apache.openejb.util.LogCategory;
+import org.apache.commons.dbcp.BasicDataSource;
 import org.hsqldb.Server;
 import org.hsqldb.ServerConfiguration;
 import org.hsqldb.ServerConstants;
@@ -34,7 +33,6 @@
 import javax.naming.Binding;
 import javax.naming.InitialContext;
 import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
 import javax.naming.NameNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
@@ -99,8 +97,8 @@
                     Object value = binding.getObject();
                     if (value instanceof ConnectorReference) {
                         Object connectionFactory = ((ConnectorReference)value).getObject();
-                        if (connectionFactory instanceof JdbcConnectionFactory) {
-                            JdbcConnectionFactory jdbc = (JdbcConnectionFactory) connectionFactory;
+                        if (connectionFactory instanceof BasicDataSource) {
+                            BasicDataSource jdbc = (BasicDataSource) connectionFactory;
                             String path = getPath(jdbc);
                             if (path != null) {
                                 if (dbIndex > 9) {
@@ -137,13 +135,13 @@
         }
     }
 
-    private String getPath(JdbcConnectionFactory jdbc) {
+    private String getPath(BasicDataSource jdbc) {
         // is this connectoion using the hsql driver?
-        if (!jdbcDriver.class.getName().equals(jdbc.getJdbcDriver())) {
+        if (!jdbcDriver.class.getName().equals(jdbc.getDriverClassName())) {
             return null;
         }
 
-        String url = jdbc.getJdbcUrl();
+        String url = jdbc.getUrl();
 
         // is this a hsql url?
         if (url == null || !url.startsWith("jdbc:hsqldb:")) {



Mime
View raw message