private SunApplicationClient getSunApplicationClient(ClientModule clientModule) { Object altDD = clientModule.getAltDDs().get("sun-application-client.xml"); if (altDD instanceof String) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, new ByteArrayInputStream(((String)altDD).getBytes())); } catch (Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof URL) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, ((URL)altDD).openStream()); } catch (Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof SunApplicationClient) { return (SunApplicationClient) altDD; } return null; }
private SunApplicationClient getSunApplicationClient(final ClientModule clientModule) { Object altDD = clientModule.getAltDDs().get("sun-application-client.xml"); if (altDD instanceof String) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, new ByteArrayInputStream(((String) altDD).getBytes())); } catch (final Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof URL) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, IO.read((URL) altDD)); } catch (final Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof SunApplicationClient) { return (SunApplicationClient) altDD; } return null; }
private SunApplicationClient getSunApplicationClient(final ClientModule clientModule) { Object altDD = clientModule.getAltDDs().get("sun-application-client.xml"); if (altDD instanceof String) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, new ByteArrayInputStream(((String) altDD).getBytes())); } catch (final Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof URL) { try { altDD = JaxbSun.unmarshal(SunApplicationClient.class, IO.read((URL) altDD)); } catch (final Exception e) { // todo warn about not being able to parse sun descriptor } } if (altDD instanceof SunApplicationClient) { return (SunApplicationClient) altDD; } return null; }
clientModule.getAltDDs().putAll(descriptors); clientModule.getWatchedResources().add(absolutePath); if (clientXmlUrl != null && "file".equals(clientXmlUrl.getProtocol())) {
clientModule.getAltDDs().putAll(descriptors); if (absolutePath != null) { clientModule.getWatchedResources().add(absolutePath);
clientModule.getAltDDs().putAll(descriptors); if (absolutePath != null) { clientModule.getWatchedResources().add(absolutePath);
private void readAppClient(final ClientModule clientModule, final AppModule appModule) throws OpenEJBException { if (clientModule.getApplicationClient() != null) { return; } final Object data = clientModule.getAltDDs().get("application-client.xml"); if (data instanceof ApplicationClient) { clientModule.setApplicationClient((ApplicationClient) data); } else if (data instanceof URL) { final URL url = (URL) data; final ApplicationClient applicationClient = readApplicationClient(url); clientModule.setApplicationClient(applicationClient); } else { if (!clientModule.isEjbModuleGenerated()) { DeploymentLoader.logger.debug("No application-client.xml found assuming annotations present: " + appModule.getJarLocation() + ", module: " + clientModule.getModuleId()); clientModule.setApplicationClient(new ApplicationClient()); } } }
private void readAppClient(ClientModule clientModule, AppModule appModule) throws OpenEJBException { if (clientModule.getApplicationClient() != null) return; Object data = clientModule.getAltDDs().get("application-client.xml"); if (data instanceof ApplicationClient) { clientModule.setApplicationClient((ApplicationClient) data); } else if (data instanceof URL) { URL url = (URL) data; ApplicationClient applicationClient = readApplicationClient(url); clientModule.setApplicationClient(applicationClient); } else { if (!clientModule.isEjbModuleGenerated()) { DeploymentLoader.logger.debug("No application-client.xml found assuming annotations present: " + appModule.getJarLocation() + ", module: " + clientModule.getModuleId()); clientModule.setApplicationClient(new ApplicationClient()); } } }
descriptors = DeploymentLoader.altDDSources(descriptors, true); ejbModule.getAltDDs().putAll(descriptors); ejbModule.getClientModule().getAltDDs().putAll(descriptors); } catch (IOException e) { logger.error("Unable to determine descriptors in jar.", e);
private void readAppClient(final ClientModule clientModule, final AppModule appModule) throws OpenEJBException { if (clientModule.getApplicationClient() != null) { return; } final Object data = clientModule.getAltDDs().get("application-client.xml"); if (data instanceof ApplicationClient) { clientModule.setApplicationClient((ApplicationClient) data); } else if (data instanceof URL) { final URL url = (URL) data; final ApplicationClient applicationClient = readApplicationClient(url); clientModule.setApplicationClient(applicationClient); } else { if (!clientModule.isEjbModuleGenerated()) { DeploymentLoader.logger.debug("No application-client.xml found assuming annotations present: " + appModule.getJarLocation() + ", module: " + clientModule.getModuleId()); clientModule.setApplicationClient(new ApplicationClient()); } } }
if (clientModule.getFinder() == null && clientModule.getAltDDs().containsKey("application-client.xml"))
if (clientModule.getFinder() == null && clientModule.getAltDDs().containsKey("application-client.xml")) { if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) { return clientModule;
if (clientModule.getAltDDs().containsKey("application-client.xml")) { getValidationContext().fail("client", "client.missingMainClass", className); } else {
if (clientModule.getAltDDs().containsKey("application-client.xml")) { getValidationContext().fail("client", "client.missingMainClass", className); } else {
if (clientModule.getFinder() == null && clientModule.getAltDDs().containsKey("application-client.xml")) { if (clientModule.getApplicationClient() != null && clientModule.getApplicationClient().isMetadataComplete()) { return clientModule;
if (clientModule.getAltDDs().containsKey("application-client.xml")) { getValidationContext().fail("client", "client.missingMainClass", className); } else {