Not understand concerns except checkstyle. Lots of project uses some public 
method/fields solely for testing.




________________________________
From: Mark Struberg <strub...@yahoo.de>
To: dev@openwebbeans.apache.org
Sent: Mon, July 26, 2010 3:45:39 PM
Subject: Re: svn commit: r979198 - 
/openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java


sorry, but this commit was done with a very hot needle!

a) it doesn't compile
b) it contains PUBLIC boolean flags! (an absolute no-go)
c) it contains code which is a hack for the TCK only. Sorry if I have to say 
this, but then all the TCK testing is absolutely worth nothing.

I'll drop this flag for now to be able to compile OWB again.

LieGrue,
strub




----- Original Message ----
> From: "gerdo...@apache.org" <gerdo...@apache.org>
> To: comm...@openwebbeans.apache.org
> Sent: Mon, July 26, 2010 10:37:24 AM
> Subject: svn commit: r979198 - 
>/openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
>
>
> 
> Author: gerdogdu
> Date: Mon Jul 26 08:37:23 2010
> New Revision:  979198
> 
> URL:  http://svn.apache.org/viewvc?rev=979198&view=rev
> Log:
> [OWB-426] Tweak  EJBPlugin to work with Standalone Tests
> 
> Modified:
>      
>openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
>
>
> 
> Modified: 
>openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
>
>
> URL: :  
>http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java?rev=979198&r1=979197&r2=979198&view=diff
>
>
> ==============================================================================
> --- 
>openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
>
> a (original)
> +++  
>openwebbeans/trunk/webbeans-openejb/src/main/java/org/apache/webbeans/ejb/EjbPlugin.java
>
>  Mon Jul 26 08:37:23 2010
> @@ -101,6 +101,10 @@ public class EjbPlugin extends  AbstractO
>      private static final SecurityService  SECURITY_SERVICE = new 
>OpenEJBSecurityService();
> 
>      private  final Map<String, JndiNameStrategy> nameStrategies = new  
>TreeMap<String, JndiNameStrategy>();
> +    
> +     //This is here for standalone tests are correctly run
> +    //Not  used in anywhere
> +    public static boolean  CONFIGURED_FOR_USED_IN_TEST = false;
> 
>      public  EjbPlugin()
>      {
> @@ -296,8 +300,12 @@ public class EjbPlugin  extends AbstractO
> 
>      public boolean  isSessionBean(Class<?> clazz)
>      {
> -         if (this.containerSystem == null)
> +         //This is used in tests, because in reality containerSystem is not 
>null 
>
> +        if (this.containerSystem == null ||  CONFIGURED_FOR_USED_IN_TEST)
>          {
> +             //Used for tests
> +             CONFIGURED_FOR_USED_IN_TEST = false;
> +            
>               this.containerSystem =  
>SystemInstance.get().getComponent(ContainerSystem.class);
>               Container[] containers =  this.containerSystem.containers();
>               for (Container container : containers)
> 
> 
> 

Reply via email to