User: oberg   
  Date: 00/12/07 07:44:08

  Modified:    src/main/org/jboss/deployment Deployment.java
                        J2eeApplicationMetaData.java J2eeDeployer.java
                        J2eeDeployerMBean.java J2eeDeploymentException.java
                        J2eeModuleMetaData.java URLWizzard.java
  Log:
  Changed configuration scheme (lots of changes to jboss.conf, jboss.jcml, 
org.jboss.Main)
  Added ServiceControl
  Changed jBoss -> JBoss
  Changed GPL -> LGPL
  Added jaxp/parser
  Updated services to have default constructors
  
  Revision  Changes    Path
  1.6       +3 -3      jboss/src/main/org/jboss/deployment/Deployment.java
  
  Index: Deployment.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/deployment/Deployment.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Deployment.java   2000/11/24 23:28:19     1.5
  +++ Deployment.java   2000/12/07 15:44:06     1.6
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.deployment;
  @@ -16,7 +16,7 @@
   /** Represents a J2EE application or module (EJB.jar, Web.war or App.ear). <br>
   *
   *  @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a>
  -*  @version $Revision: 1.5 $
  +*  @version $Revision: 1.6 $
   */
   public class Deployment
      implements java.io.Serializable
  
  
  
  1.2       +3 -3      jboss/src/main/org/jboss/deployment/J2eeApplicationMetaData.java
  
  Index: J2eeApplicationMetaData.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeApplicationMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2eeApplicationMetaData.java      2000/10/03 00:08:15     1.1
  +++ J2eeApplicationMetaData.java      2000/12/07 15:44:06     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.deployment;
  @@ -20,7 +20,7 @@
    *      
    *   @see <related>
    *   @author <firstname> <lastname> (<email>)
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public class J2eeApplicationMetaData
      extends MetaData
  
  
  
  1.13      +47 -24    jboss/src/main/org/jboss/deployment/J2eeDeployer.java
  
  Index: J2eeDeployer.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeDeployer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- J2eeDeployer.java 2000/11/24 23:28:19     1.12
  +++ J2eeDeployer.java 2000/12/07 15:44:06     1.13
  @@ -1,7 +1,7 @@
   /*
  -* jBoss, the OpenSource EJB server
  +* JBoss, the OpenSource EJB server
   *
  -* Distributable under GPL license.
  +* Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
   package org.jboss.deployment;
  @@ -60,10 +60,10 @@
   *  or only the relevant packages (EAR) becoming downloaded. <br>
   *  <i> replacing alternative DDs and validation is not yet implementet! </i>
   *  The uploaded files are getting passed through to the responsible deployer
  -*  (ContainerFactory for jBoss and EmbededTomcatService for Tomcat).
  +*  (ContainerFactory for JBoss and EmbededTomcatService for Tomcat).
   *
   *   @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a>
  -*   @version $Revision: 1.12 $
  +*   @version $Revision: 1.13 $
   */
   public class J2eeDeployer 
   extends ServiceMBeanSupport
  @@ -92,36 +92,59 @@
        int classpathPolicy = EASY;
   
        InstallerFactory installer;
  -     String tmpDir;
      
      // Static --------------------------------------------------------
      /** only for testing...*/
      public static void main (String[] _args) throws Exception
      {
  -      new J2eeDeployer ("", "EJB:service=ContainerFactory", 
":service=EmbeddedTomcat").deploy (_args[0]);
  +      new J2eeDeployer().deploy (_args[0]);
      }
      
      // Constructors --------------------------------------------------
  -   /** */
  -   public J2eeDeployer (String _deployDir, String jarDeployerName, String 
warDeployerName)
  +   public J2eeDeployer()
      {
  -        this ("", _deployDir, jarDeployerName, warDeployerName);
  +      this("Default", "EJB:service=ContainerFactory", ":service=EmbeddedTomcat");
      }
  -
  -   /** */
  -   public J2eeDeployer (String _name, String _deployDir, String jarDeployerName, 
String warDeployerName)
  +   
  +   public J2eeDeployer (String _name, String jarDeployerName, String 
warDeployerName)
      {
  -       name = _name.equals("") ? "" : " "+_name;
  -      tmpDir = _deployDir;
  -      
  +      setDeployerName(_name);
  +      setJarDeployerName(jarDeployerName);
  +      setWarDeployerName(warDeployerName);
  +   }
  +   
  +   public void setDeployerName(String name)
  +   {
  +      name = name.equals("") ? "" : " "+name;
  +      this.name = name;
  +      this.log = new Log(getName());
  +   }
  +   
  +   public String getDeployerName()
  +   {
  +      return name.trim();
  +   }
  +   
  +   public void setJarDeployerName(String jarDeployerName)
  +   {
         this.jarDeployerName = jarDeployerName;
  +   }
  +   
  +   public String getJarDeployerName()
  +   {
  +      return jarDeployerName;
  +   }
  +   
  +   public void setWarDeployerName(String warDeployerName)
  +   {
         this.warDeployerName = warDeployerName;
  -
  -       this.log = new Log(getName());
  +   }
   
  +   public String getWarDeployerName()
  +   {
  +      return warDeployerName;
      }
      
  -   
      // Public --------------------------------------------------------
      /** Deploys the given URL independent if it is a EJB.jar, Web.war
      *   or Application.ear. In case of already deployed, it performes a
  @@ -249,16 +272,16 @@
      throws javax.management.MalformedObjectNameException
      {
         this.server = server;
  -      return new ObjectName(OBJECT_NAME+this.name);
  +      return name == null ? new ObjectName(OBJECT_NAME+this.name) : name;
      }
      
      /** */
      protected void initService()
      throws Exception
      {
  -      
  +      URL tmpDirUrl = getClass().getResource("/tmp.properties");
         //check if the deployment dir was set meaningful
  -        File dir = new File(tmpDir);
  +        File dir = new File(new File(tmpDirUrl.getFile()).getParentFile(), 
"deploy/"+getDeployerName());
         if (!dir.exists () &&
             !dir.mkdirs ())
            throw new IOException ("Temporary directory \""+dir.getCanonicalPath 
()+"\" does not exist!");
  @@ -279,7 +302,7 @@
            
         // clean up the deployment directory since on some Windowz the file removement
         // during runtime doesnt work...
  -      log.log("Cleaning up deployment directory "+tmpDir);
  +      log.log("Cleaning up deployment directory");
          installer.unclutter();
      }
      
  @@ -389,7 +412,7 @@
                 // since tomcat changes the context classloader...
            Thread.currentThread().setContextClassLoader (oldCl);
   
  -         // jBoss
  +         // JBoss
            it = _d.ejbModules.iterator ();
            while (it.hasNext ())
            {
  @@ -404,7 +427,7 @@
          }
         catch (MBeanException _mbe) {
            log.error ("Starting "+m.name+" failed!");
  -         throw new J2eeDeploymentException ("Error while starting "+m.name+": " + 
_mbe.getTargetException ().getMessage ());
  +         throw new J2eeDeploymentException ("Error while starting "+m.name+": " + 
_mbe.getTargetException ().getMessage (), _mbe.getTargetException ());
         } catch (JMException _jme){
            log.error ("Starting failed!");
            throw new J2eeDeploymentException ("Fatal error while interacting with 
deployer MBeans... " + _jme.getMessage ());
  
  
  
  1.3       +12 -3     jboss/src/main/org/jboss/deployment/J2eeDeployerMBean.java
  
  Index: J2eeDeployerMBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeDeployerMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- J2eeDeployerMBean.java    2000/10/27 19:10:27     1.2
  +++ J2eeDeployerMBean.java    2000/12/07 15:44:07     1.3
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.deployment;
  @@ -14,7 +14,7 @@
   /**
    *   @see 
    *   @author Daniel Schulze ([EMAIL PROTECTED])
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   public interface J2eeDeployerMBean
        extends ServiceMBean
  @@ -23,6 +23,15 @@
      public static final String OBJECT_NAME = "J2EE:service=J2eeDeployer";
       
      // Public --------------------------------------------------------
  +   public void setDeployerName(String name);
  +   public String getDeployerName();
  +   
  +   public void setJarDeployerName(String jarDeployerName);
  +   public String getJarDeployerName();
  +   
  +   public void setWarDeployerName(String warDeployerName);
  +   public String getWarDeployerName();
  +   
      public void deploy (String url) throws MalformedURLException, IOException, 
J2eeDeploymentException;
   
      public void undeploy (String url) throws MalformedURLException, IOException, 
J2eeDeploymentException;
  
  
  
  1.2       +14 -3     jboss/src/main/org/jboss/deployment/J2eeDeploymentException.java
  
  Index: J2eeDeploymentException.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeDeploymentException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2eeDeploymentException.java      2000/10/03 00:08:15     1.1
  +++ J2eeDeploymentException.java      2000/12/07 15:44:07     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.deployment;
  @@ -10,11 +10,12 @@
    *   <description> 
    *      
    *   @author Daniel Schulze [EMAIL PROTECTED]
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public class J2eeDeploymentException 
        extends Exception
   {
  +   Exception exception;
   
      // Constructors --------------------------------------------------
        public J2eeDeploymentException (String message)
  @@ -22,6 +23,16 @@
                super (message);
        }
        
  +     public J2eeDeploymentException (String message, Exception e)
  +   {
  +             super (message);
  +      this.exception = e;
  +     }
  +   
  +   public Exception getException()
  +   {
  +      return exception;
  +   }
   }
   
   
  
  
  
  1.2       +3 -3      jboss/src/main/org/jboss/deployment/J2eeModuleMetaData.java
  
  Index: J2eeModuleMetaData.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/deployment/J2eeModuleMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2eeModuleMetaData.java   2000/10/03 00:08:15     1.1
  +++ J2eeModuleMetaData.java   2000/12/07 15:44:07     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.deployment;
  @@ -16,7 +16,7 @@
    *      
    *   @see <related>
    *   @author Daniel Schulze [EMAIL PROTECTED]
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public class J2eeModuleMetaData
      extends MetaData
  
  
  
  1.7       +3 -3      jboss/src/main/org/jboss/deployment/URLWizzard.java
  
  Index: URLWizzard.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/deployment/URLWizzard.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- URLWizzard.java   2000/11/24 23:28:19     1.6
  +++ URLWizzard.java   2000/12/07 15:44:07     1.7
  @@ -1,7 +1,7 @@
   /*
  -* jBoss, the OpenSource EJB server
  +* JBoss, the OpenSource EJB server
   *
  -* Distributable under GPL license.
  +* Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
   package org.jboss.deployment;
  @@ -33,7 +33,7 @@
   * Very scratchy! Any improvements are welcome!
   *      
   *    @author Daniel Schulze <[EMAIL PROTECTED]>
  -*    @version $Revision: 1.6 $
  +*    @version $Revision: 1.7 $
   */
   public class URLWizzard
   {
  
  
  

Reply via email to