this doesn't compile due to 5 checkstyle violations. fix is otw.
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) > > >