Here you can find the source of getContext()
private static JAXBContext getContext() throws JAXBException
//package com.java2s; //License from project: Educational Community License import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; public class Main { private static JAXBContext context; 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"); }/*w ww .ja v a 2 s . c o m*/ return context; } }