[Design of JBoss Remoting, Unified Invokers] - Re: JBREM-63, configuration pojofication
by scott.stark@jboss.org
"ron.sigal(a)jboss.com" wrote :
| 1. Does what I've done conform to what JBREM-63 calls for?
|
No, because the config object is not a bean that encapsulates the configuration metadata for the invoker, at least as far as I can see. The configuration separation is really not expressable as mbeans, but the closest would be something like this:
| <server>
| <mbean code="org.jboss.remoting.transport.ConnectorConfig"
| name="jboss.remoting:service=TerranceAndPhillip,transport=bisocket,type=legacyConfig">
|
| <!-- CHANGE: added xmlns, serialDataType -->
| <attribute name="Configuration"
| xmlns="http://www.jboss.org/remoting/connector.xsd"
| serialDataType="jbxb">
|
| <config>
| <invoker transport="bisocket">
| ...
| <attribute name="timeout" isParam="true">0</attribute>
| ...
| </invoker>
| <handlers>
| <handler>...</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:service=TerranceAndPhillip,transport=bisocket">
| <depends optional-attribute-name="ConfigInterface"
| proxy-type="attribute">jboss.remoting:service=TerranceAndPhillip,transport=bisocket,type=legacyConfig</depends>
| </mbean>
|
| </server>
|
where the org.jboss.remoting.transport.ConnectorConfigMBean would essentially be the interface for the pojo metadata.
What is really needed though is a true ConnectorConfig pojo that exposes all of the configurable properties so that they can be set as properties on a kernel bean.
| <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 name="Iface0"
| class="...">
| <property name="alias">loopback</property>
| <property name="address">127.0.0.1</property>
| </bean>
| <bean name="Iface1"
| class="...">
| <property name="alias">lan1</property>
| <property name="address">192.168.1.10</property>
| </bean>
|
| <bean name="BisocketInvoker"
| class="...">
| <property name="addresses">
| <array>
| <value><inject bean="Iface0"/></value>
| <value><inject bean="Iface1"/></value>
| </array>
| </property>
| <property name="handlers">
| <array>
| <value><inject bean="Iface0"/></value>
| <value><inject bean="Iface1"/></value>
| </array>
| </property>
| </bean>
|
| </deployment>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041236#4041236
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041236
17 years, 9 months
[Design of POJO Server] - Re: Remove Resource - removes entire deployment, the whole f
by scott.stark@jboss.org
Only the current profileservice module use of these classes:
org.jboss.profileservice.management.templates.DsXmlDataSourceTemplate
org.jboss.profileservice.management.builders.ConnectionFactoryDeployerManagedObjectBuilder
org.jboss.profileservice.management.builders.DomDataSourceManagedObject
and registration of these in the profileservice-beans.xml is all that exists in the current prototype. Once I get the DeploymentRepository updated I'll start documenting the management requirements for deployers. Essentially the DataSource deployer needs to take ownership of the ConnectionFactoryDeployerManagedObjectBuilder by having the deployer implement the org.jboss.deployers.spi.managed.ManagedObjectBuilder interface so that the ManagedObject for a DeploymentUnit can be obtained.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| ProfileService beans that extend the bootstrap configuration. This
| includes:
| Remote access to ProfileService interfaces
| ManagementView plugin + DeploymentTemplates
| ...
| $Id: profileservice-beans.xml 62170 2007-04-06 19:42:23Z scott.stark(a)jboss.org $
| -->
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
| <bean name="ConnectorMBean">
| <constructor factoryClass="org.jboss.mx.util.MBeanTyper" factoryMethod="typeMBean">
| <parameter><inject bean="JMXKernel" property="mbeanServer"/></parameter>
| <parameter>jboss.remoting:service=Connector,transport=socket</parameter>
| <parameter>org.jboss.remoting.transport.ConnectorMBean</parameter>
| </constructor>
| <depends>jboss.remoting:service=Connector,transport=socket</depends>
| </bean>
| <!--
| Add a ProfileService handler to the remoting socket connector
| -->
| <bean name="ProfileServiceInvocationHandler"
| class="org.jboss.profileservice.remoting.ProfileServiceInvocationHandler">
| <install bean="ConnectorMBean" method="addInvocationHandler">
| <parameter>ProfileService</parameter>
| <parameter><this/></parameter>
| </install>
| <uninstall bean="ConnectorMBean" method="removeInvocationHandler">
| <parameter>ProfileService</parameter>
| </uninstall>
| <property name="managementViewProxy"><inject bean="ProfileServiceProxyFactory" property="managementViewProxy"/></property>
| </bean>
|
| <!-- The ManagementView plugin -->
| <bean name="ManagementView" class="org.jboss.profileservice.management.ManagementViewImpl">
| <install bean="ProfileService" method="setViewManager">
| <parameter>
| <this/>
| </parameter>
| </install>
| <uninstall bean="ProfileService" method="setViewManager">
| <parameter>
| <null/>
| </parameter>
| </uninstall>
| <property name="mainDeployer"><inject bean="MainDeployer"/></property>
| <property name="profileService"><inject bean="ProfileService"/></property>
| <property name="compVisitor"><inject bean="ComponentTypeOverridesVisitor"/></property>
| <property name="serializer"><inject bean="JavaSerializationAttachmentsSerializer"/></property>
| </bean>
|
| <!-- ConnectionFactory Deployment -->
| <bean name="FakeDataSourceDeployer"
| class="org.jboss.profileservice.mock.ds.FakeDataSourceDeployer">
| <install bean="MainDeployer" method="addDeployer">
| <parameter><this/></parameter>
| </install>
| <uninstall bean="MainDeployer" method="removeDeployer">
| <parameter><this/></parameter>
| </uninstall>
| <property name="type">jca-ds</property>
| <property name="propertyNameMappings">
| <inject bean="DsPropertyMappings" />
| </property>
| </bean>
|
| <!-- DeploymentTemplates -->
| <bean name="DsXmlDataSourceTemplate"
| class="org.jboss.profileservice.management.templates.DsXmlDataSourceTemplate">
| <install bean="ManagementView" method="addTemplate">
| <parameter>
| <this/>
| </parameter>
| </install>
| <uninstall bean="ManagementView" method="removeTemplate">
| <parameter>
| <this/>
| </parameter>
| </uninstall>
| <property name="info"><inject bean="DsXmlDataSourceTemplateInfo"/></property>
| </bean>
| <bean name="FakeDsXmlDataSourceTemplate"
| class="org.jboss.profileservice.management.templates.FakeDsXmlDataSourceTemplate">
| <install bean="ManagementView" method="addTemplate">
| <parameter>
| <this/>
| </parameter>
| </install>
| <uninstall bean="ManagementView" method="removeTemplate">
| <parameter>
| <this/>
| </parameter>
| </uninstall>
| <property name="info"><inject bean="FakeDsXmlDataSourceTemplateInfo"/></property>
| <property name="deployer"><inject bean="FakeDataSourceDeployer" /></property>
| </bean>
|
| <bean name="FakeDsXmlDataSourceTemplateInfo"
| class="org.jboss.profileservice.management.templates.DsXmlDataSourceTemplateInfo">
| <constructor>
| <parameter>FakeDsXmlDataSourceTemplate</parameter>
| <parameter>A template for *-dsf.xml deployments</parameter>
| <parameter>org.jboss.system.metadata.ServiceMetaData</parameter>
| <parameter>FakeConnectionFactoryDeployer.datasource-type</parameter>
| </constructor>
| <!-- Specify a mapping from service attribute names used by the datasource
| deployment ServiceMetaData to ManagedProperty names.
| -->
| <property name="propertyNameMappings">
| <inject bean="DsPropertyMappings" />
| </property>
| </bean>
| <bean name="DsXmlDataSourceTemplateInfo"
| class="org.jboss.profileservice.management.templates.DsXmlDataSourceTemplateInfo">
| <constructor>
| <parameter>DsXmlDataSourceTemplate</parameter>
| <parameter>A template for *-ds.xml deployments</parameter>
| <parameter>org.w3c.dom.Document</parameter>
| </constructor>
| <!-- Specify a mapping from service attribute names used by the datasource
| deployment ServiceMetaData to ManagedProperty names.
| -->
| <property name="propertyNameMappings">
| <inject bean="DsPropertyMappings" />
| </property>
| </bean>
| <bean name="DsPropertyMappings" class="java.util.HashMap">
| <constructor>
| <map class="java.util.HashMap" keyClass="java.lang.String" valueClass="java.lang.String">
| <entry><key>jndi-name</key><value>JndiName</value></entry>
| <entry><key>connection-url</key><value>JdbcURL</value></entry>
| <entry><key>user-name</key><value>Username</value></entry>
| <entry><key>password</key><value>Password</value></entry>
| <entry><key>driver-class</key><value>DriverClass</value></entry>
| <entry><key>min-pool-size</key><value>MinPoolSize</value></entry>
| <entry><key>max-pool-size</key><value>MaxPoolSize</value></entry>
| <entry><key>security-domain</key><value>SecurityDomain</value></entry>
| </map>
| </constructor>
| </bean>
|
| <!-- Override the ConnectionFactoryDeployer ManagedObjectBuilder -->
| <bean name="ConnectionFactoryDeployerManagedObjectBuilder"
| class="org.jboss.profileservice.management.builders.ConnectionFactoryDeployerManagedObjectBuilder">
| <install bean="MainDeployer" method="setDeployerManagedObjectBuilder">
| <parameter>
| <inject bean="ConnectionFactoryDeployer" />
| </parameter>
| <parameter>
| <this/>
| </parameter>
| </install>
| </bean>
|
| <bean name="ProfileServiceProxyFactory" class="org.jboss.profileservice.remoting.ProxyFactory">
| <property name="dispatchName">ProfileService</property>
| <property name="jndiName">ProfileService</property>
| <property name="locator"><inject bean="ConnectorMBean" property="invokerLocator"/></property>
| <property name="profileService"><inject bean="ProfileService"/></property>
| <property name="viewManager"><inject bean="ManagementView"/></property>
| <depends>ConnectorMBean</depends>
| </bean>
|
| <bean name="ComponentTypeOverridesVisitor"
| class="org.jboss.profileservice.management.ComponentTypeOverridesVisitor">
| </bean>
|
| <!-- Hotdeployment of applications -->
| <bean name="HDScanner"
| class="org.jboss.system.server.profileservice.hotdeploy.HDScanner">
| <property name="mainDeployer"><inject bean="MainDeployer"/></property>
| <!-- Workaround for JBMICROCONT-176
| -->
| <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
| <!-- Broken due to JBMICROCONT-176
| <property name="controller"><inject bean="jboss.kernel:service=Kernel" property="controller"/></property>
| -->
|
| <property name="profileService"><inject bean="ProfileService"/></property>
| <property name="scanPeriod">5000</property>
| <property name="scanThreadName">HDScanner</property>
| </bean>
| </deployment>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041224#4041224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041224
17 years, 9 months
[Design of POJO Server] - Re: Remove Resource - removes entire deployment, the whole f
by scott.stark@jboss.org
Its not really the profile service that has to deal with this. Its the DeploymentTemplates and ManagedObjects defined by the deployers as these need to be in synch with the way the deployers handle metadata. Right now the DataSource management layer is just hacked in as an override by profile service local classes.
In general, a parsing deployer translates a descriptor into a pojo metadata view, and operations on the metadata view may or may not affect the descriptor. It depends on how the ManagedObject/ManagedProperty instances handle changes. Typically I would expect that the descriptor simply becomes obsolete as it would be overriden by the pojo metadata view. The persistent form of the pojo metadata view may be java serialized objects, another xml document, or something else. This is an implementation detail of the DeploymentRepository currently. The current file based DeploymentRepository implementation defines an AttachmentsSerializer spi to control this. As I go through the OSGi bundle repository notions I'll refactor this. After that I need to go through and update the profile service diagrams to show how all the pieces fit together in terms of how the deployment metadata is built up.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041216#4041216
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041216
17 years, 9 months