>From the new XML metadata framework point of view, yes, it is possible. 

I'll write a tutorial for this stuff when I am done with
org.jboss.test.deadlock test.

Shortly, how it would work right now. You need to provide Java classes
that represent XML elements and an object model factory that will build
an object model of XML content.
Currently, the framework can use ONE object model factory while parsing
an XML file. For the example you gave it is not acceptable.
It means either:
* one factory approach: we have one object model factory that is aware
of basic xmbean XML content, mypm namespace and xmlbean namespace and
one pass (parsing) is enough to build the object model. But once you
switched from mypm:data to anotherpm:data you need to update the factory
to support anotherpm:data content;
* many factories: we have namespace-specific object model factories (one
for basic xmbean content, one for mypm and one for xmlbean contents) but
since the framework can use only one factory during one pass we end up
parsing the same XML file as many times as many factories we have.

I think, it is possible to combine the two by introducing a dispatcher
that will delegate parsing to the corresponding object model factory
basing on the namespace.
This way we get the object model in one pass.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Scott M Stark
> Sent: Thursday, January 22, 2004 12:31 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] New xmbean descriptor schema
> 
> I'm thinking of a new version of the XMBean descriptor that 
> better allows for externalization of XMBeans. It provides the 
> same type of metadata view + the ability to specify how to 
> create the mbean resource with a non-default constructor. 
> This would allow for creation and registration of a XMBean 
> from its descriptor and is needed to externalize jmx 
> microkernel elements like the loader repository, and 
> bootstrap services.
> 
> One thing I would like to use the new xml metadata framework 
> for is the ability to tranform arbitrary xml fragments from 
> external schemas into objects that would be passed to the 
> persistence manager and xmbean resource ctors. For example, 
> the following doc has mypm:data namespace fragment and a 
> xmlbean:data fragment. Will the new xml metadata framework 
> handle this?
> 
> Any comments on such an extension to the current xmbean metadata?
> 
> <xmbean>
>    <mbeaninfo>
>    <bean>
>       <name>...</name>
>       <class>...</class>
>       <displayName>....</displayName>
>       <descriptors>
>         ...
>         <persistence-manager>
>            <mypm:data>
>              ... some external schema fragment for 
> configuring the pm ...
>            </mypm:data>
>         </persistence-manager>
>       </descriptors>
>    </bean>
> 
>    <constructors>
>      ...
>    </constructors>
>    <attributes>
>      ...
>    </attributes>
>    <operations>
>      ...
>    </operations>
>    <notifications>
>      ...
>    </notifications>
>    </mbeaninfo>
> 
>    <resource>
>       <class>...</class>
>       <constructor>
>          <args>
>             <arg type="...">
>             <xmlbean:data>
>              ... external xml fragment representing 
> serialized form of args ...
>             </xmlbean:data>
>             </arg>
>             ...
>          </args>
>       </constructor>
>       <object-name>jmx-object-name</object-name>
>    </resource>
> </xmbean>
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
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

Reply via email to