For the GA I have taken a new turn that adds a ManagedMBeanDeploymentFactory notion along
with injection into the ManagementView bean to allow one to setup the mapping between
mbeans and ManagedDeployment/ManagedComponents. Its not completely finished or tested, but
an example of getting some of the web app/servlet components are:
| <bean name="WarManagerManagedDeploymentFactory"
|
class="org.jboss.profileservice.management.ProxyManagedDeploymentFactory">
| <property name="factoryName">WarManager</property>
| <property name="compType">MBean</property>
| <property
name="compSubtype">WebApplicationManager</property>
| <property
name="pattern">jboss.web:host=localhost,type=Manager,*</property>
| <property name="patternKey">path</property>
| </bean>
|
| <bean name="WebModuleManagedDeploymentFactory"
|
class="org.jboss.profileservice.management.ProxyManagedDeploymentFactory">
| <property name="factoryName">WebModule</property>
| <property name="compType">MBean</property>
| <property name="compSubtype">WebApplication</property>
| <property
name="pattern">jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,*</property>
| <property name="patternKey">name</property>
| <property name="componetInfo">
| <map keyClass="java.lang.String"
valueClass="java.lang.String">
| <!-- Process the servlets components -->
| <entry>
| <key>servlets</key>
| <value>MBean:Servlet</value>
| </entry>
| </map>
| </property>
| </bean>
|
The WarManagerManagedDeploymentFactory simply maps the mbeans matching pattern
"jboss.web:host=localhost,type=Manager,*" name. This would match names like:
jboss.web:host=localhost,path=/admin-console,type=Manager
jboss.web:host=localhost,path=/jbossws,type=Manager
...
The patternKey property indicates which key in the matching object names provides the
unique name of the deployment. This will create ManagedDeployments with a name equal to
the path key value, with a single ManagedComponent of type/subtype
MBean/WebApplicationManager.
The WebModuleManagedDeploymentFactory is similar, but now defines that the servlets
attribute of the root component should be treated as a refeferences to other mbeans that
should be have ManagedObjects created for their MBeans, and be included in the deployment
as MangedComponents(type=MBean,subtype=Servlet). The component name will be the mbean
object name that is referenced.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228447#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...