[jboss-user] [Microcontainer] - Re: Code example for a basic parsing deployer
do-not-reply at jboss.com
Wed Mar 26 08:58:59 EDT 2008
You don't need to write code for a parsing deployer if you use the annotations.
You need to do two things:
1) Configure the generic JBossXB deployer
| <bean name="ClassLoadingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
| <!-- This is what you expect the metadata to parsed to -->
| <!-- This says you want to parse any META-INF/jboss-classloading.xml -->
| <property name="name">jboss-classloading.xml</property>
| <!-- This is "optional" for the profile service - it builds the management information from annotations -->
| <property name="buildManagedObject">true</property>
2) But there is one extra step that JBossXB needs.
It needs to know that your schema name maps to that class.
Technically, this should be redundant, but the deployer doesn't do this for you. :-(
You either make it a factory setting in the SingletonSchemaBindingResolver
or you have to add some extra metadata to JBossXB,
e.g. see deployers/metadata-beans.xml in the appserver
I guess we could add an extra option to the SchemaResolverParser
| <propertry name="registerWithJBossXB">true</property>
which would take the schema name from the annotation on the class/package
and register the generated schema binding with JBossXB?
Which would remove the need for step (2)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138957#4138957
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138957
More information about the jboss-user