geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Is there a way to expose <xml-attribute> of a GBean to config.xml ?
Date Mon, 29 Jun 2009 09:55:49 GMT
I'm fixing https://issues.apache.org/jira/browse/GERONIMO-4688 and need to
expose <xml-attribut> to config.xml

The GBean is like this:

    <gbean name="NodeInfo"
> class="org.apache.geronimo.farm.config.BasicNodeInfo">

          <attribute name="name">${PlanClusterNodeName}</attribute>

          <xml-attribute name="extendedJMXConnectorInfo">

              <javabean:javabean xmlns:javabean="
> http://geronimo.apache.org/xml/ns/deployment/javabean-1.0"
> class="org.apache.geronimo.farm.deployment.DeploymentExtendedJMXConnectorInfo">

                  <javabean:property
> name="username">system</javabean:property>

                  <javabean:property
> name="password">manager</javabean:property>

                  <javabean:property name="protocol">rmi</javabean:property>

                  <javabean:property
> name="host">localhost</javabean:property>

                  <javabean:property
> name="port">${PlanNamingPort}</javabean:property>

                  <javabean:property
> name="urlPath">JMXConnector</javabean:property>

                  <javabean:property name="local">true</javabean:property>

              </javabean:javabean>

          </xml-attribute>

      </gbean>




The config-xml-content in pom.xml is like this

  <config-xml-content load="false">

                                <gbean name="NodeInfo">

                                    <attribute
> name="name">#{clusterNodeName}</attribute>

                                    <attribute
> propertyEditor="org.apache.geronimo.farm.deployment.DeploymentExtendedJMXConnectorInfoEditor"
> name="extendedJMXConnectorInfo">

                                        <ns:javabean
> class="org.apache.geronimo.farm.deployment.DeploymentExtendedJMXConnectorInfo"
> *xmlns:ns="http://geronimo.apache.org/xml/ns/deployment/javabean-1.0*">

                                            <ns:property
> name="username">system</ns:property>

                                            <ns:property
> name="password">manager</ns:property>

                                            <ns:property
> name="protocol">rmi</ns:property>

                                            <ns:property
> name="host">localhost</ns:property>

                                            <ns:property
> name="port">${NamingPort + PortOffset}</ns:property>

                                            <ns:property
> name="urlPath">JMXConnector</ns:property>

                                            <ns:property
> name="local">true</ns:property>

                                        </ns:javabean>

                                    </attribute>

                                </gbean>

                                <gbean name="ClusterInfo">

                                    <attribute
> name="name">#{clusterName}</attribute>

                                </gbean>

   </config-xml-content>



But the result in config.xml becomes

<gbean name="NodeInfo">

            <attribute name="name">${clusterNodeName}</attribute>

             <attribute
> propertyEditor="org.apache.geronimo.farm.deployment.DeploymentExtendedJMXConnectorInfoEditor"
> name="extendedJMXConnectorInfo">

                <ns:javabean
> class="org.apache.geronimo.farm.deployment.DeploymentExtendedJMXConnectorInfo"
> *xmlns:ns="http://geronimo.apache.org/xml/ns/attributes-1.2*">

                    <ns6:property name="username">system</ns6:property>

                    <ns6:property name="password">manager</ns6:property>

                    <ns6:property name="protocol">rmi</ns6:property>

                    <ns6:property name="host">localhost</ns6:property>

                    <ns6:property name="port">${NamingPort +
> PortOffset}</ns6:property>

                    <ns6:property name="urlPath">JMXConnector</ns6:property>

                    <ns6:property name="local">true</ns6:property>

 </ns:javabean>



Seems JAXB always convert javabean-1.0 namespace to attributes-1.2.   Any
ideas ?


-- 
Shawn

Mime
View raw message