[Design of AOP on JBoss (Aspects/JBoss)] - Re: Using ClassInfo in AOP
by stale.pedersen@jboss.org
i started changing the pointcut matchers to use ClassInfo instead of CtClass just to get a grasp of things and it seems that is not easy to "only" change matchers or instrumentor, etc.
look at just creating org.jboss.aop.pointcut.Util.matchesClassExpr(ClassExpression classExpr, ClassInfo classInfo, Advisor advisor) to work similar as the javassist/reflect version.
then we need to create a ClassInfo "version" of org.jboss.aop.annotation.PortableAnnotationElement. isAnyAnnotationPresent(...). this method needs uses javassist.ClassFile to fetch annotationinformation regarding the visibility of the annotation. these kind of methods are not available in jboss-reflect AnnotationType/AnnotationValue/TypeInfo afaik.
so either we end up using javassist for these kind of operations (which is totally against why we do it in the first place) or we need to get a better overview of what functionality we need from the reflect api to use it in aop.
atm im only thinking of the non-mutable-info we need, but maybe we should include the mutableinfo discussion into this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201149#4201149
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201149
17 years, 2 months
[Design of Messaging on JBoss (Messaging/JBoss)] - DistributedTopicTest failures
by gaohoward
Hi sometimes I got test failures in running DistributedTopicTest class. The testClusteredTopicSharedDurableNoLocalSubPersistent and clusteredTopicSharedDurableNoLocalSub. The tests do the following:
1. create three connections (con1, con2, con3) on node 0, 1, and 2.
2. create three session (sess1, sess2 and sess3) on con1, 2 and 3 respectively
3. create 2 durable subscribers (cons1 and cons2) on the topic at node 1 and 2 respectively
4. create a producer (prod) on the topic at node 0.
5. after starting connections, prod sends 100 messages to topic at node 0.
6. as there is no receivers at node 0, all the messages will be received by cons1 and cons2 on the other two nodes.
The tests assumes that the messages will be sucked over to the two nodes in a round robin way, which is not always the case. See ServerSessionEndpoint.promptDelivery(Channel channel):
this.executor.execute(new Runnable() { public void run() { channel.deliver();} } );
The deliver() on node1 and node2 is triggered when con2 and con3 is started. Each deliver() will cause the sucker began to suck messages from node0. If the sucker on node 1 (sucker-node-1) and on node2 (sucker-node-2) both become available when node 0 starts to deliver messages, then the message will be distributed to sucker-node-1 and sucker-node-2 in round robin fashion. However because the deliver() is executed aynchronously, you cannot guarantee that they are both ready when node 0 starts to deliver the first message. It is possible that the first several messages are delivered to only one of the two nodes while the other is still not available (thread scheduling).
If we insert some time delay before sending messages, that'll give more time for both nodes become ready and the test will be more stable.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201101#4201101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201101
17 years, 2 months