You look to be getting very confused. :-)
The first problem:
anonymous wrote :
| the AspectBeanMetaDataFactory replaces the AOPDeployment, which is obvious having
looked at the TestSchemaResolver. For AbstractKernelDeployment, all the associated
metadata classes are added. My guess is that this is because they are referenced somehow
by the AbstractKernelDeployment. If I have understood the previous posts correctly, the
AOPDeployment should be kept simple, i.e.:
|
No its because you are registering two schemas with the same namespace.
(two top level classes in the resolver).
You should register one schema for the top level class and annotate the classes
you want as @XmlRootElement.
The second problem
anonymous wrote :
| Does this look like the correct approach?
|
Looks like you don't understand how it works? :-)
The aspect element is an xml wildcard in the microcontainer schema.
If you want it native to your schema, you need to subclasses the setBeanFactories() and
change the annotations to say what is valid.
Illustrative example (trying to show how it works):
| @XmlElements
| ({
| @XmlElement(name="aspect", type=AspectFactoryMetaData.class), //
aspect in your namespace
| @XmlElement(name="bean" type=AbstractBeanMetaData.class), // bean in
your namespace
| @XmlElement(name="bean"
namespace="urn:jboss:bean-deplioyer:2.0", type=AbstractBeanMetaData.class), //
bean in the MC namespace
| // etc.
| })
| @XmlAnyElement // This accepts anything in a different namespace that implements
BeanMetaDataFactory
| public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
| {
| // No need for your own interface, just subclass and change annotations
| super.setBeanFactories(beanFactories);
| }
|
Your element is called {urn:jboss:aop-beans:1.0}aspects.
It can be used as such (as a wildcard) in the bean schema
(providing it is a root element in your schema.
In your schema you just list it explctly and then there's no need to qualify it
with a namespace, it's native.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131316#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...