[jboss-jira] [JBoss JIRA] Resolved: (JBAS-2595) JMX Resolver for JSF

Stan Silvert (JIRA) jira-events at lists.jboss.org
Wed Apr 8 14:41:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBAS-2595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Silvert resolved JBAS-2595.
--------------------------------

    Resolution: Rejected


This was a nice idea and I even implemented a version of it long ago.  It just wasn't good enough or important enough to make it in.   What might be more interesting would be an EL resolver for MC beans.  But that would also have limited usefulness.  So I'm just resolving this as rejected.

> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list