I added a test for populating the same ApplicationMetaData instance from
ejb-jar.xml and jboss.xml. The implementation is simplified just to
demonstrate how it works.
It can be downloaded from http://jboss.org/developers/projects/jbossxb
> -----Original Message-----
> From: Scott M Stark
> Sent: Friday, January 30, 2004 12:26 AM
> To: The Core
> Subject: RE: jbossxb tutorial
>
>
> > > ejb-jar.xml/jboss.xml -> org.jboss.metadata.ApplicationMetaData
> > > standardjboss.xml/jboss.xml ->
> > > org.jboss.metadata.ConfigurationMetaData
> >
> > This can be done right now. There will be two
> ObjectModelFactories: one for ejb-jar schema, the other one
> for > jboss schema.
> > Then you
> > - create an instance of ApplicationMetaData appMD;
> > - unmarshal ejb-jar.xml into appMD:
> > unmarshaller.unmarshal(ejbJarStream, ejbJarFactory, appMD);
> > - unmarshal jboss.xml into appMD:
> unmarshaller.unmarshal(jbossStream,
> > jbossFactory, appMD);
> >
> > At the end you have appMD populated with content from both files.
> Right, so put some code out in the jbossxb tutorial section
> for these two ObjectModelFactorys, I hate Snoopy.
>
> > > What we at least need is a recepie for transforming an
> > > XmlLoadable.importXml(Element) into an ObjectModelFactory
> + JavaBean
> > > accessors for the properties being set within importXml
> to be able
> > > to externalize this processing.
> >
> > The framework is based on parsing events. And at the moment
> is based
> > on SAX parser that parses the whole XML > file, not a part
> of it. To support XmlLoadable, I could add some DOM parser
> that will parse any given Element emitting events like a SAX
> parser. That should not be hard to do.
> >
> > I would imagine it could look like:
> >
> > importXml(Element element)
> > {
> > ObjectModelFactory factory = getMyObjectModelFactory();
> > Unmarshaller unmarshaller = getUnmarshaller();
> > unmarshaller.unmarshal(element, factory, this); }
> >
> > Can we review the whole metadata stuff? I would also like
> to add CMP
> > metadata to the EntityMetaData and
> > Relation*** classes and get rid of
> org.jboss.ejb.plugins.cmp.metadata
> > package. That was my problem with metadata and why I started it all.
>
> I don't want to support the importXml(Element) callouts
> anymore. Anytime this is seen it is a punt of the form "I
> don't know anything about this content, you do something with
> it". This should be transformed into a seperate content model
> with its own namespace/schema and this is where we need that
> ObjectModelFactory delegation model mentioned on the dev list.
>
> We do need to review all of the metadata for many reasons,
> legacy cleanup, jsr88 support, j2ee1.4 changes, etc. Let's
> move this discussion to the dev list.
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development