tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r606442 - in /openejb/trunk/openejb3/itests: openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/ openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/ openejb-itests-interceptor-beans/ openejb-itests-int...
Date Sat, 22 Dec 2007 10:17:05 GMT
Author: jlaskowski
Date: Sat Dec 22 02:17:04 2007
New Revision: 606442

URL: http://svn.apache.org/viewvc?rev=606442&view=rev
Log:
Error/warning cleanup + System.out.println removal


Modified:
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
    openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbHomeTests.java
    openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptorTests.java
    openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteIntfcTests.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/pom.xml
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateful/StatefulInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/SecondStatelessInterceptedBean.java
    openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/src/main/java/org/apache/openejb/test/stateless/StatelessInterceptedBean.java

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java?rev=606442&r1=606441&r2=606442&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/DefaultInterceptor.java
Sat Dec 22 02:17:04 2007
@@ -44,7 +44,7 @@
      * the invocation of proceed in the last interceptor method in the chain is a no-op,
and null is returned. 
      * If there is more than one such interceptor method, the invocation of proceed causes
the container to execute those methods in order.
      * 
-     * @throws runtime exceptions or application exceptions that are allowed in the throws
clause of the business method.
+     * @throws Exception runtime exceptions or application exceptions that are allowed in
the throws clause of the business method.
      */    
     @AroundInvoke
     public Object defaultInterceptor(InvocationContext ctx) throws Exception {        
@@ -58,13 +58,12 @@
      * 
      * @param ctx - InvocationContext
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostConstruct
     public void defaultInterceptorPostConstruct(InvocationContext ctx) throws Exception {
         Interceptor.profile(ctx, "defaultInterceptorPostConstruct");
         ctx.proceed();
-        return;
     }
     
     
@@ -74,13 +73,12 @@
      * 
      * @param ctx - InvocationContext
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostActivate
     public void defaultInterceptorPostActivate(InvocationContext ctx) throws Exception {
         Interceptor.profile(ctx, "defaultInterceptorPostActivate");
         ctx.proceed();
-        return;
     }
     
     /**
@@ -89,13 +87,12 @@
      * 
      * @param ctx - InvocationContext
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PrePassivate
     public void defaultInterceptorPrePassivate(InvocationContext ctx) throws Exception {
         Interceptor.profile(ctx, "defaultInterceptorPrePassivate");
         ctx.proceed();
-        return;
     }
     
     /**
@@ -104,13 +101,12 @@
      * 
      * @param ctx - InvocationContext
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PreDestroy
     public void defaultInterceptorPreDestroy(InvocationContext ctx) throws Exception {
         Interceptor.profile(ctx, "defaultInterceptorPreDestroy");
         ctx.proceed();
-        return;
     }
 
 }

Modified: openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java?rev=606442&r1=606441&r2=606442&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/interceptor/Interceptor.java
Sat Dec 22 02:17:04 2007
@@ -41,7 +41,7 @@
      * The inner map is put back into the contextData against the method name as the key.
      * 
      * @param ctx - InvocationContext
-     * @param interceptorName
+     * @param interceptorName name of the interceptor
      * @return contextData - the contextData which now has been filled with a hashmap of
hashmap.
      */
     @SuppressWarnings("unchecked")
@@ -61,9 +61,8 @@
             KEY = ctx.getMethod().getName();    
         }        
         else {
-            KEY = ((SuperInterceptedBean)ctx.getTarget()).getClass().getSimpleName();
+            KEY = (ctx.getTarget()).getClass().getSimpleName();
         }
-        System.out.print("Intercepting " + KEY);
         
         Map<String, Object> innerMap = (HashMap<String, Object>) ctxData.get(KEY);
         innerMap = updateInterceptorsList(innerMap, interceptorName);
@@ -87,7 +86,6 @@
         Map<String, Object> ctxData = new HashMap<String, Object>();
         
         String KEY = bean.getClass().getSimpleName();
-        System.out.print("Intercepting " + KEY);
         
         Map<String, Object> innerMap = (HashMap<String, Object>) ctxData.get(KEY);
         innerMap = updateInterceptorsList(innerMap, interceptorName);
@@ -111,8 +109,6 @@
         if(interceptorsList == null) {
             interceptorsList = new ArrayList<String>();            
         }
-
-        System.out.println(" by " + interceptorName + "()");
         interceptorsList.add(interceptorName);
         innerMap.put("INTERCEPTORS", interceptorsList);
         

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbHomeTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbHomeTests.java?rev=606442&r1=606441&r2=606442&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbHomeTests.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbHomeTests.java
Sat Dec 22 02:17:04 2007
@@ -42,8 +42,8 @@
     //
     public void test01_getEJBMetaData(){
         try{
-        EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
-        assertNotNull( "EJBMetaData is null", ejbMetaData );
+            EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
+            assertNotNull("EJBMetaData is null", ejbMetaData);
         } catch (Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
@@ -73,7 +73,7 @@
      *
      * Session objects are intended to be private resources used only by the
      * client that created them. For this reason, session objects, from the
-     * clientÂ’s perspective, appear anonymous. In contrast to entity objects,
+     * client's perspective, appear anonymous. In contrast to entity objects,
      * which expose their identity as a primary key, session objects hide their
      * identity. As a result, the EJBObject.getPrimaryKey() and
      * EJBHome.remove(Object primaryKey) methods result in a java.rmi.RemoteException
@@ -91,7 +91,6 @@
         try{
             ejbHome.remove("primaryKey");
         } catch (RemoveException e){
-            assertTrue( true );
             return;
         } catch (Exception e){
             fail("Received Exception " + e.getClass() + " instead of javax.ejb.RemoveException
: " + e.getMessage());

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=606442&r1=606441&r2=606442&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
Sat Dec 22 02:17:04 2007
@@ -20,8 +20,6 @@
 import java.util.Map;
 import java.util.Arrays;
 
-// import javax.ejb.EJB;
-
 /**
  * 
  * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteIntfcTests.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteIntfcTests.java?rev=606442&r1=606441&r2=606442&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteIntfcTests.java
(original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteIntfcTests.java
Sat Dec 22 02:17:04 2007
@@ -85,8 +85,8 @@
         } catch (java.rmi.RemoteException e){
             //Good, so far.
             Throwable n = e.detail;
-            assertNotNull("Nested exception should not be is null", n );
-            assertTrue("Nested exception should be an instance of NullPointerException, but
exception is "+n.getClass().getName(), (n instanceof NullPointerException));
+            assertNotNull("Nested exception should not be null", n );
+            assertTrue("Nested exception should be an instance of NullPointerException, but
exception is "+n.getClass().getName(), n instanceof NullPointerException);
             return;
         } catch (Throwable e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());

Modified: openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/pom.xml?rev=606442&r1=606441&r2=606442&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/pom.xml (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-interceptor-beans/pom.xml Sat Dec 22 02:17:04
2007
@@ -16,6 +16,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
+
+<!-- $Rev: 600344 $ $Date: 2007-12-02 18:17:49 +0100 (Sun, 02 Dec 2007) $ -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>

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=606442&r1=606441&r2=606442&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
Sat Dec 22 02:17:04 2007
@@ -36,8 +36,6 @@
 import org.apache.openejb.test.interceptor.MethodInterceptor;
 
 /**
- * 
- *
  * @version $Rev$ $Date$
  */
 @Stateful(name="StatefulIntercepted")
@@ -49,7 +47,6 @@
 
     /**
      * A simple dummy business method to concat 2 strings
-     * @see org.apache.openejb.test.Stateful.fulInterceptedLocal#concat(java.lang.String,
java.lang.String)
      */
     public String concat(String str1, String str2) {
         return str1.concat(str2);
@@ -57,7 +54,6 @@
 
     /**
      * A simple dummy busines method to reverse a string
-     * @see org.apache.openejb.test.Stateful.fulInterceptedLocal#reverse(java.lang.String)
      */
     @Interceptors({MethodInterceptor.class})
     public String reverse(String str) {
@@ -78,7 +74,7 @@
     }
 
     /**
-     * @param contextData the contextData to set
+     * @param ctxData the contextData to set
      */
     private void setContextData(Map<String, Object> ctxData) {
         StatefulInterceptedBean.contextData.putAll(ctxData);
@@ -96,7 +92,7 @@
      * the invocation of proceed in the last interceptor method in the chain is a no-op,
and null is returned. 
      * If there is more than one such interceptor method, the invocation of proceed causes
the container to execute those methods in order.
      * 
-     * @throws runtime exceptions or application exceptions that are allowed in the throws
clause of the business method.
+     * @throws Exception runtime exceptions or application exceptions that are allowed in
the throws clause of the business method.
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
@@ -110,13 +106,12 @@
      * The interceptor method. 
      * This should intercept postConstruct of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostConstruct");
         setContextData(ctxData);
-        return;
     }
     
     
@@ -124,39 +119,36 @@
      * The interceptor method. 
      * This should intercept postActivate of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostActivate
     public void inBeanInterceptorPostActivate() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPostActivate");
         setContextData(ctxData);
-        return;
     }
     
     /**
      * The interceptor method. 
      * This should intercept prePassivate of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PrePassivate
     public void inBeanInterceptorPrePassivate() throws Exception {
         Map<String, Object> ctxData = Interceptor.profile(this, "inBeanInterceptorPrePassivate");
         setContextData(ctxData);
-        return;
     }
     
     /**
      * The interceptor method. 
      * This should intercept preDestroy of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {
         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=606442&r1=606441&r2=606442&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
Sat Dec 22 02:17:04 2007
@@ -35,8 +35,6 @@
 import org.apache.openejb.test.interceptor.SecondClassInterceptor;
 
 /**
- * 
- *
  * @version $Rev$ $Date$
  */
 @Stateless(name="SecondStatelessIntercepted")
@@ -67,7 +65,7 @@
     }
     
     /**
-     * @param contextData the contextData to set
+     * @param ctxData the contextData to set
      */
     private void setContextData(Map<String, Object> ctxData) {
         SecondStatelessInterceptedBean.contextData.putAll(ctxData);
@@ -95,7 +93,7 @@
      * the invocation of proceed in the last interceptor method in the chain is a no-op,
and null is returned. 
      * If there is more than one such interceptor method, the invocation of proceed causes
the container to execute those methods in order.
      * 
-     * @throws runtime exceptions or application exceptions that are allowed in the throws
clause of the business method.
+     * @throws Exception runtime exceptions or application exceptions that are allowed in
the throws clause of the business method.
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
@@ -109,7 +107,7 @@
      * The interceptor method. 
      * This should intercept postConstruct of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
@@ -122,7 +120,7 @@
      * The interceptor method. 
      * This should intercept preDestroy of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {

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=606442&r1=606441&r2=606442&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
Sat Dec 22 02:17:04 2007
@@ -34,8 +34,6 @@
 import org.apache.openejb.test.interceptor.MethodInterceptor;
 
 /**
- * 
- *
  * @version $Rev$ $Date$
  */
 @Stateless(name="StatelessIntercepted")
@@ -59,13 +57,16 @@
      */
     @Interceptors({MethodInterceptor.class})
     public String reverse(String str) {
+        if (str.length() > 0) {
+            throw new NullPointerException();
+        }
         System.out.println("Reversing " + str);
         StringBuffer b = new StringBuffer(str);
         return b.reverse().toString();
     }
     
     /**
-     * @param contextData the contextData to set
+     * @param ctxData the contextData to set
      */
     private void setContextData(Map<String, Object> ctxData) {
         StatelessInterceptedBean.contextData.putAll(ctxData);
@@ -94,7 +95,7 @@
      * the invocation of proceed in the last interceptor method in the chain is a no-op,
and null is returned. 
      * If there is more than one such interceptor method, the invocation of proceed causes
the container to execute those methods in order.
      * 
-     * @throws runtime exceptions or application exceptions that are allowed in the throws
clause of the business method.
+     * @throws Exception runtime exceptions or application exceptions that are allowed in
the throws clause of the business method.
      */
     @AroundInvoke
     public Object inBeanInterceptor(InvocationContext ctx) throws Exception {
@@ -108,7 +109,7 @@
      * The interceptor method. 
      * This should intercept postConstruct of the bean
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PostConstruct
     public void inBeanInterceptorPostConstruct() throws Exception {
@@ -121,7 +122,7 @@
      * The interceptor method. 
      * This should intercept preDestroy of the bean.
      * 
-     * @throws runtime exceptions.
+     * @throws Exception runtime exceptions.
      */    
     @PreDestroy
     public void inBeanInterceptorPreDestroy() throws Exception {



Mime
View raw message