[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerFactory.java ContainerFactoryMBean.java

2002-01-19 Thread marc fleury

  User: mnf999  
  Date: 02/01/19 19:46:11

  Removed: src/main/org/jboss/ejb ContainerFactory.java
ContainerFactoryMBean.java
  Log:
  move the EJB Deployer

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerFactory.java ContainerFactoryMBean.java

2001-06-14 Thread starksm

  User: starksm 
  Date: 01/06/14 16:44:31

  Modified:src/main/org/jboss/ejb ContainerFactory.java
ContainerFactoryMBean.java
  Log:
  Added support for validating j2ee descriptor DTDs
  
  Revision  ChangesPath
  1.76  +27 -2 jboss/src/main/org/jboss/ejb/ContainerFactory.java
  
  Index: ContainerFactory.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- ContainerFactory.java 2001/06/13 04:49:58 1.75
  +++ ContainerFactory.java 2001/06/14 23:44:31 1.76
  @@ -82,7 +82,7 @@
   *   @author Peter Antman ([EMAIL PROTECTED])
   *   @author Scott Stark([EMAIL PROTECTED])
   *
  -*   @version $Revision: 1.75 $
  +*   @version $Revision: 1.76 $
   */
   public class ContainerFactory
 extends org.jboss.util.ServiceMBeanSupport
  @@ -117,6 +117,8 @@
 boolean metricsEnabled = false;
 /* Enable JMS monitoring of the bean cache */
 private boolean m_beanCacheJMSMonitoring;
  +  // A flag indicating if deployment descriptors should be validated
  +  private boolean validateDTDs;
   
 // Public 
   
  @@ -257,6 +259,23 @@
   m_beanCacheJMSMonitoring = enable;
   }
   
  +   /** Get the flag indicating that ejb-jar.dtd, jboss.dtd &
  +jboss-web.dtd conforming documents should be validated
  +against the DTD.
  +*/
  +   public boolean getValidateDTDs()
  +   {
  +   return validateDTDs;
  +   }
  +   /** Set the flag indicating that ejb-jar.dtd, jboss.dtd &
  +jboss-web.dtd conforming documents should be validated
  +against the DTD.
  +*/
  +   public void setValidateDTDs(boolean validate)
  +   {
  +   this.validateDTDs = validate;
  +   }
  +
 /**
 *   Deploy the file at this URL. This method is typically called from remote 
administration
 *   tools that cannot handle java.net.URL's as parameters to methods
  @@ -388,7 +407,7 @@
   throws NamingException, Exception
   {
 // Create a file loader with which to load the files
  -  XmlFileLoader efm = new XmlFileLoader();
  +  XmlFileLoader efm = new XmlFileLoader(validateDTDs);
   
 // the file manager gets its file from the classloader
 // create a classloader that to access the metadata
  @@ -931,3 +950,9 @@
   return ic;
   }
 }
  +
  +/* Change log:
  +
  +* Thu Jun 14 23:28:58  2001 UTC, starksm
  + Added support for validation of the j2ee related deployment descriptors.
  + */
  \ No newline at end of file
  
  
  
  1.12  +16 -2 jboss/src/main/org/jboss/ejb/ContainerFactoryMBean.java
  
  Index: ContainerFactoryMBean.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactoryMBean.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ContainerFactoryMBean.java2001/05/22 05:08:00 1.11
  +++ ContainerFactoryMBean.java2001/06/14 23:44:31 1.12
  @@ -15,7 +15,7 @@
*   @author Rickard Öberg ([EMAIL PROTECTED])
*   @author Juha Lindfors ([EMAIL PROTECTED])
*
  - *   @version $Revision: 1.11 $
  + *   @version $Revision: 1.12 $
*/
   public interface ContainerFactoryMBean
extends org.jboss.util.ServiceMBean
  @@ -119,5 +119,19 @@
   * Set the JMS monitoring of the bean cache.
   */
  public void setBeanCacheJMSMonitoringEnabled(boolean enable);
  -}
   
  +   /** Get the flag indicating that ejb-jar.dtd, jboss.dtd &
  +jboss-web.dtd conforming documents should be validated
  +against the DTD.
  +*/
  +   public boolean getValidateDTDs();
  +   /** Set the flag indicating that ejb-jar.dtd, jboss.dtd &
  +jboss-web.dtd conforming documents should be validated
  +against the DTD.
  +*/
  +   public void setValidateDTDs(boolean validate);
  +}
  +/* Change log.
  + * Author: starksm, Date: Thu Jun 14 17:14:14  2001 GMT
  + Added getValidateDTDs/setValidateDTDs methods.
  + */
  \ No newline at end of file
  
  
  

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerFactory.java ContainerFactoryMBean.java

2001-05-21 Thread schaefera

  User: schaefera
  Date: 01/05/21 22:08:00

  Modified:src/main/org/jboss/ejb ContainerFactory.java
ContainerFactoryMBean.java
  Log:
  Modified the EJB deployment therefore that it can report the deployed
  EJBs for a given application to the Data Collector.
  
  Revision  ChangesPath
  1.68  +66 -12jboss/src/main/org/jboss/ejb/ContainerFactory.java
  
  Index: ContainerFactory.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- ContainerFactory.java 2001/02/27 16:48:08 1.67
  +++ ContainerFactory.java 2001/05/22 05:08:00 1.68
  @@ -65,6 +65,9 @@
   import org.jboss.metadata.XmlFileLoader;
   import org.jboss.logging.Logger;
   
  +import org.jboss.mgt.EJB;
  +import org.jboss.mgt.Module;
  +
   /**
   *   A ContainerFactory is used to deploy EJB applications. It can be given a URL to
   *  an EJB-jar or EJB-JAR XML file, which will be used to instantiate containers and 
make
  @@ -79,7 +82,7 @@
   *   @author Peter Antman ([EMAIL PROTECTED])
   *   @author Scott Stark([EMAIL PROTECTED])
   *
  -*   @version $Revision: 1.67 $
  +*   @version $Revision: 1.68 $
   */
   public class ContainerFactory
 extends org.jboss.util.ServiceMBeanSupport
  @@ -254,16 +257,16 @@
 * @exception   MalformedURLException
 * @exception   DeploymentException
 */
  -  public void deploy( String url )
  +  public void deploy( String url, String appId )
   throws MalformedURLException, DeploymentException
   {
   // Delegate to "real" deployment
  -deploy( new URL( url ) );
  +deploy( new URL( url ), appId );
   }
   //
   // Richard Gyger
   //
  -  public void deploy( String appUrl, String[] jarUrls )
  +  public void deploy( String appUrl, String[] jarUrls, String appId )
   throws MalformedURLException, DeploymentException
   {
   // Delegate to "real" deployment
  @@ -272,7 +275,7 @@
   for( int i = 0; i < tmp.length; i++ )
 tmp[ i ] = new URL( jarUrls[ i ] );
   
  -deploy( new URL( appUrl ), tmp );
  +deploy( new URL( appUrl ), tmp, appId );
   }
   
 /**
  @@ -301,15 +304,15 @@
 *
 * @exception   DeploymentException
 */
  -  public synchronized void deploy( URL url )
  +  public synchronized void deploy( URL url, String appId )
   throws DeploymentException
   {
  -deploy( url, new URL[]{ url } );
  +deploy( url, new URL[]{ url }, appId );
   }
   //
   // Richard Gyger
   //
  -  public synchronized void deploy( URL appUrl, URL[] jarUrls )
  +  public synchronized void deploy( URL appUrl, URL[] jarUrls, String appId )
   throws DeploymentException
   {
   // Create application
  @@ -329,9 +332,11 @@
 // create the _real_ classloader for this app
 ClassLoader cl = new URLClassLoader( jarUrls, 
Thread.currentThread().getContextClassLoader() );
 app.setClassLoader( cl );
  +  // Create data container for deployed EJBs management data
  +  Module module = new Module( "EJB", "??" );
   
 for( int i = 0; i < jarUrls.length; i++ )
  -   deploy( app, jarUrls[ i ], cl );
  +   deploy( app, jarUrls[ i ], cl, module );
   
 // Init application
 app.init();
  @@ -346,6 +351,22 @@
 log.log( "Deployed application: " + app.getName() );
 // Register deployment. Use the application name in the hashtable
 deployments.put( appUrl, app );
  +  // Save EJBs management data: application
  +  log.log( "Add module: " + module + ", to app: " + appId );
  +  getServer().invoke(
  +  new ObjectName( "Management", "service", "Collector" ),
  + "saveModule",
  + new Object[] {
  +appId,
  +new Integer( org.jboss.mgt.Application.EJBS ),
  +module
  + },
  + new String[] {
  +String.class.getName(),
  +Integer.TYPE.getName(),
  +module.getClass().getName()
  + }
  +  );
 }
   catch( Exception e )
 {
  @@ -370,7 +391,7 @@
 }
   }
   
  -  private void deploy( Application app, URL url, ClassLoader cl )
  +  private void deploy( Application app, URL url, ClassLoader cl, Module module )
   throws NamingException, Exception
   {
 // Create a file loader with which to load the files
  @@ -435,7 +456,10 @@
   BeanMetaData bean = (BeanMetaData) beans.next();
   
   log.log( "Deploying " + bean.getEjbName() );
  -app.addContainer( createContainer( bean, cl, localCl ) );
  +EJB ejb = new EJB();
  +module.addItem( ejb );
  +ejb.setName( bean.getEjbName() );
  +app.addContainer( createContainer( bean, cl, localCl, ejb ) );
   }
   }
   
  @@ -463,6 +487,25 @@
   l