[jboss-dev-forums] [Design of POJO Server] - xml persistent format for attachments

emuckenhuber do-not-reply at jboss.com
Tue Nov 11 10:49:37 EST 2008


I created some simple tests trying to persists some metadata as xml with JAXB,
using ManagedConnectionFactoryDeploymentGroup, ServiceDeployment/ServiceMetaData and AbstractKernelDeployment/AbstractBeanMetaData

Baiscally for ManagedConnectionFactoryDeploymentGroup the problem is that the @XmlAdapter for the mbean just implements the unmarshal part.
So there is only ServiceMetaDataParser and nothing equivalent for the marshalling part. So the mbean would get lost :)

Similar for ServiceDeployment. We could maybe reuse the org.w3c.dom.Element information, although it would need to get updated  with the information of the changed ManagedComponent.
So not sure if updating the element makes more sense than writing a counterpart of the parsing.

JAXB also does not like the annotated BeanMetaData for marshalling. 
This ends up in a exception like this:


  | com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 45 counts of IllegalAnnotationExceptions
  | org.jboss.kernel.plugins.deployment.AbstractKernelDeployment#beanFactories has mutually exclusive annotations @javax.xml.bind.annotation.XmlElements and @javax.xml.bind.annotation.XmlAnyElement
  | ...
  | at org.jboss.kernel.plugins.deployment.AbstractKernelDeployment
  |     @XmlValue is not allowed on a class that derives another class.
  | ...
  | 

Although i haven't really looked into that in more detail yet :)

So maybe we need different xml AttachmentSerializer for each metadata,
as the deployment descriptors are also parsed differently in the first place?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4188494#4188494

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4188494



More information about the jboss-dev-forums mailing list