@SuppressWarnings("rawtypes")
	private Class getServiceInterface(Resource resource, ClassLoader classLoader) {
		try {
			if (!resource.isReadable())
				return null;

			AnnotationTypeFilter filter = new AnnotationTypeFilter(Remote.class);
			SimpleMetadataReaderFactory simpleMetadataReaderFactory = new SimpleMetadataReaderFactory(
					classLoader);
			MetadataReader metadataReader = simpleMetadataReaderFactory
					.getMetadataReader(resource);

			if (filter.match(metadataReader, simpleMetadataReaderFactory)) {
				String className = metadataReader.getClassMetadata()
						.getClassName();

				if (LOGGER.isDebugEnabled())
					LOGGER.debug("{} annotated with @Remote", className);

				return ClassUtils.forName(className, classLoader);
			}
		} catch (IOException e) {
			if (LOGGER.isErrorEnabled())
				LOGGER.error(e.toString());
		} catch (ClassNotFoundException e) {
			if (LOGGER.isErrorEnabled())
				LOGGER.error(e.toString());
		} catch (LinkageError e) {
			if (LOGGER.isErrorEnabled())
				LOGGER.error(e.toString());
		}
		return null;
	}