[Design the new POJO MicroContainer] - Re: Moving parsing to JBossXB.Builder/JAXB
by kabir.khan@jboss.com
Despite having a few things left I now have enough functionality in the JAXB variety to support what the AOPBeansSchemaInitializer does in AS 5.
The -beans.xml files using this will probably need to be modified a bit, the main thing is that aspects with properties
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
| <property name="dependency"><inject bean="Dependency"/></property>
| </aop:aspect>
| </deployment>
|
will need to be rewritten to
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
| <aop:property name="dependency"><aop:inject bean="Dependency"/></aop:property>
| </aop:aspect>
| </deployment>
|
or
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
| <property name="dependency"><aop:inject bean="Dependency"/></aop:property>
| </aspect>
| </deployment>
|
I created a new branch so that I would not interfere with the release last week http://www.jboss.com/index.html?module=bb&op=viewtopic&t=132206
If you want me to do a merge to aop-mc-int trunk then let me know.
Before this will work I need releases of common-core, and jbossxb (you probably already knew the last one :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138960#4138960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138960
18 years
[Design the new POJO MicroContainer] - Moving parsing to JBossXB.Builder/JAXB
by alesj
I would like to finish with moving MC parsing to the new JBossXB.Builder.
In order to do that, lets first do a status check. :-)
Kabir, what's the status of AOP-MC-int and JAXB usage?
Since I've seen it moving in and out. :-)
Is the SchemaBindingResolver I've modified to use this new stuff in place?
Jumping in IDE to SingletonSchemaResolverFactory shows that we already use is:
| private SingletonSchemaResolverFactory()
| {
| // old initializer
| addSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.xml.AOPBeansSchemaInitializer", Boolean.FALSE);
| addSchema("urn:jboss:spring-beans:2.0", "org.jboss.spring.deployment.xml.SpringSchemaInitializer", Boolean.FALSE);
| addSchema("urn:jboss:osgi-beans:1.0", "org.jboss.osgi.deployment.xml.OSGiSchemaInitializer", Boolean.FALSE);
| addSchema("urn:jboss:seam-components:1.0", "org.jboss.seam.ioc.microcontainer.xml.SeamSchemaInitializer", Boolean.FALSE);
| // new jaxb
| //addJaxbSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.metadata.AOPDeployment");
| addJaxbSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment10");
| addJaxbSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment");
| addJaxbSchema("urn:jboss:javabean:1.0", "org.jboss.javabean.plugins.jaxb.JavaBean10");
| addJaxbSchema("urn:jboss:javabean:2.0", "org.jboss.javabean.plugins.jaxb.JavaBean20");
| addJaxbSchema("urn:jboss:policy:1.0", "org.jboss.beans.metadata.plugins.policy.AbstractPolicyMetaData");
| addJaxbSchema("urn:jboss:classloading:1.0", "org.jboss.classloading.spi.metadata.ClassLoadingMetaData10");
| addJaxbSchema("urn:jboss:classloader:1.0", " org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory10");
| }
|
Except for AOP.
We've already got people wandering:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&t=132413
I've put David on hold until I validate that this is all working.
Probably the best test will be when I (re)move the old SchemaInitializer. :-)
I'll move the initializer code to spring-int.
Although predicted by Adrian that I'll eventually complain over this, I'll take my chances.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138944#4138944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138944
18 years
[Design the new POJO MicroContainer] - Re: JarEntry as VFS root does not return empty vfspath
by adrian@jboss.org
"mstruk" wrote :
| Ok, I'm trying another thing first - 'set parent to null' approach, that won't require any additional fields. I see two ways of doing it. One is to propagate some extra info based on which each handler can determine - as it's being created - if it is a root handler or not. That approach is processor intensive and requires small changes in many places. Another approach is to introduce setParent(VirtualFileHandler) or setAsContextRoot() method and call it on only one handler as it's assigned to be context root. That approach requires one extra method and one extra call - very elegant. But ... makes handler creation a two-phase process for handlers that become root and makes these handlers mutable. Looking at AbstractVirtualFileHandler I find no reliance on immutability so I don't expect problems.
|
|
| I'm testing a fix made using this approach, and so far everything is working nicely.
|
|
| In the end I'll remove more code cleaning out the current quick fix than add new code for a proper solution :)
|
|
| - marko
|
Sounds overly complicated. The problem with complicated things
is that they generally need workarounds when they don't work as expected
leading to workarounds for workarounds (like the state you are in now :-)
Why can't a JarEntryHandler just be a root in its own right
with JarContext knowing how to properly construct a root handler for a jar entry?
Looks to me like "laziness" in that all the code to do the entry handling
requires a top level JarHandler where it does the initJarFile()
and once that is done, it just does findChild().
i.e. you don't really have a VFS Context for the entry, its for the jar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138899#4138899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138899
18 years