-
1. Re: jca prototype broken again
adrian.brock Jul 10, 2007 4:59 PM (in response to adrian.brock)This has actually got a whole easier with the new support that I wrote for JAXB
annotation constructions of JBossXB schemas and Ales's BeanMetaData builder.
e.g. something like, this part of an mc deployment<deployment> <queue xmlns="urn:jboss-jms-2.0" name="MyQueue"/> </deployment>
can be parsed with@XmlSchema(namespace="urn:jboss-jms:2.0") @XmlType(name="queue") public QueueMetaData implements BeanMetaDataFactory{ @XmlAttribute public String name; List<BeanMetaData> getBeans() { Collections.singletonList( new BeanMetaDataBuilder(name, Queue.class.getName()). addProperty("queueName", name)); } }
Plus a piece of registration so it knows QueueMetaData exists as a potential "schema". -
2. Re: jca prototype broken again
kabirkhan Jul 12, 2007 10:35 AM (in response to adrian.brock)I've reproduced the NPE in the aop tests, and am working on a fix. I'll update the aop snapshot later today.
I'm not really groking the rest of what you are mentioning? -
3. Re: jca prototype broken again
adrian.brock Jul 12, 2007 11:11 AM (in response to adrian.brock)Look at aop-mc-int - org.jboss.aop.microcontainer.beans
This needs doing properly and deciding what is really supported.
These are only really used by the jca prototype at the moment.
I'd prefer it instead of doing<bean name="ConnectionManagerBinding" class="org.jboss.aop.microcontainer.beans.StackBinding"> <property name="pointcut">execution(* $instanceof{javax.resource.spi.ConnectionManager}->*(..))</property> <property name="manager"><inject bean="AspectManager"/></property> <property name="advices"> <list> <inject bean="TraceAspect" property="definition"/> <inject bean="ExceptionAspect" property="definition"/> <inject bean="SecurityAspect" property="definition"/> <inject bean="PoolAspect" property="definition"/> <inject bean="ListenerAspect" property="definition"/> </list> </property> </bean>
You could use the equivalent aop config in the -beans.xml
i.e. it would hit the aop schema in the xml,
use aop parser to create a BeanMetaDataFactory like the example I posted above
about creating a queue for jms.
The BeanMetaDataFactory would then internally generate the equivalent
BeanMetaData as the example I posted above.
e.g. psuedo code (I haven't looked up what the real aop config is or whether it even exists :-)<aop-stack xmlns="urn:jboss.aop:aop-mc-deployer"> <pointcut>...</pointcut> <aspect-list> <aspect>TraceAspect</aspect> <aspect>ExecutionAspect</aspect> etc. </aop-stack>
would generate the same BeanMetaData as the one above,
but without all the junk, e.g. knowing what the internal bean and property names are. -
4. Re: jca prototype broken again
kabirkhan Jul 12, 2007 11:42 AM (in response to adrian.brock)It is much clearer now, thanks
-
5. Re: jca prototype broken again
kabirkhan Jul 12, 2007 1:50 PM (in response to adrian.brock)I've updated the aop snapshot in the old repository, and will do so to the maven repository once I figure out what is going wrong with my current attempts