Set<Class<?>> handlerClasses = new HashSet<Class<?>>();
do {
// get unprocessed handler classes
handlerClasses.clear();
for (ServiceRef serviceRef : consumer.getServiceRef()) {
HandlerChains chains = serviceRef.getAllHandlers();
if (chains == null) continue;
for (org.apache.openejb.jee.HandlerChain handlerChain : chains.getHandlerChain()) {
for (Handler handler : handlerChain.getHandler()) {
if (handler.getHandlerClass() != null) {
try {
Class clazz = classLoader.loadClass(handler.getHandlerClass());
handlerClasses.add(clazz);