Vinay Chandran wrote:

Steve,
Here's the patch as an attachment.
Regards,
Vinay


Thanks - patch is applied. Have also update corresponding classes (Scanner) in the composition package.

Cheers, Steve.

--- Stephen McConnell <[EMAIL PROTECTED]> wrote:


Vinay wrote:



Patch to


org.apache.avalon.assembly.engine.impl.DefaultTypeRepository


to enable verification of presence of lifecycle extension interface(s) declared within the


extension


descriptor.



Vinay:

Can you re-send the patch as an attachement ?

Steve.



Regards,
Vinay




=====================================================


64a65




import




org.apache.avalon.meta.info.ExtensionDescriptor;
194c195
<         }
---




}




198c199
< "Unexpected error while attempting


to


build a type from the clas
sname: "
---




"Unexpected error while attempting


to






build a type from the clas
sname: "
378a380,381




//verify existence of lifecyle extension




classes




Class[]




lifecycleExtensions=getExtensionClasses(type);
403c406
<                 list.add( getServiceClass(
services[i] ) );
---




list.add( getServiceClass( service


)






);
455a459,496




/**
* Return the set of lifecycle extension




classes provided by the given t
ype




* @param type the component type
* @return an array of classes represnting


the






lifecycle extension inter
faces provided by the type




*/
private Class[] getExtensionClasses( Type


type






)




{
ArrayList list = new ArrayList();
ExtensionDescriptor[] extensions =




type.getExtensions();




for( int i = 0; i <


extensions.length;






i++ )




{
ExtensionDescriptor


extension






= extensions[i];




list.add( getExtensionClass(




extension ) );




}
return (Class[]) list.toArray( new




Class[0] );




}

/**
* Returns the lifecycle extension class




provided by the type.




* @param extension the lifecycle extension




type




* @return the class implementing the




extension type




* @exception TypeRuntimeException if a




classloader error occurs




*/
private Class getExtensionClass(




ExtensionDescriptor extension ) throws
TypeRuntimeException




{
final String classname =




extension.getReference().getClassname()
;




try
{
return




m_classloader.loadClass( classname );




} catch( Throwable e )
{
final String error =
"Could not




load lifecycle extension clas
s of type: "



=== message truncated ===


__________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

------------------------------------------------------------------------

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


--


Stephen J. McConnell
mailto:[EMAIL PROTECTED]
http://www.osm.net

Sent via James running under Merlin as an NT service.
http://avalon.apache.org/sandbox/merlin




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



Reply via email to