Here you can find the source of createMarshaller()
private static Marshaller createMarshaller() throws JAXBException
//package com.java2s; //License from project: Educational Community License import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; public class Main { private static JAXBContext context; private static Marshaller createMarshaller() throws JAXBException { return getContext().createMarshaller(); }/* ww w . j a v a 2 s .c o m*/ private static JAXBContext getContext() throws JAXBException { // although not thread-safe, the worst that happens is double instantiation if (context == null) { context = JAXBContext.newInstance("org.opentestsystem.rdw.common.model.trt"); } return context; } }