It is coming from: org.apache.avalon.excalibur.component.ComponentHandler.getComponentHandler(ComponentHandler.java:278)
I was able to track down the source:
http://www.devlib.org/apache/avalon/excalibur-component/source/
The error is coming from this code:
int numInterfaces = 0;
if( SingleThreaded.class.isAssignableFrom( componentClass ) )
{
numInterfaces++;
}
if( ThreadSafe.class.isAssignableFrom( componentClass ) )
{
numInterfaces++;
}
if( Poolable.class.isAssignableFrom( componentClass ) )
{
numInterfaces++;
}
if( numInterfaces > 1 )
{
throw new Exception( "[CONFLICT] More than one lifecycle interface in "
+ componentClass.getName() + " May implement no more than one of "
+ "SingleThreaded, ThreadSafe, or Poolable" );
}
...I'll have to dig deeper.
-Lachlan
On 10/18/05, Sylvain Wallez <[EMAIL PROTECTED]> wrote:
Ralph Goers wrote:
> No, but it makes sense since they each have characterstics that are
> incompatible with each other.
> SingleThreaded implies that the class is a singleton and is not thread
> safe and should essentially be executed in a serial fashion (a huge
> bottleneck).
SingleThreaded doesn't mean singleton! It means that the class is not
reentrant and not reusable, leading the system to create a new instance
each time the component is looked up. This is also the default for
component that implement no lifestyle interface.
> ThreadSafe - the class is rentrant and can be executed by multiple
> threads simultaneously.
And in this is a singleton, as only one instance is created and used for
all requets.
> Poolable - Each thread should get its own instance of the class and
> that there should be a pool of them from which they are doled out.
Yup. Add to the picture Recyclable which extends Poolable for pooled
components that want to be notified that they are recycled, e.g. for
cleaning up their state.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
