[Design the new POJO MicroContainer] - Re: Parsing more than one file
by adrian@jboss.org
The parsing multiple files has two parts:
1) Being able to parse n files into one piece of metatdata from one parsing deployer
This is so you can deploy something programmatically properly.
e.g. You pass EjbJarMetaData. The current parsing deployers will say,
ok I'm not going to reparse ejb-jar.xml but I will reparse jboss.xml
which is wrong
2) Being able to parse multiple files with the same suffix from META-INF.
e.g.
META-INF/a-beans.xml
META-INF/b-beans.xml
should create two KernelDeployment attachments (with the attachment names
as the metadata url).
But this requires the deployers further down the chain to understand it.
i.e. not use getAttachments(KernelDeployment.class) but use
getAllAttachments(KernelDeployment.class) and handle the multiple pieces
of configuration correctly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139639#4139639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139639
16 years, 2 months
[Design the new POJO MicroContainer] - Re: Deployers schema
by adrian@jboss.org
e.g. all this could be made to look a lot nicer and easier to understand with use case xml
| <!-- The MainDeployer -->
| <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
| <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
| <property name="deployers"><inject bean="Deployers"/></property>
| <property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property>
| </bean>
|
| <!-- The ManagedDeploymentCreator implementation -->
| <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.DefaultManagedDeploymentCreator" />
|
| <!-- The holder for deployers that determine structure -->
| <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
| <property name="structureBuilder">
| <!-- The consolidator of the structure information -->
| <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
| </property>
| <!-- Accept any implementor of structure deployer -->
| <incallback method="addDeployer"/>
| <uncallback method="removeDeployer"/>
| </bean>
|
| <!-- The holder for deployers that do real deployment -->
| <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
| <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
| <!-- Accept any implementor of deployer -->
| <incallback method="addDeployer"/>
| <uncallback method="removeDeployer"/>
| </bean>
|
| <!-- A declared structure descriptor deployer -->
| <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"></bean>
|
| <!-- WAR Structure -->
| <bean name="WARStructure" class="org.jboss.deployers.vfs.plugins.structure.war.WARStructure">
| <property name="webInfLibFilter">
| <!-- We accept all .jar files in WEB-INF/lib -->
| <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
| <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
| </bean>
| </property>
| </bean>
|
| <!-- JAR Structure -->
| <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
| <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
| <constructor>
| <parameter>
| <set elementClass="java.lang.String">
| <value>.zip</value>
| <value>.ear</value>
| <value>.jar</value>
| <value>.rar</value>
| <value>.war</value>
| <value>.sar</value>
| <value>.har</value>
| <value>.aop</value>
| <value>.deployer</value>
| <value>.beans</value>
| </set>
| </parameter>
| </constructor>
| <property name="candidateStructureVisitorFactory">
| <!-- Any file that is not an ordinary directory is a candidate -->
| <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
| <!-- A filter to exclude some obvious non-subdeployments -->
| <property name="filter">
| <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
| <constructor><parameter>
| <list elementClass="java.lang.String">
| <!-- Exclude class files as subdeployments -->
| <value>.class</value>
| </list>
| </parameter></constructor>
| </bean>
| </property>
| </bean>
| </property>
| </bean>
|
| <!-- File Structure -->
| <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
| <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
| <constructor>
| <parameter>
| <set elementClass="java.lang.String">
| <value>-service.xml</value>
| <value>-beans.xml</value>
| <value>-ds.xml</value>
| <value>-aop.xml</value>
| </set>
| </parameter>
| </constructor>
| </bean>
|
P.S. I'm not saying you should do that now. Concentrate on getting CR1 features
done. These are implementation details that can be done after that.
If you're not changing a SPI or fixing an important bug then its not a priority for CR1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139635#4139635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139635
16 years, 2 months
[Design the new POJO MicroContainer] - Deployers schema
by adrian@jboss.org
What is this rubbish?
| Modified:
| jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java
| Log:
| fix my unintentional commit
|
| Modified: jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java
| ===================================================================
| --- jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java 2008-03-27 19:59:14 UTC (rev 2761)
| +++ jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java 2008-03-27 23:43:00 UTC (rev 2762)
| @@ -69,7 +69,8 @@
| 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");
| + addJaxbSchema("urn:jboss:classloader:1.0", "org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory10");
| + addJaxbSchema("urn:jboss:deployers:2.0", "org.jboss.deployers.vfs.plugins.xb.SchemaResolverDeployerMetaData");
| }
|
Don't you think there's likely to be other top level elements in the deployer's schema?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139631#4139631
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139631
16 years, 2 months
[Design the new POJO MicroContainer] - Re: Is JBVFS-2 resolved
by wolfc
It's still failing at rev 71370:
junit.framework.ComparisonFailure: VFS found the wrong manifest expected:<...2> but was:<...1>
| at junit.framework.Assert.assertEquals(Assert.java:81)
| at org.jboss.test.virtual.test.JARCacheUnitTestCase.test1(JARCacheUnitTestCase.java:106)
and so is the ZLIB problem if I don't delete the file:
java.io.EOFException: Unexpected end of ZLIB input stream
| at java.util.zip.ZipFile$2.fill(ZipFile.java:335)
| at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
| at java.util.jar.Manifest$FastInputStream.fill(Manifest.java:407)
| at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:343)
| at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:375)
| at java.util.jar.Attributes.read(Attributes.java:359)
| at java.util.jar.Manifest.read(Manifest.java:167)
| at java.util.jar.Manifest.<init>(Manifest.java:52)
| at org.jboss.test.virtual.test.JARCacheUnitTestCase.test1(JARCacheUnitTestCase.java:104)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139630#4139630
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139630
16 years, 2 months