geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/webdav project.xml
Date Tue, 24 Feb 2004 15:39:17 GMT
gdamour     2004/02/24 07:39:17

  Modified:    sandbox/webdav/src/java/org/apache/geronimo/webdav/jetty
                        JettyDAVServer.java JettyConnectorImpl.java
               sandbox/webdav/src/java/org/apache/geronimo/webdav
                        CatalinaDAVRepository.java
               sandbox/webdav project.xml
  Log:
  Fix the compilation issues.
  
  Revision  Changes    Path
  1.2       +44 -32    incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/jetty/JettyDAVServer.java
  
  Index: JettyDAVServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/jetty/JettyDAVServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JettyDAVServer.java	23 Jan 2004 02:25:51 -0000	1.1
  +++ JettyDAVServer.java	24 Feb 2004 15:39:17 -0000	1.2
  @@ -63,14 +63,15 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.geronimo.gbean.EndpointCollection;
  -import org.apache.geronimo.gbean.EndpointCollectionEvent;
  -import org.apache.geronimo.gbean.EndpointCollectionListener;
  +import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBean;
   import org.apache.geronimo.gbean.GBeanContext;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
  -import org.apache.geronimo.gbean.GEndpointInfo;
  +import org.apache.geronimo.gbean.GReferenceInfo;
  +import org.apache.geronimo.gbean.ReferenceCollection;
  +import org.apache.geronimo.gbean.ReferenceCollectionEvent;
  +import org.apache.geronimo.gbean.ReferenceCollectionListener;
   import org.apache.geronimo.gbean.WaitingException;
   import org.apache.geronimo.webdav.DAVRepository;
   import org.apache.geronimo.webdav.DAVServer;
  @@ -89,6 +90,11 @@
       private static final Log log = LogFactory.getLog(JettyDAVServer.class);
   
       /**
  +     * Context callback.
  +     */
  +    private GBeanContext context;
  +    
  +    /**
        * Jetty Server doing the actual work.
        */
       private final Server server;
  @@ -106,27 +112,27 @@
       /**
        * Repositories served by this server.
        */
  -    private EndpointCollection repositories;
  -    private final EndpointCollectionListener repositoryListener = new EndpointCollectionListener()
{
  -        public void memberAdded(EndpointCollectionEvent event) {
  +    private ReferenceCollection repositories;
  +    private final ReferenceCollectionListener repositoryListener = new ReferenceCollectionListener()
{
  +        public void memberAdded(ReferenceCollectionEvent event) {
               addRepository((DAVRepository) event.getMember());
  -        }
  -
  -        public void memberRemoved(EndpointCollectionEvent event) {
  +		}
  +        
  +		public void memberRemoved(ReferenceCollectionEvent event) {
               removeRepository((DAVRepository) event.getMember());
  -        }
  +		}
       };
   
       /**
        * Connectors injecting requests to this server.
        */
  -    private EndpointCollection connectors;
  -    private final EndpointCollectionListener connectorListener = new EndpointCollectionListener()
{
  -        public void memberAdded(EndpointCollectionEvent event) {
  +    private ReferenceCollection connectors;
  +    private final ReferenceCollectionListener connectorListener = new ReferenceCollectionListener()
{
  +        public void memberAdded(ReferenceCollectionEvent event) {
               addConnector((JettyConnector) event.getMember());
           }
   
  -        public void memberRemoved(EndpointCollectionEvent event) {
  +        public void memberRemoved(ReferenceCollectionEvent event) {
               removeConnector((JettyConnector) event.getMember());
           }
       };
  @@ -139,14 +145,14 @@
   
       public void setConnectors(Collection aCollOfConnectors) {
           if (null == aCollOfConnectors) {
  -            connectors.removeEndpointCollectionListener(connectorListener);
  +            connectors.removeReferenceCollectionListener(connectorListener);
               for (Iterator iter = connectors.iterator(); iter.hasNext();) {
                   removeConnector((JettyConnector) iter.next());
               }
           }
  -        connectors = (EndpointCollection) aCollOfConnectors;
  +        connectors = (ReferenceCollection) aCollOfConnectors;
           if (null != connectors) {
  -            connectors.addEndpointCollectionListener(connectorListener);
  +            connectors.addReferenceCollectionListener(connectorListener);
               for (Iterator iter = connectors.iterator(); iter.hasNext();) {
                   addConnector((JettyConnector) iter.next());
               }
  @@ -155,8 +161,8 @@
   
       public void addConnector(JettyConnector aConnector) {
           // The Connector MUST be running at this stage, otherwise a null
  -        // listener is returned. This is enforced by the endpoint mechanism,
  -        // which publishes only running endpoints.
  +        // listener is returned. This is enforced by the Reference mechanism,
  +        // which publishes only running References.
           if (null == aConnector.getListener()) {
               throw new IllegalStateException("No defined listener.");
           }
  @@ -182,14 +188,14 @@
   
       public void setRepositories(Collection aCollOfRepositories) {
           if (null == aCollOfRepositories) {
  -            repositories.removeEndpointCollectionListener(repositoryListener);
  +            repositories.removeReferenceCollectionListener(repositoryListener);
               for (Iterator iter = repositories.iterator(); iter.hasNext();) {
                   removeRepository((DAVRepository) iter.next());
               }
           }
  -        repositories = (EndpointCollection) aCollOfRepositories;
  +        repositories = (ReferenceCollection) aCollOfRepositories;
           if (null != repositories) {
  -            repositories.addEndpointCollectionListener(repositoryListener);
  +            repositories.addReferenceCollectionListener(repositoryListener);
               for (Iterator iter = repositories.iterator(); iter.hasNext();) {
                   addRepository((DAVRepository) iter.next());
               }
  @@ -203,19 +209,22 @@
        */
       public void addRepository(DAVRepository aRepository) {
           // Gets the context associated to this repository.
  -        ServletHttpContext context = (ServletHttpContext) server.getContext(aRepository.getHost(),
aRepository.getContext());
  -
  +        ServletHttpContext servletContext =
  +            (ServletHttpContext) server.getContext(aRepository.getHost(),
  +                aRepository.getContext());
  +        
           // Defines the servlet context attributes.
           Map attributes = aRepository.getServletContextAttr();
           for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
               Map.Entry attribute = (Map.Entry) iter.next();
  -            context.setAttribute((String) attribute.getKey(), attribute.getValue());
  +            servletContext.setAttribute((String) attribute.getKey(),
  +                attribute.getValue());
           }
   
           ServletHolder holder = null;
           try {
               // Defines the WebDAV servlet.
  -            holder = context.addServlet("DAVRepository", "/*", aRepository.getHandlingServlet().getName());
  +            holder = servletContext.addServlet("DAVRepository", "/*", aRepository.getHandlingServlet().getName());
   
               // Defines the servlet init parameters.
               attributes = aRepository.getServletInitParam();
  @@ -223,7 +232,7 @@
                   Map.Entry attribute = (Map.Entry) iter.next();
                   holder.setInitParameter((String) attribute.getKey(), (String) attribute.getValue());
               }
  -            context.start();
  +            servletContext.start();
           } catch (Exception e) {
               log.error(e);
               throw new RuntimeException(e);
  @@ -260,7 +269,8 @@
           return connectors;
       }
   
  -    public void setGBeanContext(GBeanContext context) {
  +    public void setGBeanContext(GBeanContext aContext) {
  +        context = aContext;        
       }
   
       public void doStart() throws WaitingException, Exception {
  @@ -297,8 +307,10 @@
   
       static {
           GBeanInfoFactory infoFactory = new GBeanInfoFactory("DAV Server - Jetty", JettyDAVServer.class.getName());
  -        infoFactory.addEndpoint(new GEndpointInfo("Connectors", JettyConnector.class.getName()));
  -        infoFactory.addEndpoint(new GEndpointInfo("Repositories", DAVRepository.class.getName()));
  +        infoFactory.addReference(new GReferenceInfo("Connectors", JettyConnector.class.getName()));
  +        infoFactory.addReference(new GReferenceInfo("Repositories", DAVRepository.class.getName()));
  +        infoFactory.addAttribute(new GAttributeInfo("Connectors", false, Boolean.TRUE,
Boolean.TRUE, null, null));
  +        infoFactory.addAttribute(new GAttributeInfo("Repositories", false, Boolean.TRUE,
Boolean.TRUE, null, null));
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.2       +2 -2      incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/jetty/JettyConnectorImpl.java
  
  Index: JettyConnectorImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/jetty/JettyConnectorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JettyConnectorImpl.java	23 Jan 2004 02:25:51 -0000	1.1
  +++ JettyConnectorImpl.java	24 Feb 2004 15:39:17 -0000	1.2
  @@ -146,7 +146,7 @@
                   new GBeanInfoFactory("Connector - Jetty",
                           JettyConnectorImpl.class.getName(),
                           AbstractConnector.getGBeanInfo());
  -        infoFactory.addAttribute(new GAttributeInfo("Listener"));
  +        infoFactory.addAttribute(new GAttributeInfo("Listener", false));
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.2       +5 -5      incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/CatalinaDAVRepository.java
  
  Index: CatalinaDAVRepository.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/webdav/CatalinaDAVRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CatalinaDAVRepository.java	23 Jan 2004 02:25:51 -0000	1.1
  +++ CatalinaDAVRepository.java	24 Feb 2004 15:39:17 -0000	1.2
  @@ -186,7 +186,7 @@
           return Collections.unmodifiableMap(servletInitParam);
       }
   
  -    public void setGBeanContext(GBeanContext context) {
  +    public void setGBeanContext(GBeanContext aContext) {
       }
   
       public void doStart() throws WaitingException, Exception {
  @@ -208,9 +208,9 @@
           infoFactory.addAttribute(new GAttributeInfo("Root", true));
           infoFactory.addAttribute(new GAttributeInfo("Context", true));
           infoFactory.addAttribute(new GAttributeInfo("Host", true));
  -        infoFactory.addAttribute(new GAttributeInfo("HandlingServlet"));
  -        infoFactory.addAttribute(new GAttributeInfo("ServletContextAttr"));
  -        infoFactory.addAttribute(new GAttributeInfo("ServletInitParam"));
  +        infoFactory.addAttribute(new GAttributeInfo("HandlingServlet", false));
  +        infoFactory.addAttribute(new GAttributeInfo("ServletContextAttr", false));
  +        infoFactory.addAttribute(new GAttributeInfo("ServletInitParam", false));
           infoFactory.setConstructor(new GConstructorInfo(
                   Arrays.asList(new Object[]{"Root", "Context", "Host"}),
                   Arrays.asList(new Object[]{File.class, String.class, String.class})));
  
  
  
  1.8       +9 -9      incubator-geronimo/sandbox/webdav/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/project.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.xml	24 Feb 2004 15:01:12 -0000	1.7
  +++ project.xml	24 Feb 2004 15:39:17 -0000	1.8
  @@ -49,49 +49,49 @@
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>catalina</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>catalina-optional</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>naming-common</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>naming-resources</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>servlets-common</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>servlets-default</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>servlets-webdav</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
           <dependency>
               <groupId>tomcat</groupId>
               <artifactId>tomcat-util</artifactId>
  -            <version>5.0.16</version>
  +            <version>5.0.18</version>
           </dependency>
   
       </dependencies>
  
  
  

Mime
View raw message