@Test public void testClassAvailable() { final Resource resource = new Resource(); resource.setClassName("org.apache.openejb.config.ReadDescriptorsTest"); final Resources resources = new Resources(); resources.add(resource); final Resources checkedResources = ReadDescriptors.check(resources); final Resource res = checkedResources.getResource().get(0); Assert.assertNull(res.getProperties().getProperty("Lazy")); Assert.assertNull(res.getProperties().getProperty("UseAppClassLoader")); Assert.assertNull(res.getProperties().getProperty("InitializeAfterDeployment")); }
public static Resources check(final Resources resources) { final List<Resource> resourceList = resources.getResource(); for (final Resource resource : resourceList) { if (resource.getClassName() != null) { try { ParentClassLoaderFinder.Helper.get().loadClass(resource.getClassName()); continue; } catch (Exception e) { } final Boolean lazySpecified = Boolean.valueOf(resource.getProperties().getProperty("Lazy", "false")); resource.getProperties().setProperty("Lazy", "true"); resource.getProperties().setProperty("UseAppClassLoader", "true"); if (!lazySpecified) { resource.getProperties().setProperty("InitializeAfterDeployment", "true"); } } } return resources; }
ReadDescriptors implements DynamicDeployer { public static Resources check(final Resources resources) { final List<Resource> resourceList = resources.getResource(); for (final Resource resource : resourceList) { if (resource.getClassName() != null) { try { ParentClassLoaderFinder.Helper.get().loadClass(resource.getClassName()); continue; } catch (Exception e) { } final Boolean lazySpecified = Boolean.valueOf(resource.getProperties().getProperty("Lazy", "false")); resource.getProperties().setProperty("Lazy", "true"); resource.getProperties().setProperty("UseAppClassLoader", "true"); if (!lazySpecified) { resource.getProperties().setProperty("InitializeAfterDeployment", "true"); } } } return resources; } }
ReadDescriptors implements DynamicDeployer { public static Resources check(final Resources resources) { final List<Resource> resourceList = resources.getResource(); for (final Resource resource : resourceList) { if (resource.getClassName() != null) { try { ParentClassLoaderFinder.Helper.get().loadClass(resource.getClassName()); continue; } catch (Exception e) { } final Boolean lazySpecified = Boolean.valueOf(resource.getProperties().getProperty("Lazy", "false")); resource.getProperties().setProperty("Lazy", "true"); resource.getProperties().setProperty("UseAppClassLoader", "true"); if (!lazySpecified) { resource.getProperties().setProperty("InitializeAfterDeployment", "true"); } } } return resources; }  }
ReadDescriptors implements DynamicDeployer { public static Resources check(final Resources resources) { final List<Resource> resourceList = resources.getResource(); for (final Resource resource : resourceList) { if (resource.getClassName() != null) { try { ParentClassLoaderFinder.Helper.get().loadClass(resource.getClassName()); continue; } catch (Exception e) { } final Boolean lazySpecified = Boolean.valueOf(resource.getProperties().getProperty("Lazy", "false")); resource.getProperties().setProperty("Lazy", "true"); resource.getProperties().setProperty("UseAppClassLoader", "true"); if (!lazySpecified) { resource.getProperties().setProperty("InitializeAfterDeployment", "true"); } } } return resources; }  @SuppressWarnings({"unchecked"}) AppModule deploy(final AppModule appModule); static void readResourcesXml(final Module module); static Resources check(final Resources resources); void readEjbJar(final EjbModule ejbModule, final AppModule appModule); static void checkDuplicatedByBeansXml(final Beans beans, final Beans complete); static ApplicationClient readApplicationClient(final URL url); static EjbJar readEjbJar(final InputStream is); static Beans readBeans(final InputStream inputStream); static Webservices readWebservices(final URL url); static HandlerChains readHandlerChains(final URL url); static JavaWsdlMapping readJaxrpcMapping(final URL url); static Connector readConnector(final URL url); static WebApp readWebApp(final URL url); static TldTaglib readTldTaglib(final URL url); static FacesConfig readFacesConfig(final URL url); }
ReadDescriptors implements DynamicDeployer { public static Resources check(final Resources resources) { final List<Resource> resourceList = resources.getResource(); for (final Resource resource : resourceList) { if (resource.getClassName() != null) { try { ParentClassLoaderFinder.Helper.get().loadClass(resource.getClassName()); continue; } catch (Exception e) { } final Boolean lazySpecified = Boolean.valueOf(resource.getProperties().getProperty("Lazy", "false")); resource.getProperties().setProperty("Lazy", "true"); resource.getProperties().setProperty("UseAppClassLoader", "true"); if (!lazySpecified) { resource.getProperties().setProperty("InitializeAfterDeployment", "true"); } } } return resources; }  @SuppressWarnings({"unchecked"}) AppModule deploy(final AppModule appModule); static void readResourcesXml(final Module module); static Resources check(final Resources resources); void readEjbJar(final EjbModule ejbModule, final AppModule appModule); static void checkDuplicatedByBeansXml(final Beans beans, final Beans complete); static ApplicationClient readApplicationClient(final URL url); static EjbJar readEjbJar(final InputStream is); static Beans readBeans(final InputStream inputStream); static Webservices readWebservices(final URL url); static HandlerChains readHandlerChains(final URL url); static JavaWsdlMapping readJaxrpcMapping(final URL url); static Connector readConnector(final URL url); static WebApp readWebApp(final URL url); static TldTaglib readTldTaglib(final URL url); static FacesConfig readFacesConfig(final URL url); static final TldTaglib SKIP_TAGLIB; }