-
1. Re: Spring-int schema support
alesj May 30, 2007 3:58 AM (in response to alesj)Is this feature meaningful (to be imported into MC features):
- http://www.springframework.org/docs/reference/beans.html#beans-factory-xml-import
Since in our case those files will be scanned and deployed in the same controller anyway.
Probably this should be just a Spring-int addon. -
2. Re: Spring-int schema support
adrian.brock Jun 1, 2007 9:44 AM (in response to alesj)You can do this with XInclude and JBossXB.
<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss-bean-deployer:2.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="someurl"/> <bean .../> </deployment>
Why reinvent when there is already a standard? -
3. Re: Spring-int schema support
alesj Jun 1, 2007 9:47 AM (in response to alesj)"adrian@jboss.org" wrote:
You can do this with XInclude and JBossXB.<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss-bean-deployer:2.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="someurl"/> <bean .../> </deployment>
Why reinvent when there is already a standard?
Hehe.
We should ask this the Spring guys. :-)
What about other stuff - 1st post? -
4. Re: Spring-int schema support
adrian.brock Jun 1, 2007 9:52 AM (in response to alesj)The only difference I can see between XInclude and the Spring include
is that with XInclude it is a fragment, i.e.<bean/> <bean/>
whereas the Spring include is a full document, i.e. in the Microcontainer
it would be<deployment> <bean/> <bean/> </deployment>
-
5. Re: Spring-int schema support
kabirkhan Jun 5, 2007 5:54 AM (in response to alesj)"alesj" wrote:
And two more which can probably be handled by our aspectized MC configuration:
- lookup-method (http://www.springframework.org/docs/reference/beans.html#beans-factory-lookup-method-injection)
- replaced-method
Adding this should be pretty trivial and can be done from the AOPConstructorJoinPoint. How will I know that this is the thing to do though? i.e. where will I find whatever the following becomes:<lookup-method name="createCommand" bean="command"/>
This needs to be something that is visible from aop-mc-int, which we probably do not want to make dependent on spring-int."alesj" wrote:
(http://www.springframework.org/docs/reference/beans.html#beans-factory-arbitrary-method-replacement)
This can be implemented as an aspect for the affected methods. How will I get hold of<replaced-method name="computeValue" replacer="replacementComputeValue"> <arg-type>String</arg-type> </replaced-method>
-
6. Re: Spring-int schema support
alesj Jun 5, 2007 8:01 AM (in response to alesj)"kabir.khan@jboss.com" wrote:
This needs to be something that is visible from aop-mc-int, which we probably do not want to make dependent on spring-int.
Sure, absolutely no aop-mc-int --> spring-int dependency.
But we are thinking of enabling such features from other IoC frameworks on top of existing core MC code, since as you can see MC already provides such architecture that implementing this is trivial. :-)
If you could provide me with some pseudo code or point me to some hooks (into aop-mc-int) on where I can plugin this features from the kernel module. -
7. Re: Spring-int schema support
kabirkhan Jun 5, 2007 9:53 AM (in response to alesj)Maybe another subclass of AOPContructorJoinPoint that is used for spring-int? I don't know if having spring-int depending on aop-mc-int is viable?
One issue with http://www.springframework.org/docs/reference/beans.html#beans-factory-lookup-method-injection is that we need to replace the original abstract class with the generated concrete class. -
8. Re: Spring-int schema support
alesj Jun 5, 2007 10:23 AM (in response to alesj)"kabir.khan@jboss.com" wrote:
Maybe another subclass of AOPContructorJoinPoint that is used for spring-int? I don't know if having spring-int depending on aop-mc-int is viable?
Like I said, I think we can push this into main kernel module, but as an optional feature depending on aop-mc-int."kabir.khan@jboss.com" wrote:
One issue with http://www.springframework.org/docs/reference/beans.html#beans-factory-lookup-method-injection is that we need to replace the original abstract class with the generated concrete class.
What's the issue? -
9. Re: Spring-int schema support
adrian.brock Jun 5, 2007 10:35 AM (in response to alesj)These look like AOP features to me and would be better implemented
with something more flexible than specific config options.
I'd do it in a spring-aop-int project and translate the spring xml into aop/bean xml, e.g.<aop:generated-lookup-factory name="commandManager" class="fiona.apple.CommandManager" method="createCommand" bean="command"/>
when you are asked for getBeans();
Fundamentally, you can write any BeanMetaFactory you like
whether it a GenericBeanFactory, an AOP generated class or a CGLIB/javassist
generated class doesn't really matter.
You can always hide the implementation details in your getBeans() :-) -
10. Re: Spring-int schema support
kabirkhan Jun 5, 2007 12:29 PM (in response to alesj)"alesj" wrote:
"kabir.khan@jboss.com" wrote:
One issue with http://www.springframework.org/docs/reference/beans.html#beans-factory-lookup-method-injection is that we need to replace the original abstract class with the generated concrete class.
What's the issue?
Simply that from the "beans-factory-lookup-method-injection" example, we cannot instantiate/install CommandManager itself since it is abstract. Instead we would need to install the generated sub-class -
11. Re: Spring-int schema support
alesj Jun 5, 2007 3:19 PM (in response to alesj)"kabir.khan@jboss.com" wrote:
Simply that from the "beans-factory-lookup-method-injection" example, we cannot instantiate/install CommandManager itself since it is abstract. Instead we would need to install the generated sub-class
Sure.
But isn't this just a matter of providing right 'bean factory' (as Adrian suggested)? -
12. Re: Spring-int schema support
kabirkhan Jun 5, 2007 3:21 PM (in response to alesj)Yes, something along those lines
-
13. Re: Spring-int schema support
kabirkhan Jun 5, 2007 3:22 PM (in response to alesj)I was just reiterating the "issue". The issue is definitely solveable :-)