[Design of POJO Server] - Updated to new AOP deployers in AS trunk
by kabir.khan@jboss.com
Moved from http://www.jboss.com/index.html?module=bb&op=viewtopic&t=139015
"kabir.khan(a)jboss.com" wrote : I have almost completed the new AOP deployers. The aim was to install the AOP artifacts via MC beans rather than directly into the aspect manager as was the case previously. Locally, with my changes here I am able to get the full AOP testsuite passing. I have yet to try out ejb3-interceptors-aop.xml, which I will look at on Monday.
|
| Before I can upgrade AS trunk I need to do another AOP release, then we need a release of MC (aop-mc-int). Once upgraded in AS, and switched over to use the new deployers the following two things apply to all jboss-aop.xml files used in AS
|
| 1) The aop namespace must be defined, so the contents of the file must be as follows:
|
| | <?xml version="1.0" encoding="UTF-8"?>
| | <aop xmlns="urn:jboss:aop-beans:1.0">
| | ...
| | </aop>
| |
|
| 2) interceptors can only be defined at the top level. We don't support:
|
| | <?xml version="1.0" encoding="UTF-8"?>
| | <aop xmlns="urn:jboss:aop-beans:1.0">
| | <bind pointcut="all(@Test1)">
| | <interceptor class="MyInterceptor"/>
| | </bind>
| | <bind pointcut="all(@Test2)">
| | <interceptor class="MyInterceptor"/>
| | </bind>
| | </aop>
| |
|
| instead you must use the alternative syntax (which is similar to how aspects/advice-bindings work)
|
| | <?xml version="1.0" encoding="UTF-8"?>
| | <aop xmlns="urn:jboss:aop-beans:1.0">
| | <interceptor class="MyInterceptor"/>
| | <bind pointcut="all(@Test1)">
| | <interceptor-ref name="MyInterceptor"/>
| | </bind>
| | <bind pointcut="all(@Test2)">
| | <interceptor-ref name="MyInterceptor"/>
| | </bind>
| | </aop>
| |
|
I have updated AS trunk to use this now. An additional constraint is now is that since everything maps onto MC beans in the background, names must be unique within a classloader domain. So, the following is not allowed
| <?xml version="1.0" encoding="UTF-8"?>
| <aop xmlns="urn:jboss:aop-beans:1.0">
| <interceptor name="Blah" class="x"/>
| <bind name="Blah" pointcut="...">
| <interceptor-ref name="Blah"/>
| </bind>
| </aop>
|
Since both the interceptor and the binding result in an underlying MCBean called "Blah". Duplicate bean names are not allowed within a controller. Rather you need to do
| <?xml version="1.0" encoding="UTF-8"?>
| <aop xmlns="urn:jboss:aop-beans:1.0">
| <interceptor name="Blah" class="x"/>
| <bind name="BlahBind" pointcut="...">
| <interceptor-ref name="Blah"/>
| </bind>
| </aop>
|
I ran the smoke and some other tests, but in case this breaks something unforeseen for somebody while I am out this evening, you can undo the changes by reverting https://svn.jboss.org/repos/jbossas/trunk/server/src/etc/conf/default/dep... to revision 78640.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178608#4178608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178608
17 years, 6 months
[Design of EJB 3.0] - Re: EJBTHREE-1454 Encapsulate Container infomation in TO/VO
by ALRubinger
"jaikiran" wrote : I just noticed that there is a StatefulSessionInvokableContext (in proxy) which currently implements the InvokableContext. I guess, this should now implement the new InvokableSessionContext. Do you recommend that i change this too?
Yep.
These look good to the naked eye, and I have all Unit Tests passing. If you can verify the clusteredsession tests in TestSuite are OK, than this is good for commit.
There is one issue that we should probably break off from this work: "getDispatcherRegistrationName()" is being used throughout ProxyFactory code where perhaps "getName()" would be more appropriate.
public ProxyFactoryBase(final String proxyFactoryName, InvokableContext container)
| {
| // Set properties
| this.setName(proxyFactoryName);
| this.setContainerName(container.getDispatcherRegistrationName());
| this.setContainerGuid(container.getGuid());
| this.setClassLoader(container.getClassloader());
| this.setAdvisor(container.getAdvisor());
| }
Part of my initial design of the proxy component was based on the assumption that'd we'd be referring to the Container by one name, and this is not necessarily the case (there's a name used to register it in MC/Ejb3Registrar, and another used to register w/ AOP Dispatcher, and these are not guaranteed to be equal). So the solution there would involve adding something to ProxyFactory classes to support each property in the correct place.
Let's open up a JIRA to address that differentiation (and clear up the code so future maintainers don't get confused).
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178512#4178512
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178512
17 years, 6 months