Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

I have seen several postings asking about integration between Seam and JMX.

Here is a simple approach for registering a POJO as an MBean and a Component.


  • Use Seam to register an MBean so that it can be configured via JMX Console
  • Inject the MBean like any other component


Here is the configuration:

	<jmx:managed-bean name="echoService"

Here is injections:

	private EchoService echoService;

Here is the component code:

public class ManagedBean {

	private String objectName;

	private Class<?> type;

	private Class<?> implementation;

	private String agentId;

	private ObjectName _objectName;

	private MBeanServer server;

	private Object mbean;

	// setters/getters

	public void create() throws Exception {
		List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(agentId);
		server = servers.get(0);
		_objectName = new ObjectName(objectName);
		mbean = MBeanProxy.create(implementation, type, _objectName, server);

	public void destroy() throws Exception {

	public Object getMBean() {
		return mbean;

Here is the full code: