*/
private DependencyDescriptor buildDependency( final String classname,
final Configuration dependency )
throws ConfigurationException
{
final ServiceDescriptor service = buildService( dependency.getChild( "service" ) );
String role = dependency.getChild( "role" ).getValue( null );
//default to name of service if role unspecified
if( null == role )
{
role = service.getName();
}
else
{
//If role is specified and it is the same as
//service name then warn that it is redundent.
if( role.equals( service.getName() ) )
{
final String message = REZ.getString( "redundent-role", classname, role );
getLogger().warn( message );
}
}