* Attempts to resolve the given URI to be associated with a TagLibrary
* otherwise null is returned to indicate no tag library could be found
* so that the namespace URI should be treated as just vanilla XML.
*/
public TagLibrary resolveTagLibrary(String uri) {
DiscoverClasses discovery = getDiscoverClasses();
String name = uri;
if ( uri.startsWith( "jelly:" ) ) {
name = "jelly." + uri.substring(6);
}
log.info( "Looking up service name: " + name );
/*
ClassLoaders loaders = ClassLoaders.getAppLoaders(TagLibrary.class, getClass(), false);
DiscoverClass discover = new DiscoverClass(loaders);
Class implClass = discover.find(TestInterface2.class);
TagLibrary answer = null;
try {
answer = (TagLibrary) DiscoverSingleton.find(TagLibrary.class, name);
}
catch (Exception e) {
log.error( "Could not load service: " + name );
}
return answer;
*/
ResourceClassIterator iter = discovery.findResourceClasses(name);
while (iter.hasNext()) {
ResourceClass resource = iter.nextResourceClass();
try {
Class typeClass = resource.loadClass();
if ( typeClass != null ) {