private void readEjbJar(EjbModule ejbModule, AppModule appModule) throws OpenEJBException { if (ejbModule.getEjbJar() != null) return; Object data = ejbModule.getAltDDs().get("ejb-jar.xml"); if (data instanceof EjbJar) { ejbModule.setEjbJar((EjbJar) data); } else if (data instanceof URL) { URL url = (URL) data; EjbJar ejbJar = readEjbJar(url); ejbModule.setEjbJar(ejbJar); } else { DeploymentLoader.logger.debug("No ejb-jar.xml found assuming annotated beans present: " + appModule.getJarLocation() + ", module: " + ejbModule.getModuleId()); ejbModule.setEjbJar(new EjbJar()); } }
final Object result = m.invoke(isStatic ? null : instance); if (EjbJar.class.isInstance(result)) { ejbModule.setEjbJar(EjbJar.class.cast(result)); } else if (Persistence.class.isInstance(result)) { final Persistence persistence = Persistence.class.cast(result);
public void readEjbJar(final EjbModule ejbModule, final AppModule appModule) throws OpenEJBException { if (ejbModule.getEjbJar() != null) { return; } final Source data = getSource(ejbModule.getAltDDs().get("ejb-jar.xml")); if (data != null) { try { final EjbJar ejbJar = readEjbJar(data.get()); ejbModule.setEjbJar(ejbJar); } catch (final IOException e) { throw new OpenEJBException(e); } } else { DeploymentLoader.logger.debug("No ejb-jar.xml found assuming annotated beans present: " + appModule.getJarLocation() + ", module: " + ejbModule.getModuleId()); ejbModule.setEjbJar(new EjbJar()); } }
public void readEjbJar(final EjbModule ejbModule, final AppModule appModule) throws OpenEJBException { if (ejbModule.getEjbJar() != null) { return; } final Source data = getSource(ejbModule.getAltDDs().get("ejb-jar.xml")); if (data != null) { try { final EjbJar ejbJar = readEjbJar(data.get()); ejbModule.setEjbJar(ejbJar); } catch (final IOException e) { throw new OpenEJBException(e); } } else { DeploymentLoader.logger.debug("No ejb-jar.xml found assuming annotated beans present: " + appModule.getJarLocation() + ", module: " + ejbModule.getModuleId()); ejbModule.setEjbJar(new EjbJar()); } }
/** * If the web.xml is metadata-complete and there is no ejb-jar.xml * then per specification we use the web.xml metadata-complete setting * to imply the same for EJBs. * * @param webModule WebModule * @param ejbModule EjbModule */ private static void fillEjbJar(final WebModule webModule, final EjbModule ejbModule) { final Object o = webModule.getAltDDs().get("ejb-jar.xml"); if (o != null) { return; } if (ejbModule.getEjbJar() != null) { return; } final EjbJar ejbJar = new EjbJar(); final WebApp webApp = webModule.getWebApp(); ejbJar.setMetadataComplete(webApp.isMetadataComplete()); ejbModule.setEjbJar(ejbJar); }
/** * If the web.xml is metadata-complete and there is no ejb-jar.xml * then per specification we use the web.xml metadata-complete setting * to imply the same for EJBs. * * @param webModule WebModule * @param ejbModule EjbModule */ private static void fillEjbJar(final WebModule webModule, final EjbModule ejbModule) { final Object o = webModule.getAltDDs().get("ejb-jar.xml"); if (o != null) { return; } if (ejbModule.getEjbJar() != null) { return; } final EjbJar ejbJar = new EjbJar(); final WebApp webApp = webModule.getWebApp(); ejbJar.setMetadataComplete(webApp.isMetadataComplete()); ejbModule.setEjbJar(ejbJar); }
ejbModule.setBeans(complete); ejbModule.setFinder(finder); ejbModule.setEjbJar(new EmptyEjbJar());
ejbModule.setBeans(complete); ejbModule.setFinder(finder); ejbModule.setEjbJar(new EmptyEjbJar());
earCdiModule.setEjbJar(ejbJar); // EmptyEjbJar would prevent to add scanned EJBs but this is *here* an aggregator so we need to be able to do so appModule.getEjbModules().add(earCdiModule);