-
1. Re: Need advice for AOP/Microcontainer XML integration
starksm64 May 11, 2005 11:22 AM (in response to bill.burke)There already is multiple namespace support in JBossXB. I use it in 4.0 for a login-config.xml document:
<?xml version="1.0" encoding="UTF-8"?> <!-- A login-config.xml example that uses the extended schema and jbossxb to marshall non-trival module-options. --> <policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.jboss.org/j2ee/schema/jaas" targetNamespace="http://www.jboss.org/j2ee/schema/jaas" > <application-policy name="testXMLLoginModule"> <authentication> <login-module code="org.jboss.security.auth.spi.XMLLoginModule" flag="required"> <module-option name="userInfo"> <lm:users xmlns:lm="http://www.jboss.org/j2ee/schemas/XMLLoginModule"> <lm:user name="jduke" password="theduke"> <lm:role name="Role1"/> <lm:role name="Role2"/> <lm:role name="Echo"/> <lm:role name="callerJduke" group="CallerPrincipal" /> </lm:user> <lm:user name="scott" password="echoman"> <lm:role name="Echo"/> <lm:role name="ProjectUser"/> <lm:role name="callerScott" group="CallerPrincipal" /> </lm:user> <lm:user name="stark" password="javaman"> <lm:role name="Java"/> <lm:role name="Coder"/> <lm:role name="callerStark" group="CallerPrincipal" /> </lm:user> <lm:user name="jdukeman" password="anotherduke"> <lm:role name="Role2"/> <lm:role name="Role3"/> <lm:role name="callerJdukeman" group="CallerPrincipal" /> </lm:user> <lm:user name="invoker" password="invoker"> <lm:role name="HttpInvoker"/> </lm:user> <lm:user name="admin" password="admin"> <lm:role name="JBossAdmin"/> </lm:user> </lm:users> </module-option> <module-option name="unauthenticatedIdentity">guest</module-option> </login-module> </authentication> </application-policy>
This is parsed using the org.jboss.security.auth.login.LoginConfigObjectModelFactory factory.
The issue is getting to a stable xsd driven version. In terms of something is stable and usable now, we may need to simply freeze/fork an ObjectModelFactory based implementation for use. -
2. Re: Need advice for AOP/Microcontainer XML integration
aloubyansky May 12, 2005 8:33 AM (in response to bill.burke)ObjectModelFactory API is stable currently. I don't plan to change this API in the near future.
SchemaBinding is under development. You can use it but I might need to update your code after my refactorings.
I would say use whatever is easier for you for now. We will refactor it anyway in the future.
About namespaces, please, clarify. Namespaces have been there since day one. -
3. Re: Need advice for AOP/Microcontainer XML integration
bill.burke May 13, 2005 3:50 PM (in response to bill.burke)"scott.stark@jboss.org" wrote:
There already is multiple namespace support in JBossXB. I use it in 4.0 for a login-config.xml document:
It looks like I would need the SchemaBinding approach as I want to integrate with the MC's BeanSchemaBinding. This is so I can embed AOP elements with a bean config and in an AOP document where aspect definitions are defind as MC Beans.
It looks like you can only map an ObjectFactory to a namespace and not a SchemaBinding. -
4. Re: Need advice for AOP/Microcontainer XML integration
adrian.brock May 23, 2005 3:32 PM (in response to bill.burke)We need the support for ANY processing.
Currently, Bill is using CDATA to deploy beans inside his AOP xml:<?xml version="1.0" encoding="UTF-8"?> <aop xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:aop-deployer aop-deployer_1_1.xsd" xmlns="urn:jboss:aop-deployer"> <interceptor name="SimpleInterceptor"> <![CDATA[ <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"> <bean class="org.jboss.test.kernel.SimpleInterceptor"> <constructor> <parameter>Hello</parameter> </constructor> <property name="second">World</property> </bean> </deployment> ]]> </interceptor> etc.
-
5. Re: Need advice for AOP/Microcontainer XML integration
aloubyansky May 25, 2005 6:34 AM (in response to bill.burke)Have a look at org.jboss.test.xml.AnyUnitTestCase.java. This is the first approach to anyType.
-
6. Re: Need advice for AOP/Microcontainer XML integration
adrian.brock May 25, 2005 9:32 AM (in response to bill.burke)So the next step would be to have a SchemaBindingResolver that
looks at a JBossXB annotation inside the schema for a SchemaBindingFactory
and then uses that SchemaBinding to create the object.
The schema being loaded through an entity resolver.