All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.uddi.JAXBContextUtil Maven / Gradle / Ivy

There is a newer version: 3.3.10
Show newest version
package org.uddi;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.Map;

public class JAXBContextUtil {

	private static Logger log = Logger.getLogger(JAXBContextUtil.class);
	private static final Map JAXBContexts = new HashMap();

	public static JAXBContext getContext(String packageName) throws JAXBException {
		if (!JAXBContexts.containsKey(packageName)) {
			log.info("Creating JAXB Context for " + packageName);
			JAXBContexts.put(packageName, JAXBContext.newInstance(packageName));
		}
		return JAXBContexts.get(packageName);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy