From do-not-reply at jboss.com Fri Jan 26 08:23:37 2007 Content-Type: multipart/mixed; boundary="===============8613100247368150509==" MIME-Version: 1.0 From: adrian at jboss.org To: jboss-dev-forums at lists.jboss.org Subject: [jboss-dev-forums] [Design of POJO Server] - Re: JAXBDeployer Date: Fri, 26 Jan 2007 08:23:37 -0500 Message-ID: <24926115.1169817817675.JavaMail.jboss@colo-br-02.atl.jboss.com> --===============8613100247368150509== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable "jason.greene(a)jboss.com" wrote : Or different schemas need to be associat= ed with the same object model. = | -Jason Yes, this is also broken as well. :-) The namspace is associated with the package level annotation rather the root element. This is a basic reusability issue. e.g. It should be: | public class AbstractEJBModel | { | @XMLElement(name=3D"enterpriseBeans") | public void setEJBs(List ejbs); | } | = | @XmlRootElement(namespace=3D"EJB21Namespace") | public class Ejb21Model extends AbstractEJBModel | { | } | = | @XmlRootElement(namespace=3D"EJB30Namespace") | public class Ejb30Model extends AbstractEJBModel | { | } | = The ejbs property should be mapped to EJB21Namespace/EJB21Model or EJB30Nam= espace/EJB30Model depending on the model chosen (the namespace in the xml). I have this in my prototype of bindings for JBossXB annotations - the USE_PARENT_NAMESPACE. | /** | * SchemaProperty. | * = | * @author Adrian Brock | * @version $Revision: 1.1 $ | */ | @Documented | @Target(ElementType.METHOD) | @Retention(RetentionPolicy.RUNTIME) | public @interface SchemaProperty | { | /** Whether it is mandatory */ | boolean mandatory() default true; | = | /** The namespace, default empty */ | String namespace() default SchemaConstants.USE_PARENT_NAMESPACE; | = | /** The local name, default use the property name */ | String name() default SchemaConstants.USE_PROPERTY_NAME; | = | /** The implementation class */ | Class impl() default Object.class; | = | /** TODO remove this when groups work properly */ | boolean noInterceptor() default false; | = | /** TODO combine with mandatory */ | boolean ignore() default false; | } | = View the original post : http://www.jboss.com/index.html?module=3Dbb&op=3Dv= iewtopic&p=3D4006802#4006802 Reply to the post : http://www.jboss.com/index.html?module=3Dbb&op=3Dpostin= g&mode=3Dreply&p=3D4006802 --===============8613100247368150509==--