*/
public class JpaJaxbUtil {
public static <T>String marshal(Class<T> type, Object object) throws JAXBException {
JAXBContext ctx2 = JAXBContextFactory.newInstance(type);
Marshaller marshaller = ctx2.createMarshaller();
marshaller.setProperty("jaxb.formatted.output", true);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
marshaller.marshal(object, baos);