Hi! 

yes, typically using a patch file. I'd suggest you pick out an example 
(e.g., the ContextUtility class) to see how it's done.

> Which tag is responsible for registering my class as a service? 

<component>

Thank's again for the help so far.

I modified now the cocoon.conf with a line: 

<component class="de.testgmbh.tapestry.Home"
logger="lenya.cocoon.components" role="de.testgmbh.tapestry.Home"/>

I put this class into a jar and copy it to the lenya/web-inf/lib folder. 
There, i also copy the Tapestry libs. My class still looks like follows: 

public abstract class Home extends BasePage implements Serviceable{
        
        private ServiceManager manager;

public void service(ServiceManager manager) throws ServiceException {
                
                System.out.println("Position1");
                this.manager = manager;
                
        }
public String getlenya() throws ServiceException, PublicationException {
         
          System.out.println("Position 2");
        Request request;
        ContextUtility context = null;
        System.out.println("Position 3");
        System.out.println("The Manager is: "+manager);
                
        try {
        context = (ContextUtility) this.manager.lookup(ContextUtility.ROLE);
        System.out.println("Position 4");
        
        request = context.getRequest();
        }
        finally {
         this.manager.release(context);
        }

        System.out.println("Position 5");

If I run this code I get 

Position 2
Position 3 
The Manager is: null 

I never get to Position 4 which means I guess the lookup fails because the
manager is still null. 

I also never get to Position 1 for the service method of the implemented
interface, but Lenya starts and there are no errors regarding the
configuration file (before I had some class not found exceptions that i
fixed with copy the tapestry files to lenyas lib folder). 

If I understand the concept correctly, the service manager is used to call 
a component (my class) which itself then calls another component
ContextUtility. 

Can you see where there lies the error? 

Thank you. 


 




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

Reply via email to