private Class<?> loadOpenEJBClass() throws Exception { final ClassPath classPath = SystemInstance.get().getClassPath(); final ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); final FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }
private Class<?> loadOpenEJBClass() throws Exception { final ClassPath classPath = SystemInstance.get().getClassPath(); final ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); final FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }
private Class<?> loadOpenEJBClass() throws Exception { ClassPath classPath = SystemInstance.get().getClassPath(); ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }