Another question:

This issue can be generated by a bad release of some components?

xmlns:xsp-session="http://apache.org/xsp/session/2.0"; create-session="false">

I am using the <xsp-session:getxml> tag, but I am suspecting that this tag
is not working good.

Here the original code:

************************************************
public static DocumentFragment getXML(ComponentManager cm, String context,
String path) throws ProcessingException {

         DocumentFragment df = null;
         SessionManager sm = null;

         try {
             // Start looking up the manager
             sm = (SessionManager)cm.lookup(SessionManager.ROLE);
             // Make our work
             df = sm.getContextFragment(context, path);
             if (sm != null) {
                 cm.release(sm);
             }
         } catch (ComponentException ce) {
                throw new ProcessingException("Error during lookup of
SessionManager component.", ce);
         }
         // End releasing the sessionmanager
        return df;
     }
}

**************************************************************
But now I was rewriting this to:
**************************************************************

    public static DocumentFragment getXML(ComponentManager cm, String
context, String path) throws ProcessingException {

   DocumentFragment df = null;
   SessionManager sm = null;

   // First check if there is a valid ComponentManager
   if (cm != null) {
      try {
        // Check if SessionManager is avaliable into the ComponentManager
        if (cm.hasComponent(SessionManager.ROLE)) {
          // Looking up the SessionManager
                sm = (SessionManager)cm.lookup(SessionManager.ROLE);
                // Check if the requested context is avaliable
                if (sm.existsContext(context)) {
                   // The context exist
                   df = sm.getContextFragment(context, path);
                }
                else { // Context does not exist
                                ;
                }
                if (sm!=null)
                  cm.release(sm);
        }
        else
           ;
     } catch (ComponentException ce) {
        throw new ProcessingException("ags: Unknown Error using
SessionManager component.", ce);
     }
   }
   return df;
}
**************************************************************

Antonio Gallardo


Antonio Gallardo dijo:
> Hi.
>
> I am still having problem in a production environment with the session
> manager. There are 35 registered users. Of course the users sometimes
> does not close sessions.
>
> All the day everything works fine. But at the end of the day I was
> starting to get the following errors:
>
> 1-Message: Handler information not found
>   Description: org.apache.cocoon.ProcessingException: Handler
> information
> not found.
>
> 2-Message: Exception in ServerPagesGenerator.generate()
>   Description: org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.IllegalArgument:
> SessionManager.getContextFragment Context 'authentication' not found.
>
> 3-Also I saw after that another error related with the ComponentManager
> lookup.
>
>
> Currently I was updated in the cocoon.xconf to:
>
> <session-manager logger="core.session-manager" pool-grow="4"
> pool-max="100" pool-min="8"/>
>
> <authentication-manager logger="core.authentication-manager"
> pool-grow="4" pool-max="100" pool-min="8">
>     <mediatypes default="html">
>         <media name="wap" useragent="Nokia"/>
>         <media name="wap" useragent="UP"/>
>         <media name="wap" useragent="Wapalizer"/>
>     </mediatypes>
> </authentication-manager>
>
> Please note that I changed the value of attribute "pool-max" from "32"
> to "100" in both elements:
>
> <session-manager>
> <authentication-manager>
>
> I will try tomorrow what will happends with this new config of
> cocoon.xconf
>
> Please note that the Squid proxy is now turned off. This let
> users'request go directly to the Cocoon server.
>
> Another problem is that still there are some problems with the session
> mixing. If I request a page from one user
>
> I forgotted: I am using Tomcat 4.1.12, Java 1.4.1_01, Cocoon 2.1 from
> 25-Nov-2002 on Red Hat Linux 8.0.
>
> The computer is a PIII 600 with 384 MB of RAM.
>
> Please helpme.
>
> Antonio Gallardo
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to