geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Opacki <chris_opa...@yahoo.com>
Subject Re: [PATCH] JSR-88 DeploymentFactoryManager + Test
Date Fri, 15 Aug 2003 17:44:50 GMT
oops....Aaron...rather.

--- Chris Opacki <chris_opacki@yahoo.com> wrote:
> Hi Arron,
> I've been working on the DDBean and the class that
> loads them. In the spec examples it shows that a
> DDBean is grabbing data directly from the xml
> document. I was thinking that i would load the
> DDBeans
> from elsewhere holding the required data in the
> DDBeanImpl. I am creating one DDBean implementation,
> one DDBeanRoot implementation and a Loader that is
> responsible for parsing a zip file, reading an entry
> and writing it to a temp file. I am also assuming
> that
> we will grab child dd beans based on a relative path
> from root. I'm not sure if you have started that
> DDConfigBean implementations yet, but I thought it
> would be good that you know what I am doing. Is
> anyone
> else actively working on JSR88? There haven't been a
> whole lot of activity on our threads. Any thoughts?
> Chris
> 
> --- Aaron Mulder <ammulder@alumni.princeton.edu>
> wrote:
> > 	Here are two patches to:
> > 
> >  - update the deployment factory manager so that
> it
> > throws an 
> > IllegalArgumentException for bad arguments, and
> > doesn't re-register an 
> > identical factory more than once.
> > 
> >  - update the DFM tests to refer to the actual
> > Geronimo DeploymentFactory
> > implementation instead of the "Mock" impls,
> actually
> > test the 
> > DeploymentFactory registration and lookup, and
> > revise the tests a bit 
> > (don't rely on previous tests having run and set
> up
> > static objects, etc.)
> > 
> > 	In addition, when these are applied, we should
> > remove the classes
> > 
> >
>
modules/core/src/test/javax/enterprise/deploy/spi/MockDeploymentManager
> > 
> > 	and
> > 
> >
>
modules/core/src/test/javax/enterprise/deploy/spi/factories/MockDeploymentFactory
> > 
> > 	Because those were only used by the tests, and
> now
> > the tests use 
> > the real thing instead of the "Mock" versions.
> > 
> > Aaron
> > > Index:
> >
>
specs/jsr88/src/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java
> >
>
===================================================================
> > RCS file:
> >
>
/home/cvspublic/incubator-geronimo/specs/jsr88/src/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java,v
> > retrieving revision 1.1
> > diff -c -r1.1 DeploymentFactoryManager.java
> > ***
> >
>
specs/jsr88/src/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java
> > 14 Aug 2003 16:12:52 -0000	1.1
> > ---
> >
>
specs/jsr88/src/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.java
> > 15 Aug 2003 17:14:01 -0000
> > ***************
> > *** 68,128 ****
> >   public class DeploymentFactoryManager {
> >       private static DeploymentFactoryManager
> > instance;
> >   
> > -     private ArrayList deploymentFactories = new
> > ArrayList();
> > - 
> >       public static DeploymentFactoryManager
> > getInstance() {
> > !         if (instance == null) {
> >               instance = new
> > DeploymentFactoryManager();
> >           }
> >           return instance;
> >       }
> >   
> >       public void
> > registerDeploymentFactory(DeploymentFactory
> factory)
> > {
> > !           // apparently we dont care about null
> > values, the Sun RI even adds the null
> > !           // to the list. So after
> > registerDeploymentFactory(null)
> > getDeploymentFactories()
> > !           // return an array with length 1.
> > !           deploymentFactories.add(factory);
> > !       }
> >   
> >       public DeploymentFactory[]
> > getDeploymentFactories() {
> > !         return (DeploymentFactory[])
> > deploymentFactories.toArray(new
> > DeploymentFactory[]{});
> >       }
> >   
> >       public DeploymentManager
> > getDeploymentManager(String uri, String username,
> > String password) throws
> > DeploymentManagerCreationException {
> > !         // RI doesn't care about uri being null,
> > neither do we
> > ! 
> > !         for (Iterator i =
> > deploymentFactories.iterator(); i.hasNext();) {
> > !             DeploymentFactory factory =
> > (DeploymentFactory) i.next();
> > !             if (factory != null) {
> > !                 if (factory.handlesURI(uri)) {
> > !                     try {
> > !                         return
> > factory.getDeploymentManager(uri, username,
> > password);
> > !                     } catch
> > (DeploymentManagerCreationException e) {
> > !                         // Just like the RI we
> > throw a new exception with a generic message
> > !                         throw new
> > DeploymentManagerCreationException("Could not get
> > DeploymentManager");
> >                       }
> >                   }
> >               }
> >           }
> > !         throw new
> > DeploymentManagerCreationException("Could not get
> > DeploymentManager");
> >       }
> >   
> >       public DeploymentManager
> > getDisconnectedDeploymentManager(String uri)
> throws
> > DeploymentManagerCreationException {
> > !         // RI doesn't care about uri being null,
> > neither do we
> > ! 
> > !         for (Iterator i =
> > deploymentFactories.iterator(); i.hasNext();) {
> > !             DeploymentFactory factory =
> > (DeploymentFactory) i.next();
> > !             if (factory != null) {
> > !                 if (factory.handlesURI(uri)) {
> > !                     try {
> > !                         return
> > factory.getDisconnectedDeploymentManager(uri);
> > !                     } catch
> > (DeploymentManagerCreationException e) {
> > !                         // Just like the RI we
> > throw a new exception with a generic message
> > !                         throw new
> > DeploymentManagerCreationException("Could not get
> > DeploymentManager");
> >                       }
> >                   }
> >               }
> >           }
> > !         throw new
> > DeploymentManagerCreationException("Could not get
> > DeploymentManager");
> >       }
> >   }
> > --- 68,137 ----
> >   public class DeploymentFactoryManager {
> >       private static DeploymentFactoryManager
> > instance;
> >   
> >       public static DeploymentFactoryManager
> > getInstance() {
> > !         if(instance == null) {
> >               instance = new
> > DeploymentFactoryManager();
> >           }
> >           return instance;
> >       }
> >   
> > +     private ArrayList deploymentFactories = new
> > ArrayList();
> > + 
> > +     private DeploymentFactoryManager() {
> > +     }
> > + 
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Mime
View raw message