org.apache.openejb.config
Class GeneratedClientModules

java.lang.Object
  extended by org.apache.openejb.config.GeneratedClientModules

public class GeneratedClientModules
extends Object

This class encompasses a little technique that saves lots of architecture rework. Essentially we're allowing an EjbModule to be both an EjbModule and a ClientModule. Trick is we don't really know if it has any @LocaClient or @RemoteClient classes until we've scanned it. Since it's already an EjbModule and we do plan to scan it, we just automatically generate a ClientModule for all EjbModules and ensure that the ClientModule will be able to reuse the ClassFinder instance, which is a pretty heavy object created by reading all of the class files in a jar via ASM. We really don't want to do that twice if we don't have to. We link them by giving them the same AtomicReference object. When one of them sets it, they both see it and the need to create a second one is avoided. If the automatically generated ClientModule doesn't turn out to really be a client after any descriptors have been read and the jar scanned, then we just remove it so it doesn't factor into the remainder of the deploy chain.


Nested Class Summary
static class GeneratedClientModules.Add
          Add the auto-generated and linked ClientModule from each EjbModule
static class GeneratedClientModules.Prune
          Clean up any that didn't turn out to have any actual ejb clients
 
Constructor Summary
GeneratedClientModules()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratedClientModules

public GeneratedClientModules()


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.