portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/dispatcher JetspeedRequestDispatcher.java
Date Wed, 18 Aug 2004 01:13:27 GMT
taylor      2004/08/17 18:13:27

  Modified:    commons/src/java/org/apache/jetspeed/container
                        JetspeedContainerServlet.java
                        JetspeedPortletConfig.java
               commons  project.xml
               commons/src/java/org/apache/jetspeed/dispatcher
                        JetspeedRequestDispatcher.java
  Log:
  removing all dependencies on jakarta commons and log4j to simply the jetspeed requirements
for deployment
  we were creating class loader conflicts with other apps using commons or log4j, not to mention
some really ugly class loader problems in weblogic
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.15      +27 -27    jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedContainerServlet.java
  
  Index: JetspeedContainerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedContainerServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JetspeedContainerServlet.java	16 Aug 2004 18:25:25 -0000	1.14
  +++ JetspeedContainerServlet.java	18 Aug 2004 01:13:27 -0000	1.15
  @@ -35,9 +35,9 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
  -import org.apache.commons.lang.exception.ExceptionUtils;
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  +//import org.apache.commons.lang.exception.ExceptionUtils;
  +//import org.apache.commons.logging.Log;
  +//import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.factory.JetspeedPortletFactoryProxy;
   import org.apache.jetspeed.services.JetspeedPortletServices;
   import org.apache.jetspeed.services.PortletServices;
  @@ -54,8 +54,8 @@
    */
   public class JetspeedContainerServlet extends HttpServlet implements ServletContainerConstants
   {
  -    private final static Log log = LogFactory.getLog(JetspeedContainerServlet.class);
  -    private final static Log console = LogFactory.getLog(CONSOLE_LOGGER);
  + //   private final static Log log = LogFactory.getLog(JetspeedContainerServlet.class);
  +   // private final static Log console = LogFactory.getLog(CONSOLE_LOGGER);
   
       /**
        * Whether init succeeded or not.
  @@ -77,8 +77,8 @@
       public synchronized final void init(ServletConfig config) throws ServletException
       {
           synchronized (this.getClass())
  -        {
  -            log.info(INIT_START_MSG + " " + config.getServletContext().getRealPath("/"));
  +        {            
  +            // log.info(INIT_START_MSG + " " + config.getServletContext().getRealPath("/"));
               super.init(config);
   
   
  @@ -89,7 +89,7 @@
                   String registerAtInit = config.getInitParameter("registerAtInit");
                   if (null != registerAtInit)
                   {
  -                    log.info("Considering PA for registration during servlet init: " +
context.getServletContextName());
  +                    // log.info("Considering PA for registration during servlet init: "
+ context.getServletContextName());
                       String portletApplication = config.getInitParameter("portletApplication");
                       if (null == portletApplication)
                       {
  @@ -101,20 +101,20 @@
                   }
                   else
                   {
  -                    log.info("Will not register this PA during servlet init: " + context.getServletContextName());
  +                    // log.info("Will not register this PA during servlet init: " + context.getServletContextName());
                   }
                   
               }
               catch (Exception e)
               {
                   initFailure = e;
  -                log.fatal("Jetspeed: init() failed: ", e);
  -                System.err.println(ExceptionUtils.getStackTrace(e));
  +                // log.fatal("Jetspeed: init() failed: ", e);
  +                // System.err.println(ExceptionUtils.getStackTrace(e));
                   throw new ServletException("Jetspeed: init() failed", e);
               }
   
  -            console.info(INIT_DONE_MSG);
  -            log.info(INIT_DONE_MSG + " " + config.getServletContext().getRealPath("/"));
  +            // console.info(INIT_DONE_MSG);
  +            // log.info(INIT_DONE_MSG + " " + config.getServletContext().getRealPath("/"));
           }
       }
   
  @@ -122,22 +122,22 @@
       throws ServletException
       {
   
  -        log.info("Attempting to register portlet application: name=" + portletApplicationName);
  +        // log.info("Attempting to register portlet application: name=" + portletApplicationName);
           if (attemptRegistration(context, portletApplicationName)) {
  -            log.info("Registered portlet application: name=" + portletApplicationName);
  +            // log.info("Registered portlet application: name=" + portletApplicationName);
           }
   
  -        log.info("Could not registered protlet application; starting back ground thread
to register when jetspeed comes online: name=" + portletApplicationName);
  +        // log.info("Could not registered protlet application; starting back ground thread
to register when jetspeed comes online: name=" + portletApplicationName);
           final Timer timer = new Timer(true);
           timer.schedule(
                   new TimerTask() {
                       public void run() {
  -                        log.info("Attempting to register portlet application: name=" +
portletApplicationName);
  +                        // log.info("Attempting to register portlet application: name="
+ portletApplicationName);
                           if (attemptRegistration(context, portletApplicationName)) {
  -                            log.info("Registered portlet application: name=" + portletApplicationName);
  +                            // log.info("Registered portlet application: name=" + portletApplicationName);
                               timer.cancel();
                           } else {
  -                            log.info("Could not register portlet application; will try
again later: name=" + portletApplicationName);
  +                            // log.info("Could not register portlet application; will try
again later: name=" + portletApplicationName);
                           }
                       }
                   },
  @@ -160,11 +160,11 @@
                       FileSystemHelper webapp = new DirectoryHelper(new File(context.getRealPath("/")));
                       if (registrar.registerPortletApplication(webapp, portletApplicationName))
                       {
  -                        log.info("Portlet Application Registered at Servlet Init: " + portletApplicationName);
  +                        // log.info("Portlet Application Registered at Servlet Init: "
+ portletApplicationName);
                       }
                       else
                       {
  -                        log.info("Portlet Application did not change. Not Registered at
Servlet Init: " + portletApplicationName);
  +                        // log.info("Portlet Application did not change. Not Registered
at Servlet Init: " + portletApplicationName);
                       }
                       return true;
                   }
  @@ -172,7 +172,7 @@
           }
           catch (Exception e)
           {
  -            log.error("Failed to register PA: " + portletApplicationName);
  +            // log.error("Failed to register PA: " + portletApplicationName);
           }
           return false;
       }    
  @@ -211,7 +211,7 @@
                   return;
               }
   
  -            log.debug("Rendering: Portlet Class = " + portletDefinition.getClassName());
  +            // log.debug("Rendering: Portlet Class = " + portletDefinition.getClassName());
   
               if (method == ContainerConstants.METHOD_ACTION)
               {
  @@ -235,7 +235,7 @@
           catch (Throwable t)
           {
   
  -            log.error("Error rendering portlet \""+portletName+"\": " + t.toString(), t);
  +            // log.error("Error rendering portlet \""+portletName+"\": " + t.toString(),
t);
               try
               {
                   String errorTemplate = getInitParameter("portal.error.page");
  @@ -257,7 +257,7 @@
                   directError.write("Error occured process includeTemplate(): " + t.toString()
+ "\n\n");
                   t.printStackTrace(directError);
                   directError.close();
  -                log.error("Error rendering JetspeedContainerServlet error page: " + e.toString(),
e);
  +                // log.error("Error rendering JetspeedContainerServlet error page: " +
e.toString(), e);
               }
               finally
               {
  @@ -290,7 +290,7 @@
        */
       public final void destroy()
       {
  -        log.info("Done shutting down!");
  +        // log.info("Done shutting down!");
       }
   
       public static final String LOCAL_CLASSES = "/WEB-INF/classes/";
  
  
  
  1.5       +4 -7      jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
  
  Index: JetspeedPortletConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/container/JetspeedPortletConfig.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedPortletConfig.java	16 Aug 2004 18:26:21 -0000	1.4
  +++ JetspeedPortletConfig.java	18 Aug 2004 01:13:27 -0000	1.5
  @@ -24,9 +24,6 @@
   import javax.portlet.PortletConfig;
   import javax.portlet.PortletContext;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  -
   import org.apache.pluto.om.common.Language;
   import org.apache.pluto.om.common.LanguageSet;
   import org.apache.pluto.om.common.Parameter;
  @@ -42,7 +39,7 @@
    */
   public class JetspeedPortletConfig implements PortletConfig, InternalPortletConfig
   {
  -    private static final Log log = LogFactory.getLog(JetspeedPortletConfig.class);
  +    // private static final Log log = LogFactory.getLog(JetspeedPortletConfig.class);
       
       private ServletConfig servletConfig;
       private PortletContext portletContext;
  @@ -81,13 +78,13 @@
   
       public String getInitParameter(java.lang.String name)
       {
  -        if (log.isDebugEnabled()) log.debug("Getting init parameter for: " + name);
  +        //if (log.isDebugEnabled()) log.debug("Getting init parameter for: " + name);
           ParameterSet parameters = portletDefinition.getInitParameterSet();
           Parameter param = parameters.get(name);
   
           if (param != null)
           {
  -            if (log.isDebugEnabled()) log.debug("Param: [[name," + name + "], [value, "
+ param.getValue() + "]]");
  +            // if (log.isDebugEnabled()) log.debug("Param: [[name," + name + "], [value,
" + param.getValue() + "]]");
               return param.getValue();
           }
   
  
  
  
  1.21      +1 -57     jakarta-jetspeed-2/commons/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/project.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- project.xml	29 Jul 2004 22:26:26 -0000	1.20
  +++ project.xml	18 Aug 2004 01:13:27 -0000	1.21
  @@ -33,13 +33,6 @@
   
     <dependencies>
       <dependency>
  -      <id>commons-collections</id>
  -      <version>3.0</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
         <id>pluto</id>
         <version>1.0.1-SNAPSHOT</version>
         <properties>
  @@ -54,43 +47,13 @@
         </properties>
       </dependency>        
       <dependency>
  -      <id>commons-lang</id>
  -      <version>2.0</version>
  -      <properties>
  -        <war.bundle>false</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <id>commons-logging</id>
  -      <version>1.0.3</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <id>commons-beanutils</id>
  -      <version>1.6.1</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
         <id>junit</id>
         <version>3.8.1</version>
         <properties>
           <war.bundle>false</war.bundle>
         </properties>
       </dependency>
  -    <dependency>
  -      <!-- Why is this needed? -->
  -      <id>log4j</id>
  -      <version>1.2.8</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>   
   	 <dependency>
  -      <!-- portlet-api.jar must be in %MAVEN_HOME%/portlet-api/jar -->
         <id>portlet-api</id>
         <groupId>portlet-api</groupId>
         <version>1.0</version>
  @@ -109,26 +72,7 @@
         <groupId>portals-bridges</groupId>
         <artifactId>portals-bridges-common</artifactId>
         <version>0.1</version>
  -    </dependency>
  -    
  -    <dependency>
  -      <id>ojb:db-ojb</id>
  -      <version>1.0.rc6-PATCHED</version>
  -      <properties>
  -        <war.bundle>false</war.bundle>
  -      </properties>
  -    </dependency>
  -    
  -    <!-- we need ojb because of the ManageableCollection interface -->
  -    <!--
  -    <dependency>
  -      <id>ojb</id>
  -      <version>1.0.rc3-PATCHED</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>    
  -    -->
  +    </dependency>        
     </dependencies>
     <build>
       <sourceDirectory>src/java</sourceDirectory>
  
  
  
  1.5       +13 -13    jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/dispatcher/JetspeedRequestDispatcher.java
  
  Index: JetspeedRequestDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/dispatcher/JetspeedRequestDispatcher.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedRequestDispatcher.java	8 Mar 2004 00:41:40 -0000	1.4
  +++ JetspeedRequestDispatcher.java	18 Aug 2004 01:13:27 -0000	1.5
  @@ -25,8 +25,8 @@
   import javax.portlet.RenderRequest;
   import javax.portlet.PortletException;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  +//import org.apache.commons.logging.Log;
  +//import org.apache.commons.logging.LogFactory;
   import org.apache.pluto.core.impl.RenderRequestImpl;
   import org.apache.pluto.core.impl.RenderResponseImpl;
   
  @@ -39,7 +39,7 @@
   public class JetspeedRequestDispatcher implements PortletRequestDispatcher
   {
       private RequestDispatcher requestDispatcher;
  -    private static final Log log = LogFactory.getLog(JetspeedRequestDispatcher.class);
  +  //  private static final Log log = LogFactory.getLog(JetspeedRequestDispatcher.class);
   
       public JetspeedRequestDispatcher(RequestDispatcher requestDispatcher)
       {
  @@ -75,13 +75,13 @@
                   writeStackTrace(e.getStackTrace(), pw);
   
               }
  -            log.error("JetspeedRequestDispatcher failed (details below)");
  -            log.error(
  -                "Begin: ******************************************* JetspeedRequestDispatcher
Failure Report******************************************");
  -            log.error("Cause: " + e.getMessage(), e);
  +            //log.error("JetspeedRequestDispatcher failed (details below)");
  +            //log.error(
  +            //    "Begin: ******************************************* JetspeedRequestDispatcher
Failure Report******************************************");
  +            // log.error("Cause: " + e.getMessage(), e);
               if (e.getCause() != null)
               {
  -                log.error("Root Cause: " + e.getCause().getMessage(), e.getCause());
  +               // log.error("Root Cause: " + e.getCause().getMessage(), e.getCause());
                   if (pw != null)
                   {
                       pw.write("<p>Root Cause: </p>");
  @@ -90,15 +90,15 @@
                       writeStackTrace(e.getCause().getStackTrace(), pw);
                   }
   
  -                log.error(
  -                    "End: *******************************************JetspeedRequestDispatcher
Failure Report******************************************");
  +               // log.error(
  +               //     "End: *******************************************JetspeedRequestDispatcher
Failure Report******************************************");
                   pw.flush();
                   throw new PortletException(e);
               }
               else
               {
  -                log.error(
  -                    "End: *******************************************JetspeedRequestDispatcher
Failure Report******************************************");
  +                //log.error(
  +                //    "End: *******************************************JetspeedRequestDispatcher
Failure Report******************************************");
   				pw.flush();
                   throw new PortletException(e);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message