/** * Remove registered schema */ public void destroy() { if (isRegisterWithJBossXB()) { // namespace should exist, since we got past create JBossXBHelper.removeClassBinding(namespace); } }
/** * Check if we need to register schema to jbossxb. */ public void create() { if (isRegisterWithJBossXB()) { namespace = JBossXBHelper.findNamespace(getOutput()); if (namespace == null || JBossXmlConstants.DEFAULT.equals(namespace)) throw new IllegalArgumentException( "RegisterWithJBossXB is enabled, but cannot find namespace on class or package: " + getOutput() + ", perhaps missing @JBossXmlSchema or using default namespace attribute." ); JBossXBHelper.addClassBinding(namespace, getOutput()); } }