@Deprecated // use load(File, ExternalConfiguration) public AppModule load(final File jarFile) throws OpenEJBException { return load(jarFile, null); }
public AppInfo configureApplication(final File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); try { final AppModule appModule = deploymentLoader.load(jarFile); final AppInfo appInfo = configureApplication(appModule); // TODO This is temporary -- we need to do this in AppInfoBuilder appInfo.paths.add(appInfo.path); appInfo.paths.add(jarFile.getAbsolutePath()); return appInfo; } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } }
public AppInfo configureApplication(File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); AppInfo appInfo; try { AppModule appModule = deploymentLoader.load(jarFile); appInfo = configureApplication(appModule); } catch (ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } return appInfo; }
final String module = (String) obj; final File file = new File(module); final AppModule appModule = deploymentLoader.load(file); validator.validate(appModule);
String module = (String) obj; File file = new File(module); AppModule appModule = deploymentLoader.load(file); validator.validate(appModule);
final String module = (String) obj; final File file = new File(module); final AppModule appModule = deploymentLoader.load(file, null); validator.validate(appModule);
public AppInfo configureApplication(final File jarFile) throws OpenEJBException { logger.debug("Beginning load: " + jarFile.getAbsolutePath()); try { final AppModule appModule = deploymentLoader.load(jarFile, null); final AppInfo appInfo = configureApplication(appModule); // we need the finder for web scanning so push it to what sees TomcatWebAppBuilder, ie the info tree // this is clean up in Assembler for safety and TomcatWebAppBuilder when used if (!appModule.getWebModules().isEmpty()) { for (final WebAppInfo info : appInfo.webApps) { for (final EjbModule ejbModule : appModule.getEjbModules()) { if (ejbModule.getModuleId().equals(info.moduleId) && ejbModule.getFinder() != null) { appInfo.properties.put(info, ejbModule); } } } } // TODO This is temporary -- we need to do this in AppInfoBuilder appInfo.paths.add(appInfo.path); appInfo.paths.add(jarFile.getAbsolutePath()); return appInfo; } catch (final ValidationFailedException e) { logger.warning("configureApplication.loadFailed", jarFile.getAbsolutePath(), e.getMessage()); // DO not include the stacktrace in the message throw e; } catch (final OpenEJBException e) { // DO NOT REMOVE THE EXCEPTION FROM THIS LOG MESSAGE // removing this message causes NO messages to be printed when embedded logger.warning("configureApplication.loadFailed", e, jarFile.getAbsolutePath(), e.getMessage()); throw e; } }
try { File file = new File(location); appModule = deploymentLoader.load(file);
file = file.getCanonicalFile().getAbsoluteFile(); AppModule appModule = deploymentLoader.load(file);
try { file = file.getCanonicalFile().getAbsoluteFile(); final AppModule appModule = deploymentLoader.load(file, null);
try { file = file.getCanonicalFile().getAbsoluteFile(); AppModule appModule = deploymentLoader.load(file);
final AppModule module = deploymentLoader.load(jarFile, null);
final AppModule module = deploymentLoader.load(jarFile);
appModule = deploymentLoader.load(file);
AppModule module = deploymentLoader.load(jarFile);
appModule = deploymentLoader.load(file, null);
public AppModule load(final File jarFile, final ExternalConfiguration config) throws OpenEJBException { // verify we have a valid file final String jarPath; try { jarPath = jarFile.getCanonicalPath(); } catch (final IOException e) { throw new OpenEJBException("Invalid application file path " + jarFile, e); } final URL baseUrl = getFileUrl(jarFile); // create a class loader to use for detection of module type // do not use this class loader for any other purposes... it is // non-temp class loader and usage will mess up JPA ClassLoader doNotUseClassLoader = null;// = ClassLoaderUtil.createClassLoader(jarPath, new URL[]{baseUrl}, OpenEJB.class.getClassLoader()); try { // determine the module type final Class<? extends DeploymentModule> moduleClass; try { doNotUseClassLoader = ClassLoaderUtil.createClassLoader(jarPath, new URL[]{baseUrl}, getOpenEJBClassLoader()); moduleClass = discoverModuleType(baseUrl, ClassLoaderUtil.createTempClassLoader(doNotUseClassLoader), true); } catch (final Exception e) { throw new UnknownModuleTypeException("Unable to determine module type for jar: " + baseUrl.toExternalForm(), e); } if (ResourcesModule.class.equals(moduleClass)) { final AppModule appModule = new AppModule(null, jarPath); final ResourcesModule module = new ResourcesModule();