use of org.eclipse.persistence.internal.sessions.factories.ObjectPersistenceRuntimeXMLProject_11_1_1 in project eclipselink by eclipse-ee4j.
the class OXTestCase method write.
// Write out deployment XML
public void write(Project project, Writer writer) {
// Write out EclipseLink deployment XML
if (metadata == Metadata.XML_ECLIPSELINK) {
XMLProjectWriter.write(project, writer);
return;
}
// Write out TL deployment XML
XMLContext context = new XMLContext(new ObjectPersistenceRuntimeXMLProject_11_1_1());
context.getSession(project).getEventManager().addListener(new MissingDescriptorListener());
XMLMarshaller marshaller = context.createMarshaller();
marshaller.marshal(project, writer);
try {
writer.flush();
} catch (IOException exception) {
throw ValidationException.fileError(exception);
}
}
Aggregations