private void writeGenratedCmpMappings(AppModule appModule) { try { File tempFile = File.createTempFile("openejb-cmp-generated-orm-", ".xml"); FileOutputStream fout = new FileOutputStream(tempFile); BufferedOutputStream out = new BufferedOutputStream(fout); try { JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings(), out); } catch (JAXBException e) { } finally{ out.close(); } } catch (IOException e) { } }
public AppModule deploy(AppModule appModule) { for (EjbModule ejbModule : appModule.getEjbModules()) { convertModule(ejbModule, appModule.getCmpMappings()); } return appModule; }
public AppModule deploy(final AppModule appModule) { for (final EjbModule ejbModule : appModule.getEjbModules()) { convertModule(ejbModule, appModule.getCmpMappings()); } return appModule; }
public AppModule deploy(final AppModule appModule) { for (final EjbModule ejbModule : appModule.getEjbModules()) { convertModule(ejbModule, appModule.getCmpMappings()); } return appModule; }
@Override public final AppModule deploy(final AppModule appModule) { for (final EjbModule ejbModule : appModule.getEjbModules()) { final Object altDD = getOpenejbJarType(ejbModule); if (OpenejbJarType.class.isInstance(altDD)) { final OpenejbJarType openejbJarType = OpenejbJarType.class.cast(altDD); convertEjbRefs(ejbModule.getEjbJar(), ejbModule.getOpenejbJar(), openejbJarType); convertMdbConfigs(ejbModule.getEjbJar(), openejbJarType); mergeEntityMappings(ejbModule.getModuleId(), appModule.getCmpMappings(), ejbModule.getOpenejbJar(), openejbJarType); } } return appModule; }
@Override public final AppModule deploy(final AppModule appModule) { for (final EjbModule ejbModule : appModule.getEjbModules()) { final Object altDD = getOpenejbJarType(ejbModule); if (OpenejbJarType.class.isInstance(altDD)) { final OpenejbJarType openejbJarType = OpenejbJarType.class.cast(altDD); convertEjbRefs(ejbModule.getEjbJar(), ejbModule.getOpenejbJar(), openejbJarType); convertMdbConfigs(ejbModule.getEjbJar(), openejbJarType); mergeEntityMappings(ejbModule.getModuleId(), appModule.getCmpMappings(), ejbModule.getOpenejbJar(), openejbJarType); } } return appModule; }
public AppModule deploy(AppModule appModule) { for (EjbModule ejbModule : appModule.getEjbModules()) { Object altDD = getOpenejbJarType(ejbModule); if (altDD instanceof OpenejbJarType) { convertEjbRefs(ejbModule.getEjbJar(), ejbModule.getOpenejbJar(), (OpenejbJarType) altDD); convertMdbConfigs(ejbModule.getEjbJar(), (OpenejbJarType) altDD); mergeEntityMappings(ejbModule.getModuleId(), appModule.getCmpMappings(), ejbModule.getOpenejbJar(), (OpenejbJarType) altDD); } } return appModule; }
final OutputStream out = IO.write(tempFile); try { JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings(), out); logger.info("Dumping Generated CMP mappings.xml to: " + tempFile.getAbsolutePath()); } catch (final JAXBException e) {
final OutputStream out = IO.write(tempFile); try { JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings(), out); logger.info("Dumping Generated CMP mappings.xml to: " + tempFile.getAbsolutePath()); } catch (final JAXBException e) {
if (appModule.getCmpMappings() != null) { try { String cmpMappingsXml = JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings());
public AppModule deploy(AppModule appModule) { SunApplication sunApplication = getSunApplication(appModule); if (sunApplication != null) { for (Web web : sunApplication.getWeb()) { String webUri = web.getWebUri(); for (WebModule webModule : appModule.getWebModules()) { if (webUri.equals(webModule.getModuleId())) { webModule.setContextRoot(web.getContextRoot()); break; } } } } for (EjbModule ejbModule : appModule.getEjbModules()) { convertModule(ejbModule, appModule.getCmpMappings()); } for (ClientModule clientModule : appModule.getClientModules()) { convertModule(clientModule); } for (WebModule webModule : appModule.getWebModules()) { convertModule(webModule); } return appModule; }
EntityMappings cmpMappings = appModule.getCmpMappings(); if (cmpMappings == null) { cmpMappings = new EntityMappings(); for (final Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes() != null && entity.getAttributes().isEmpty()) { entity.setAttributes(null);
EntityMappings cmpMappings = appModule.getCmpMappings(); if (cmpMappings == null) { cmpMappings = new EntityMappings(); for (Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes().isEmpty()){ entity.setAttributes(null);
if (appModule.getCmpMappings() != null) { try { appInfo.cmpMappingsXml = JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings()); } catch (final JAXBException e) { throw new OpenEJBException("Unable to marshal cmp entity mappings", e);
if (appModule.getCmpMappings() != null) { try { appInfo.cmpMappingsXml = JpaJaxbUtil.marshal(EntityMappings.class, appModule.getCmpMappings()); } catch (final JAXBException e) { throw new OpenEJBException("Unable to marshal cmp entity mappings", e);
convertModule(ejbModule, appModule.getCmpMappings());
EntityMappings cmpMappings = appModule.getCmpMappings(); if (cmpMappings == null) { cmpMappings = new EntityMappings(); for (final Entity entity : appModule.getCmpMappings().getEntity()) { if (entity.getAttributes() != null && entity.getAttributes().isEmpty()) { entity.setAttributes(null);
public AppModule deploy(AppModule appModule) throws OpenEJBException { boolean output = SystemInstance.get().getOptions().get(OUTPUT_DESCRIPTORS, false); if (output && appModule.getCmpMappings() != null){ writeGenratedCmpMappings(appModule); } for (EjbModule ejbModule : appModule.getEjbModules()) { Options options = new Options(ejbModule.getOpenejbJar().getProperties(), SystemInstance.get().getOptions()); output = options.get(OUTPUT_DESCRIPTORS, false); if (output){ if (ejbModule.getEjbJar() != null) { writeEjbJar(ejbModule); } if (ejbModule.getOpenejbJar() != null) { writeOpenejbJar(ejbModule); } writeGeronimoOpenejb(ejbModule); } } return appModule; }
public AppModule deploy(final AppModule appModule) throws OpenEJBException { boolean output = SystemInstance.get().getOptions().get(OUTPUT_DESCRIPTORS, false); if (output && appModule.getCmpMappings() != null) { writeGenratedCmpMappings(appModule); } for (final EjbModule ejbModule : appModule.getEjbModules()) { final Options options = new Options(ejbModule.getOpenejbJar().getProperties(), SystemInstance.get().getOptions()); final ValidationContext context = ejbModule.getValidation(); // output descriptors by default if there are validation errors final boolean invalid = context.hasErrors() || context.hasFailures(); output = options.get(OUTPUT_DESCRIPTORS, invalid); if (output) { if (ejbModule.getEjbJar() != null) { writeEjbJar(ejbModule); } if (ejbModule.getOpenejbJar() != null) { writeOpenejbJar(ejbModule); } writeGeronimoOpenejb(ejbModule); } } for (final ConnectorModule connectorModule : appModule.getConnectorModules()) { writeRaXml(connectorModule); } return appModule; }
public AppModule deploy(final AppModule appModule) throws OpenEJBException { boolean output = SystemInstance.get().getOptions().get(OUTPUT_DESCRIPTORS, false); if (output && appModule.getCmpMappings() != null) { writeGenratedCmpMappings(appModule); } for (final EjbModule ejbModule : appModule.getEjbModules()) { final Options options = new Options(ejbModule.getOpenejbJar().getProperties(), SystemInstance.get().getOptions()); final ValidationContext context = ejbModule.getValidation(); // output descriptors by default if there are validation errors final boolean invalid = context.hasErrors() || context.hasFailures(); output = options.get(OUTPUT_DESCRIPTORS, invalid); if (output) { if (ejbModule.getEjbJar() != null) { writeEjbJar(ejbModule); } if (ejbModule.getOpenejbJar() != null) { writeOpenejbJar(ejbModule); } writeGeronimoOpenejb(ejbModule); } } for (final ConnectorModule connectorModule : appModule.getConnectorModules()) { writeRaXml(connectorModule); } return appModule; }