I am not sure what the idealk location for this code is.  I do know that 
only AWC uses it right now.  DeploymentInfo is part of the core 
deployment infrastructue and thus should not have any deployment 
specific bits inside of it.  You know as well as I that all this needs 
to be cleaned up more.  

This was the only conflict that I found when moving the core system from 
jboss/server to jboss/system.
Everything else is cleanly detached (from a compile time standpoint for 
the system module)...

I think this would be better suited in a EJB specific Deployment object, 
but then that gets back into the mail I sent a while ago on the 
deployment system... which I am not evgen about to mess with right now.

--jason


David Jencks wrote:

>Ummm... I haven't checked in detail but isn't this equally usable in
>setting up local environment for ejb's? If so it has way less excuse being
>part of AbstractWebContainer than DeploymentInfo.
>
>david jencks
>
>On 2002.02.24 00:05:00 -0500 Jason Dillon wrote:
>
>>  User: user57  
>>  Date: 02/02/23 21:05:00
>>
>>  Modified:    src/main/org/jboss/deployment DeploymentInfo.java
>>  Log:
>>   o moved findEjb*Link methods to AbstractWebContainer, they don't have
>>     any business inside DI
>>  
>>  Revision  Changes    Path
>>  1.11      +46 -112   jboss/src/main/org/jboss/deployment/DeploymentInfo.java
>>  
>>  Index: DeploymentInfo.java
>>  ===================================================================
>>  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/deployment/DeploymentInfo.java,v
>>  retrieving revision 1.10
>>  retrieving revision 1.11
>>  diff -u -r1.10 -r1.11
>>  --- DeploymentInfo.java     22 Feb 2002 04:24:55 -0000      1.10
>>  +++ DeploymentInfo.java     24 Feb 2002 05:05:00 -0000      1.11
>>  @@ -1,12 +1,13 @@
>>  -/*
>>  -* JBoss, the OpenSource J2EE webOS
>>  -*
>>  -* Distributable under LGPL license.
>>  -* See terms of license at gnu.org.
>>  -*/
>>  -package org.jboss.deployment;
>>  -
>>  +/***************************************
>>  + *                                     *
>>  + *  JBoss: The OpenSource J2EE WebOS   *
>>  + *                                     *
>>  + *  Distributable under LGPL license.  *
>>  + *  See terms of license at gnu.org.   *
>>  + *                                     *
>>  + ***************************************/
>>   
>>  +package org.jboss.deployment;
>>   
>>   import java.io.File;
>>   import java.io.FileInputStream;
>>  @@ -24,42 +25,46 @@
>>   import java.util.Vector;
>>   import java.util.jar.JarFile;
>>   import java.util.jar.Manifest;
>>  +
>>   import javax.management.ObjectName;
>>  +
>>   import javax.xml.parsers.DocumentBuilder;
>>   import javax.xml.parsers.DocumentBuilderFactory;
>>  -import org.jboss.logging.Logger;
>>  -import org.jboss.metadata.ApplicationMetaData;
>>  -import org.jboss.metadata.BeanMetaData;
>>  -import org.jboss.system.ServiceLibraries;
>>  -import org.jboss.system.UnifiedClassLoader;
>>  +
>>   import org.w3c.dom.Document;
>>   import org.xml.sax.InputSource;
>>   import org.xml.sax.SAXException;
>>   
>>  +import org.jboss.logging.Logger;
>>  +import org.jboss.system.ServiceLibraries;
>>  +import org.jboss.system.UnifiedClassLoader;
>>  +
>>   /**
>>  -* Service Deployment Info .
>>  -*
>>  -* Every deployment (even the J2EE ones) should be seen at some point
>>as 
>>  -* Service Deployment info
>>  -*
>>  -* @see       org.jboss.system.Service
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>David
>>Maplesden</a>
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>David
>>Jencks</a>
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>Daniel
>>Schulze</a>
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G.
>>Jung</a>
>>  -* @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
>>  -* @version   $Revision: 1.10 $ <p>
>>  -*
>>  -*      <b>20011211 marc fleury:</b>
>>  -*      <ul>
>>  -*        <li>initial import based on d-jenck deployement info inner
>>class in DeploymentMBeanSupport   
>>  -*      </ul>
>>  -*      <b>20011225 marc fleury:</b>
>>  -*      <ul>
>>  -*        <li>Unification of deployers and merge with Jung/Schulze's
>>Deployment.java   
>>  -*      </ul>
>>  -*/
>>  + * Service Deployment Info .
>>  + *
>>  + * Every deployment (even the J2EE ones) should be seen at some point
>>as 
>>  + * Service Deployment info
>>  + *
>>  + * @see org.jboss.system.Service
>>  + *
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>David
>>Maplesden</a>
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>David
>>Jencks</a>
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel
>>Schulze</a>
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Christoph G.
>>Jung</a>
>>  + * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
>>  + * @version   $Revision: 1.11 $ <p>
>>  + *
>>  + * <b>20011211 marc fleury:</b>
>>  + * <ul>
>>  + *    <li>initial import based on d-jenck deployement info inner class
>>in DeploymentMBeanSupport   
>>  + * </ul>
>>  + *
>>  + * <b>20011225 marc fleury:</b>
>>  + * <ul>
>>  + *    <li>Unification of deployers and merge with Jung/Schulze's
>>Deployment.java   
>>  + * </ul>
>>  + */
>>   public class DeploymentInfo 
>>   {   
>>      // Variables ------------------------------------------------------------
>>  @@ -135,7 +140,7 @@
>>      public ObjectName deployedObject;
>>      
>>      public DeploymentInfo(URL url, DeploymentInfo parent)
>>  -   throws DeploymentException
>>  +      throws DeploymentException
>>      { 
>>         // The key url the deployment comes from 
>>         this.url = url;
>>  @@ -195,9 +200,9 @@
>>      
>>      
>>      /**
>>  -   * getManifest returns (if present) the deployment's manifest
>>  -   * it is lazy loaded to work from the localURL
>>  -   */
>>  +    * getManifest returns (if present) the deployment's manifest
>>  +    * it is lazy loaded to work from the localURL
>>  +    */
>>      public Manifest getManifest() 
>>      {
>>         try 
>>  @@ -258,77 +263,6 @@
>>         return f.delete();
>>      }
>>   
>>  -   /** A method that walks through the DeploymentInfo hiearchy looking
>>  -    *for the ejb-name that corresponds to the given ejb-link value.
>>  -    *@param ejbLink, the ejb-link value from the ejb-jar.xml or
>>web.xml
>>  -    *descriptor to find. Need to add support for the
>><path>/ejb.jar#ejb-name style.
>>  -    *@return The deployment JNDI name of the ejb home to which the
>>ejbLink
>>  -    *refers if it is found, null if no such ejb exists.
>>  -    */
>>  -   public String findEjbLink(String ejbLink)
>>  -   {
>>  -      // Walk up to the topmost DeploymentInfo
>>  -      DeploymentInfo top = parent;
>>  -      while( top != null && top.parent != null )
>>  -         top = top.parent;
>>  -      if( top == null )
>>  -         return null;
>>  -      // Search from the top for a matching ejb
>>  -      return findEjbLink(top, ejbLink, false);
>>  -   }
>>  -
>>  -   /** A method that walks through the DeploymentInfo hiearchy looking
>>  -    *for the ejb-name that corresponds to the given ejb-link value.
>>  -    *@param ejbLink, the ejb-link value from the ejb-jar.xml or
>>web.xml
>>  -    *descriptor to find. Need to add support for the
>><path>/ejb.jar#ejb-name style.
>>  -    *@return The deployment JNDI name of the ejb local home to which
>>the ejbLink
>>  -    *refers if it is found, null if no such ejb exists.
>>  -    */
>>  -   public String findEjbLocalLink(String ejbLink)
>>  -   {
>>  -      // Walk up to the topmost DeploymentInfo
>>  -      DeploymentInfo top = parent;
>>  -      while( top != null && top.parent != null )
>>  -         top = top.parent;
>>  -      if( top == null )
>>  -         return null;
>>  -      // Search from the top for a matching ejb
>>  -      return findEjbLink(top, ejbLink, true);
>>  -   }
>>  -
>>  -   /** Recursively search the DeploymentInfo looking for
>>ApplicationMetaData
>>  -    *nodes that may contain a BeanMetaData keyed by the ejbLink value.
>>  -    *@param isLocal, a flag indicating if the JNDI name requested is
>>for the
>>  -    *local home vs the remote home.
>>  -    */
>>  -   private static String findEjbLink(DeploymentInfo parent, String
>>ejbLink,
>>  -      boolean isLocal)
>>  -   {
>>  -      String ejbName = null;
>>  -      // Search the parent if it has ApplicationMetaData
>>  -      if( parent.metaData instanceof ApplicationMetaData )
>>  -      {
>>  -         ApplicationMetaData appMD = (ApplicationMetaData)
>>parent.metaData;
>>  -         BeanMetaData beanMD = appMD.getBeanByEjbName(ejbLink);
>>  -         if( beanMD != null )
>>  -         {
>>  -            if( isLocal == true )
>>  -               ejbName = beanMD.getLocalJndiName();
>>  -            else
>>  -               ejbName = beanMD.getJndiName();
>>  -            return ejbName;
>>  -         }
>>  -      }
>>  -      // Search each subcontext
>>  -      Iterator iter = parent.subDeployments.iterator();
>>  -      while( iter.hasNext() && ejbName == null )
>>  -      {
>>  -         DeploymentInfo child = (DeploymentInfo) iter.next();
>>  -         ejbName = findEjbLink(child, ejbLink, isLocal);
>>  -      }
>>  -      return ejbName;
>>  -   }
>>  -
>>      public int hashCode() 
>>      {
>>         return url.hashCode();
>>  @@ -345,6 +279,6 @@
>>   
>>      public String toString()
>>      {
>>  -      return "DeploymentInfo:url=" + url;
>>  +      return super.toString() + "{ url=" + url + " }";
>>      }
>>   }
>>  
>>  
>>  
>>
>>_______________________________________________
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>
>
>_______________________________________________
>Jboss-development mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-development
>



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

Reply via email to