]
Dimitris Andreadis updated JBAS-2595:
-------------------------------------
Comment: was deleted
JMX Resolver for JSF
--------------------
Key: JBAS-2595
URL:
https://jira.jboss.org/jira/browse/JBAS-2595
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Web (Tomcat) service
Affects Versions: JBossAS-4.0.4RC1
Reporter: Stan Silvert
Assignee: Stan Silvert
Priority: Optional
Fix For: JBossAS-5.1.0.CR1
The JMX resolver does for JMX what Seam is doing for EJB. That is, it provides a ?seam?
for JMX and JSF. It allows you to map an MBean as a JSF managed bean. Then you can use
attributes from JMX in any JSF component.
The obvious use case for this is where you want to create a custom JMX console that only
contains the attributes you are interested in. For example, I might want to
monitor/modify the attributes for some DataSources and Tomcat threads all on a single JSP
page. I would create a faces-config-jmx.xml file like this and place it in the WEB-INF
directory:
<faces-config-jmx>
<managed-bean>
<managed-bean-name>defaultDS</managed-bean-name>
<jmx-object-name>jboss.jca:name=DefaultDS,service=ManagedConnectionPool</jmx-object-name>
</managed-bean>
<managed-bean>
<managed-bean-name>foo</managed-bean-name>
<jmx-object-name>Foo:name=Foo,type=XMBean</jmx-object-name>
</managed-bean>
</faces-config-jmx>
To use this in a JSP page, I just use the managed bean name in my JSF component as
usual:
<h:form>
<p>
<h:outputText value="New DefaultDS maxSize: "/>
<h:inputText value="#{defaultDS.MaxSize}"
converter="javax.faces.Integer" />
<br/></br>
<h:outputText value="New DefaultDS AvailableConnectionCount: "/>
<h:outputText value="#{defaultDS.AvailableConnectionCount}" />
<br/><br/>
<h:outputText value="Array access test for foo.myArray[2]: "/>
<br/>
<h:outputText value="Current value is: #{foo.myArray[2]}" />
<h:commandButton value="Submit"/>
</p>
</h:form>
The mechanism to do JMX to JSF resolution will be installed automatically using the new
JSF initialization specified here:
http://jira.jboss.com/jira/browse/JBAS-2593
The application developer is only required to provide a faces-config-jmx.xml containing
the mappings from managed bean names to JMX ObjectNames.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: