[Design the new POJO MicroContainer] - Changing beanfactoryType class attribute
by kabir.khan@jboss.com
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107156#4107156
Following from this I need to change the class attribute of beanfactoryType to be optional
| <xsd:complexType name="beanfactoryType">
| <xsd:annotation>
| <xsd:documentation>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:sequence>
| <xsd:element name="alias" type="aliasType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
| <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
| <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
| <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
| <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="install" type="installType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="uninstall" type="installType" minOccurs="0" maxOccurs="unbounded"/>
| </xsd:sequence>
| <xsd:attribute name="name" type="xsd:string" use="optional"/>
| <!--
| <xsd:attribute name="class" type="xsd:token" use="required"/>
| -->
| <xsd:attribute name="class" type="xsd:token" use="optional"/>
| </xsd:complexType>
|
I think it makes sense for aspect to be an extension of beanFactory so that we get all all the property, start, stop etc. stuff for free rather than having to redefince all that stuff?
Objections?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107162#4107162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107162
18 years, 4 months
[Design of POJO Server] - NotUnpackedRARDeploymentUnitTestCase test
by alesj
Previously NotUnpackedRARDeploymentUnitTestCase test was marked as it should completely fail:
| public void testNotRARDeployment() throws Exception
| {
| assertNotDeployed(notRar1DeploymentUnpacked);
| }
|
Now, not even that it doesn't fail, we even get some child deployment units attached to it:
As being recognised by JARStructure:
| 17:19:26,484 TRACE [JARStructure] Recognised: unpacked-mcf1-not.arar
| 17:19:26,484 TRACE [VFSStructuralDeployersImpl] unpacked-mcf1-not.arar recognised by org.jboss.deployers.vfs.plugins.structure.jar.JARStructure@e31e33
|
then also contains
| 17:19:26,484 TRACE [JARStructure] Added context ContextInfoImpl{path= metaData=META-INF classPath=null} from testdeployers-mcf1.jar
| 17:19:26,484 TRACE [JARStructure] Added classpath entry testdeployers-mcf1.jar for testdeployers-mcf1.jar from FileHandler@30701975[path= context=file:/C:/projects/jboss5/trunk/testsuite/output/lib/unpacked-mcf1-not.arar/ real=file:/C:/projects/jboss5/trunk/testsuite/output/lib/unpacked-mcf1-not.arar/]
|
Is this expected?
I guess we don't want to have child components deployed, but not the top level deployment?
I changed the calls of
| assertNotDeployed(String deployment)
|
to
| assertNoChildContexts(String deployment)
| .
Since FileStructure 'recognises' all top level files, and as such DeploymentContext is created for underlying deployment. As such, I checked if there were no children.
Which looks like a wrong way od checking, if we allow the upper use case to be valid.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107153#4107153
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107153
18 years, 4 months
[Design of JBossXB] - Problem with type from parent schema not properly picked up
by kabir.khan@jboss.com
With the following schema and XML I get a validation exception
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- A prototype xsd schema for javabeans
| $Id: aop-beans_1_0.xsd 64914 2007-08-28 15:27:14Z alesj $
| -->
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="urn:jboss:aop-beans:1.0"
| xmlns="urn:jboss:aop-beans:1.0"
| xmlns:mc="urn:jboss:bean-deployer:2.0"
| elementFormDefault="qualified"
| attributeFormDefault="unqualified"
| version="1.0"
| >
|
| <xsd:import namespace="urn:jboss:bean-deployer:2.0"/>
|
| <xsd:complexType name="managerAwareType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| Base type for all things that need installing in the aspect manager
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
| <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
| </xsd:complexType>
|
| <xsd:element name="aspect" type="aspectOrInterceptorType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| An aspect
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| </xsd:element>
|
| <xsd:complexType name="aspectOrInterceptorType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| aspects or interceptors
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:complexContent>
| <xsd:extension base="managerAwareType">
| <xsd:choice minOccurs="0" maxOccurs="1">
| <xsd:element name="property" type="mc:propertyType" minOccurs="0" maxOccurs="unbounded"/>
| </xsd:choice>
| <xsd:attribute name="name" type="xsd:string" use="optional"/>
| <xsd:attribute name="class" type="xsd:string" use="optional"/>
| <xsd:attribute name="scope" type="xsd:string" use="optional"/>
| <xsd:attribute name="factory" type="xsd:string" use="optional"/>
| </xsd:extension>
| </xsd:complexContent>
| </xsd:complexType>
| ....
| </xsd:schema>
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <bean name="AspectManager" class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
| </bean>
|
| <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans2.TestAspectWithDependency">
| <property name="dependency"><inject bean="Dependency"/></property>
| </aspect>
| </deployment>
|
|
| org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/target/tests-classes/org/jboss/test/microcontainer/beans2/test/AspectWithDependencyAopTestCaseNotAutomatic1.xml@10,60
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:184)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
| at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:147)
| at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:255)
| at org.jboss.test.kernel.junit.MicrocontainerTest.deploy(MicrocontainerTest.java:168)
| at org.jboss.test.microcontainer.beans2.test.AspectWithDependencyTest.testInterceptorWithDependencyCorrectOrder(AspectWithDependencyTest.java:55)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:aop-beans:1.0}inject not found as a child of {urn:jboss:aop-beans:1.0}property
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:370)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:402)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:180)
| ... 27 more
|
The bean deployer schema contains the propertyType definition and works with inject, null etc. Am I referencing it wrong?
The old aop schema worked, but did things slightly differently, to do this with the new schema this would probably look something like
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- A prototype xsd schema for javabeans
| $Id: aop-beans_1_0.xsd 64914 2007-08-28 15:27:14Z alesj $
| -->
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="urn:jboss:aop-beans:1.0"
| xmlns="urn:jboss:aop-beans:1.0"
| xmlns:mc="urn:jboss:bean-deployer:2.0"
| elementFormDefault="qualified"
| attributeFormDefault="unqualified"
| version="1.0"
| >
|
| <xsd:import namespace="urn:jboss:bean-deployer:2.0"/>
|
| <xsd:complexType name="managerAwareType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| Base type for all things that need installing in the aspect manager
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:complexContent>
| <xsd:extension base="mc:beanfactoryType">
| <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
| <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
| </xsd:extension>
| </xsd:complexContent>
| </xsd:complexType>
|
| <xsd:element name="aspect" type="aspectOrInterceptorType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| An aspect
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| </xsd:element>
|
| <xsd:complexType name="aspectOrInterceptorType">
| <xsd:annotation>
| <xsd:documentation>
| <![CDATA[
| aspects or interceptors
| ]]>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:complexContent>
| <xsd:extension base="managerAwareType">
| <xsd:attribute name="name" type="xsd:string" use="optional"/>
| <xsd:attribute name="class" type="xsd:string" use="optional"/>
| <xsd:attribute name="scope" type="xsd:string" use="optional"/>
| <xsd:attribute name="factory" type="xsd:string" use="optional"/>
| </xsd:extension>
| </xsd:complexContent>
| </xsd:complexType>
| ....
| </xsd:schema>
|
However this does not work for me since the beans schema specifies that the beanFactoryType must have a class attribute?
| <xsd:complexType name="beanfactoryType">
| <xsd:annotation>
| <xsd:documentation>
| </xsd:documentation>
| </xsd:annotation>
| <xsd:sequence>
| <xsd:element name="alias" type="aliasType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="classloader" type="classloaderType" minOccurs="0"/>
| <xsd:element name="constructor" type="constructorType" minOccurs="0"/>
| <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="create" type="lifecycleType" minOccurs="0"/>
| <xsd:element name="start" type="lifecycleType" minOccurs="0"/>
| <xsd:element name="depends" type="dependsType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="demand" type="demandType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="supply" type="supplyType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="install" type="installType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="uninstall" type="installType" minOccurs="0" maxOccurs="unbounded"/>
| <!--
| <xsd:element name="incallback" type="callbackType" minOccurs="0" maxOccurs="unbounded"/>
| <xsd:element name="uncallback" type="callbackType" minOccurs="0" maxOccurs="unbounded"/>
| -->
| </xsd:sequence>
| <xsd:attribute name="name" type="xsd:string" use="optional"/>
| <xsd:attribute name="class" type="xsd:token" use="required"/>
| </xsd:complexType>
|
|
And I need to be able to do things like
| <?xml version="1.0" encoding="UTF-8"?>
|
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <bean name="AspectManager" class="org.jboss.aop.AspectManager">
| <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
| </bean>
|
| <aspect xmlns="urn:jboss:aop-beans:1.0" factory="org.acme.SomeFactory">
| <property name="dependency"><inject bean="Dependency"/></property>
| </aspect>
| </deployment>
|
|
What can I do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107139#4107139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107139
18 years, 4 months
[Design of JBoss Portal] - Re: Layout System
by wesleyhales
anonymous wrote : There's also JSFTemplating: https://jsftemplating.dev.java.net/
Looks promising, It would be cool to run through a tutorial to see what it can do.
It looks like they may be related to Woodstoock which is supposed to have some good components.
anonymous wrote : the generated markup would be semantically correct (not only, would it pass HTML validation but the elements used to structure the markup would actually make sense based on their intent as opposed to how they are rendered by user agents) and not rely on tables for the layout. This would make it easier for designers to just change the layout by changing the CSS. The markup should also support accessibility needs as much as feasible.
+1 we definitely need this to happen.
If we are 508 compliant that would open the door to new customers that need this. (financial institutions, etc...)
Will we have any interest in XUL (xulfaces)? - If we use facelets this will also make us/the system more productive.
anonymous wrote : So here we are really focusing on laying out window and how to manage the state associated to it
| ...
| For now the current model is to have for each window a set of coordinates (region, index), and the algorithm is to display the page and fill the regions with the windows associated to it according to the index.
The are a few different ways to skin this cat (I guess). But I think we have to start with the region+index and build on top of that. This is how I understand it to work, please chime in if I'm missing something:
1) through xml or ui the admin sets the overall layout of the page/site (columns and column spans or some type of grid)
2) define components/portlet that go in each column (this is the region placement definition)
3) define the index for each component/portlet to appear in the region.
4) what else, are there any use cases that break this flow?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107131#4107131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107131
18 years, 4 months