cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Ezkovich <>
Subject Getting an actual Instance of a Component using ServiceManager.lookup()
Date Mon, 19 Jul 2004 02:55:22 GMT
I have a non-sitemap component that I have marked as ThreadSafe, when I 
try to access it in another component using the ServiceManager, I get 
an instance of java.lang.reflect.Proxy. Obviously, I am missing 
something. I could get its InvocationHandler, but to use it seems 
cumbersome. There must be some way to get an actual instance of my 

Here's what I am doing. In cocoon.xconf I declare a component

   <component class="com.hardBop.workFlow.Processor" logger="hardbop" 
         <parameter name="datasource" value="hardbop"/>
         <parameter name="" value=""/>
         <parameter name="from_address" value=""/>

I attempt to access the component in another components initialize 

	 this.processor = 

Of course this causes a ClassCastException to be thrown.

I could always implement these classes as plain Java objects but I 
would really like to take advantage of the built in pooling and 

So my question is, what do I need to do to get an actual instance of my 

Any help is greatly appreciated.

Glen Ezkovich
HardBop Consulting - new and improved site coming soon

A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to 
worry about answers."
- Thomas Pynchon Gravity's Rainbow

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message