Refine search
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextJAXBUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<>(); JAXBContextCache.addPackage(tmp, ContextUtils.WSA_OBJECT_FACTORY.getClass().getPackage().getName(), ContextUtils.WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
public static CachedContextAndSchemas getCachedContextAndSchemas(Class<?> cls) throws JAXBException { Set<Class<?>> classes = new HashSet<Class<?>>(); classes.add(cls); scanPackages(classes); return JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false); }
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { return new CachedContextAndSchemas(context, cachedContextAndSchemasInternal.getClasses(), cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
private synchronized JAXBContext getJAXBContext() { if (jaxbContext == null) { try { jaxbContext = JAXBContextCache.getCachedContextAndSchemas(ObjectFactory.class).getContext(); } catch (JAXBException e) { throw new RuntimeException(e); } } return jaxbContext; } private synchronized ServiceImpl getService() {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { cachedContextAndSchemasInternal = null; } else { return new CachedContextAndSchemas(cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
public static CachedContextAndSchemas getCachedContextAndSchemas(Class<?> ... cls) throws JAXBException { Set<Class<?>> classes = new HashSet<>(); for (Class<?> c : cls) { classes.add(c); } scanPackages(classes); return JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false); }
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextJAXBUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<>(); JAXBContextCache.addPackage(tmp, ContextUtils.WSA_OBJECT_FACTORY.getClass().getPackage().getName(), ContextUtils.WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { cachedContextAndSchemasInternal = null; } else { return new CachedContextAndSchemas(cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
public static CachedContextAndSchemas getCachedContextAndSchemas(Class<?> cls) throws JAXBException { Set<Class<?>> classes = new HashSet<Class<?>>(); classes.add(cls); scanPackages(classes); return JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false); }
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<Class<?>>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<Class<?>>(); JAXBContextCache.addPackage(tmp, WSA_OBJECT_FACTORY.getClass().getPackage().getName(), WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }
private static synchronized JAXBContext createContextForEPR() throws JAXBException { Reference<JAXBContext> rctx = ADDRESSING_CONTEXT.get(); JAXBContext ctx = rctx.get(); if (ctx == null) { ctx = JAXBContextCache.getCachedContextAndSchemas(ADDRESSING_CLASSES, null, null, null, true).getContext(); ADDRESSING_CONTEXT.set(new SoftReference<JAXBContext>(ctx)); } return ctx; } private static JAXBContext getJAXBContextForEPR() throws JAXBException {
for (Class<?> clz : classes) { if (clz.getName().endsWith("ObjectFactory") && checkObjectFactoryNamespaces(clz)) { return new CachedContextAndSchemas(context, cachedContextAndSchemasInternal.getClasses(), cachedContextAndSchemasInternal); context = createContext(classes, map, typeRefs); } catch (JAXBException ex) { boolean added = addJaxbObjectFactory(ex, classes); if (added) { try { return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
public static CachedContextAndSchemas getCachedContextAndSchemas(Class<?> ... cls) throws JAXBException { Set<Class<?>> classes = new HashSet<>(); for (Class<?> c : cls) { classes.add(c); } scanPackages(classes); return JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false); }
private static synchronized JAXBContext getContext() throws JAXBException { if (context == null || classes == null) { Set<Class<?>> c2 = new HashSet<Class<?>>(); JAXBContextCache.addPackage(c2, PackageUtils.getPackageName(TLSClientParametersType.class), TLSClientParametersConfig.class.getClassLoader()); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(c2, null, null, null, false); classes = ccs.getClasses(); context = ccs.getContext(); } return context; }
/** * Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated * types. * * @return a JAXBContext */ public static JAXBContext getJAXBContext() throws JAXBException { synchronized (ContextUtils.class) { if (jaxbContext == null || jaxbContextClasses == null) { Set<Class<?>> tmp = new HashSet<Class<?>>(); JAXBContextCache.addPackage(tmp, WSA_OBJECT_FACTORY.getClass().getPackage().getName(), WSA_OBJECT_FACTORY.getClass().getClassLoader()); JAXBContextCache.scanPackages(tmp); CachedContextAndSchemas ccs = JAXBContextCache.getCachedContextAndSchemas(tmp, null, null, null, false); jaxbContextClasses = ccs.getClasses(); jaxbContext = ccs.getContext(); } } return jaxbContext; }