User: cgjung  
  Date: 02/03/01 14:12:57

  Modified:    jboss.net/src/main/org/jboss/net/axis/server
                        AxisService.java AxisServiceMBean.java
                        Constants.java
  Log:
  this one is for peter ... patched web-container access to go through the 
maindeployer (still dirty) and
  switched authentication off for now since Jetty does still not as we like. I get 
hang-ups in deploying the
  combined ejb/wsr test, but at least addr.wsr works again. Happy weekend.
  
  Revision  Changes    Path
  1.13      +28 -27    
contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisService.java
  
  Index: AxisService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisService.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AxisService.java  28 Feb 2002 08:01:27 -0000      1.12
  +++ AxisService.java  1 Mar 2002 22:12:57 -0000       1.13
  @@ -5,7 +5,7 @@
    * See terms of license at gnu.org.
    */
   
  -// $Id: AxisService.java,v 1.12 2002/02/28 08:01:27 cgjung Exp $
  +// $Id: AxisService.java,v 1.13 2002/03/01 22:12:57 cgjung Exp $
   
   package org.jboss.net.axis.server;
   
  @@ -31,6 +31,7 @@
   import org.jboss.naming.Util;
   import org.jboss.metadata.MetaData;
   import org.jboss.system.server.ServerConfigImplMBean;
  +import org.jboss.deployment.DeployerMBean;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -62,12 +63,13 @@
   
   import java.util.Map;
   import java.util.Iterator;
  +import java.util.Collection;
   
   /**
    *   A deployer service that installs and manages Axis within JMX.
    *   @created 27. September 2001
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
  - *   @version $Revision: 1.12 $
  + *   @version $Revision: 1.13 $
    *   Change notes:
    *   <ul>
    *     <li> 01.02.02: CGJ, Adapted to jboss3.0.0DR1 deployment changes. Arrgh! <li>
  @@ -99,6 +101,9 @@
      /** the axis engines */
      final static Map axisServerMap=new java.util.HashMap();
   
  +   /** the web deployer that hosts our servlet */
  +   DeployerMBean webDeployer;
  +
      /** default */
      public AxisService()
      {
  @@ -199,6 +204,22 @@
   
         URL myUrl=appDir.toURL();
         myDeploymentInfo=new DeploymentInfo(myUrl,null);
  +      myDeploymentInfo.url=new URL("http://net.jboss.org/fake.war";);
  +
  +      Iterator allDeployers=((Collection)  
server.invoke(MainDeployerMBean.OBJECT_NAME,
  +                    "listDeployers",
  +                    new Object[0],
  +                    new String[0])).iterator();
  +
  +      while(allDeployers.hasNext() && webDeployer==null) {
  +     DeployerMBean nextBean=(DeployerMBean) allDeployers.next();
  +     if(nextBean.accepts(myDeploymentInfo)) {
  +             webDeployer=nextBean;
  +     }
  +      }
  +
  +      if(webDeployer!=null) {
  +
         myDeploymentInfo.localUrl=myUrl;
   
         try
  @@ -250,10 +271,7 @@
   
         // Call the war deployer through the JMX server to initialise
         // and deploy the info
  -      server.invoke(MainDeployerMBean.OBJECT_NAME,
  -                    "deploy",
  -                    new Object[] {myDeploymentInfo},
  -                    new String[] {"org.jboss.deployment.DeploymentInfo"});
  +      webDeployer.start(myDeploymentInfo);
   
         try
         {
  @@ -266,6 +284,9 @@
         }
         catch (Exception e) {log.error("Could not register with MainDeployer", e);
         }
  +     } else {
  +     throw new Exception(Constants.CANNOT_FIND_WEB_DEPLOYER);
  +     }
   
      }
   
  @@ -314,10 +335,7 @@
            log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_UNDEPLOY_0,new Object[]
            {myDeploymentInfo},null);
   
  -         server.invoke(MainDeployerMBean.OBJECT_NAME,
  -                       "undeploy",
  -                       new Object[] {myDeploymentInfo},
  -                       new String[] {"org.jboss.deployment.DeploymentInfo"});
  +         webDeployer.stop(myDeploymentInfo);
   
         } catch (Exception e)
         {
  @@ -345,23 +363,6 @@
         return (AxisServer) axisServerMap.get(context);
      }
   
  -   //----------------------------------------------------------------------------
  -   // war deployer plug
  -   //----------------------------------------------------------------------------
  -
  -   protected String warDeployerName=null;
  -
  -   public String getWarDeployerName()
  -   {
  -      return warDeployerName;
  -   }
  -
  -   public void setWarDeployerName(String name)
  -   {
  -      log.getCategory().l7dlog(Priority.INFO,SET_WAR_DEPLOYER_0,new Object[]
  -      {name},null);
  -      warDeployerName=name;
  -   }
   
      //----------------------------------------------------------------------------
      // security domain
  
  
  
  1.3       +2 -4      
contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisServiceMBean.java
  
  Index: AxisServiceMBean.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisServiceMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AxisServiceMBean.java     4 Feb 2002 09:38:58 -0000       1.2
  +++ AxisServiceMBean.java     1 Mar 2002 22:12:57 -0000       1.3
  @@ -5,7 +5,7 @@
   * See terms of license at gnu.org.
   */
   
  -// $Id: AxisServiceMBean.java,v 1.2 2002/02/04 09:38:58 cgjung Exp $
  +// $Id: AxisServiceMBean.java,v 1.3 2002/03/01 22:12:57 cgjung Exp $
    
   package org.jboss.net.axis.server;
   
  @@ -13,14 +13,12 @@
    * Mbean interface to the AxisService 
    * @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
    * @created 27. September 2001
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   
   public interface AxisServiceMBean extends org.jboss.deployment.DeployerMBean {    
     // P-------------------------------------------------------
     
  -  public String getWarDeployerName();
  -  public void setWarDeployerName(String name);
     public String getRootContext();
     public void setRootContext(String name) throws Exception;
     public String getSecurityDomain();
  
  
  
  1.8       +3 -2      
contrib/jboss.net/src/main/org/jboss/net/axis/server/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/axis/server/Constants.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Constants.java    23 Feb 2002 15:13:43 -0000      1.7
  +++ Constants.java    1 Mar 2002 22:12:57 -0000       1.8
  @@ -5,7 +5,7 @@
    * See terms of license at gnu.org.
    */
   
  -// $Id: Constants.java,v 1.7 2002/02/23 15:13:43 d_jencks Exp $
  +// $Id: Constants.java,v 1.8 2002/03/01 22:12:57 cgjung Exp $
   
   package org.jboss.net.axis.server;
   
  @@ -13,7 +13,7 @@
    * Some Constants for the axis package
    * @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G. Jung</a>
    * @created 28. September 2001
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   
   public interface Constants extends org.jboss.net.Constants {
  @@ -58,5 +58,6 @@
       static final String AXIS_SERVER_CONTEXT_OCCUPIED="There is already an Axis 
service running under that root context.";
       static final String EJB_REF_MUST_HAVE_UNIQUE_NAME="An ejb-ref element must have 
a unique ejb-ref-name element.";
       static final String EJB_REF_MUST_HAVE_UNIQUE_LINK="An ejb-ref element must have 
a unique ejb-link element.";
  +    static final String CANNOT_FIND_WEB_DEPLOYER="Could not find a suitable web 
container.";
   
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to