<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-37420196</id><updated>2012-02-07T07:21:16.403Z</updated><category term='mc'/><category term='JBoss'/><category term='conference'/><title type='text'>Kabir Khan</title><subtitle type='html'>News about what I am working on for JBoss at the moment.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-37420196.post-4805150703470581342</id><published>2011-11-23T15:29:00.000Z</published><updated>2011-11-30T17:29:19.886Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>JBoss AS 7 at Devoxx</title><content type='html'>I just got back from my first ever Devoxx, and it is a really great conference - I was very pleasantly surprised! The auditoriums for the main talks were amazing.&lt;br /&gt;&lt;br /&gt;Dimitris, Pete, Carlo, Dan, Lincoln, Aslak, Andrew, Max and I (apologies if I forgot anybody, there were quite a few of us) did a BOF on JBoss AS 7 with good attendance and some great questions from the audience. In hindsight I wish I'd prepared some demos for anticipated questions though.&lt;br /&gt;&lt;br /&gt;It was a very nice experience to hang around the JBoss booth and finally meet some real AS 7 users after having worked on AS 7 the past year and a half. Users of older versions of the application server seemed to be impressed by the much improved configuration and domain management of AS 7. From the chats I had that seemed to be the thing people were most impressed by/disliked the most in previous versions.&lt;br /&gt;&lt;br /&gt;Then there were numerous other talks by the usual JBoss suspects, all of which were great and packed. Since I'm biased and work on AS 7 I loved Andrew Rubinger and Dan Allen's talk on AS 7, and of course Pete Muir's talk on OpenShift. There will be more blogs from the rest of the team on our &lt;a href="http://www.jboss.org/events/"&gt;jboss.org events&lt;/a&gt; page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-4805150703470581342?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/4805150703470581342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=4805150703470581342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/4805150703470581342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/4805150703470581342'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2011/11/jboss-as-7-at-devoxx.html' title='JBoss AS 7 at Devoxx'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-1497183226596178903</id><published>2011-06-29T12:19:00.044+01:00</published><updated>2011-06-29T16:10:48.590+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>Getting started with JBoss Application Server 7.0.0 CR1 in minutes</title><content type='html'>JBoss Application Server 7.0.0 CR1 was released this morning (GMT). I'm sure Jason Greene, the AS 7 lead will &lt;a href="http://relation.to/Bloggers/Jason"&gt;post&lt;/a&gt; more details in the next day or two. In the meantime, I'd like to give you a very quick overview of how to get this up and running in a few minutes.&lt;br /&gt;&lt;br /&gt;The most time-consuming step is to grab it from &lt;a href="http://download.jboss.org/jbossas/7.0/jboss-7.0.0.CR1/jboss-7.0.0.CR1.zip"&gt;http://download.jboss.org/jbossas/7.0/jboss-7.0.0.CR1/jboss-7.0.0.CR1.zip&lt;/a&gt; (later releases will be accessible from the main download page &lt;a href="http://www.jboss.org/jbossas/downloads"&gt;http://www.jboss.org/jbossas/downloads&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Now go to your download directory and unzip it to somewhere, and then go to the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;jboss-7.0.0.CR1/bin folder&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[kabir ~/Downloads]&lt;br /&gt;$unzip -q jboss-7.0.0.CR1.zip -d ~/AS7&lt;br /&gt;&lt;br /&gt;[kabir ~/Downloads]&lt;br /&gt;$cd ~/AS7/jboss-7.0.0.CR1/bin/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now that the slow part is done, let's start it up in single server mode:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;[kabir ~/AS7/jboss-7.0.0.CR1/bin]&lt;br /&gt;$./standalone.sh &lt;br /&gt;=========================================================================&lt;br /&gt;&lt;br /&gt;JBoss Bootstrap Environment&lt;br /&gt;&lt;br /&gt;JBOSS_HOME: /Users/kabir/AS7/jboss-7.0.0.CR1&lt;br /&gt;&lt;br /&gt;JAVA: /Library/Java/Home//bin/java&lt;br /&gt;&lt;br /&gt;JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman&lt;br /&gt;&lt;br /&gt;=========================================================================&lt;br /&gt;&lt;br /&gt;11:55:25,759 INFO  [org.jboss.modules] JBoss Modules version 1.0.0.CR4&lt;br /&gt;11:55:26,009 INFO  [org.jboss.msc] JBoss MSC version 1.0.0.CR2&lt;br /&gt;11:55:26,077 INFO  [org.jboss.as] JBoss AS 7.0.0.CR1 "White Rabbit" starting&lt;br /&gt;11:55:26,955 INFO  [org.jboss.as] creating http management service using network interface (management) port (9990) securePort (-1)&lt;br /&gt;11:55:26,965 INFO  [org.jboss.as.logging] Removing bootstrap log handlers&lt;br /&gt;11:55:26,997 INFO  [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)&lt;br /&gt;11:55:27,101 INFO  [org.jboss.as.naming] (Controller Boot Thread) Activating Naming Subsystem&lt;br /&gt;11:55:27,157 INFO  [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi Subsystem&lt;br /&gt;11:55:27,188 INFO  [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem&lt;br /&gt;11:55:27,208 INFO  [org.jboss.as.naming] (MSC service thread 1-4) Starting Naming Service &lt;br /&gt;11:55:27,215 INFO  [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.0.Beta2&lt;br /&gt;11:55:27,229 INFO  [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.0.Beta3&lt;br /&gt;11:55:27,248 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.0.Beta3&lt;br /&gt;11:55:27,518 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-2) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java&lt;br /&gt;11:55:27,539 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) Listening on /127.0.0.1:9999&lt;br /&gt;11:55:27,575 WARN  [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-2) Unable to set the URLStreamHandlerFactory&lt;br /&gt;11:55:27,576 WARN  [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-2) Unable to set the ContentHandlerFactory&lt;br /&gt;11:55:27,590 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem&lt;br /&gt;11:55:27,593 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-4) Starting remote JMX connector&lt;br /&gt;11:55:27,604 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080&lt;br /&gt;11:55:27,732 INFO  [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.0.CR2)&lt;br /&gt;11:55:27,855 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) Bound data source [java:jboss/datasources/ExampleDS]&lt;br /&gt;11:55:28,255 INFO  [org.jboss.as.deployment] (MSC service thread 1-1) Started FileSystemDeploymentService for directory /Users/kabir/AS7/jboss-7.0.0.CR1/standalone/deployments&lt;br /&gt;11:55:28,267 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.0.CR1 "White Rabbit" started in 2750ms - Started 91 of 146 services (55 services are passive or on-demand)!&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;And that's it! JBoss Application Server 7.0.0 started in 2750ms. Leave it running for now.&lt;br /&gt;&lt;br /&gt;Go to &lt;a href="http://localhost:8080/"&gt;http://localhost:8080/&lt;/a&gt; for the welcome page which contains links to our admin console and documentation. Our documentation is being created online at &lt;a href="https://docs.jboss.org/author/display/AS7/Documentation"&gt;https://docs.jboss.org/author/display/AS7/Documentation&lt;/a&gt; and there is a fair bit of content already, but make sure you check in regularly since for our next release we will be focussing 100% on our documentation. The docs include a more extensive &lt;a href="https://docs.jboss.org/author/display/AS7/Getting+Started+Developing+Applications+Guide"&gt;quick start guide&lt;/a&gt; than this.&lt;br /&gt;&lt;br /&gt;To deploy applications one way to do it is to copy them to the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;jboss-7.0.0.CR1/standalone/deployments&lt;/span&gt; folder. Since this is not a Java EE tutorial, let's use the first example war I could find online:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;[kabir ~/AS7]&lt;br /&gt;$curl http://gwt-examples.googlecode.com/files/Calendar.war &gt; Calendar.war&lt;br /&gt;% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current&lt;br /&gt;Dload  Upload   Total   Spent    Left  Speed&lt;br /&gt;100  529k  100  529k    0     0   312k      0  0:00:01  0:00:01 --:--:--  356k&lt;br /&gt;&lt;br /&gt;[kabir ~/AS7]&lt;br /&gt;$cp Calendar.war jboss-7.0.0.CR1/standalone/deployments/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now in the terminal window where you started AS 7 you should see that the application has been deployed:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;11:55:28,267 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.0.CR1 "White Rabbit" started in 2750ms - Started 91 of 146 services (55 services are passive or on-demand)&lt;br /&gt;12:05:13,713 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "Calendar.war"&lt;br /&gt;12:05:14,262 INFO  [org.jboss.web] (MSC service thread 1-3) registering web context: /Calendar&lt;br /&gt;12:05:14,290 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "Calendar.war"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you go to &lt;a href="http://localhost:8080/Calendar"&gt;http://localhost:8080/Calendar&lt;/a&gt; you should see the deployed web app.&lt;br /&gt;&lt;br /&gt;See the &lt;a href="https://docs.jboss.org/author/display/AS7/Documentation"&gt;docs&lt;/a&gt; for more information about how to make JBoss AS 7 work for you! &lt;br /&gt;&lt;br /&gt;And please report any issues at our &lt;a href="http://community.jboss.org/en/jbossas/as7_users?view=discussions"&gt;users forum&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-1497183226596178903?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/1497183226596178903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=1497183226596178903' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/1497183226596178903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/1497183226596178903'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2011/06/getting-started-with-jboss-application.html' title='Getting started with JBoss Application Server 7.0.0 CR1 in minutes'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-9026675013842422777</id><published>2010-07-12T10:29:00.000+01:00</published><updated>2010-07-12T10:29:53.468+01:00</updated><title type='text'>Microcontainer Inspector Tool Update</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;The &lt;a href="http://kabir-khan.blogspot.com/2010/03/microcontainer-inspector-tool.html"&gt;Microcontainer Inspector Tool&lt;/a&gt; build did not work following the move to our new Maven repository at JBoss. I have updated the build and also changed the packaging to create a client jar and a server jar to be deployed. The Installation section of the &lt;a href="http://kabir-khan.blogspot.com/2010/03/microcontainer-inspector-tool.html"&gt;original post&lt;/a&gt; have been updated with the new instructions.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;This has made me wonder if the build will work for people who do NOT have the JBoss maven repositories set up as described &lt;a href="http://community.jboss.org/wiki/MavenGettingStarted-Developers"&gt;here&lt;/a&gt;. If you are trying to build it and it does not work for you please leave me a comment and I'll fix the build.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-9026675013842422777?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/9026675013842422777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=9026675013842422777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/9026675013842422777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/9026675013842422777'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2010/07/microcontainer-inspector-tool-update.html' title='Microcontainer Inspector Tool Update'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-8273222582839831637</id><published>2010-05-14T11:57:00.000+01:00</published><updated>2010-05-14T11:57:03.271+01:00</updated><title type='text'>JBoss User Group Belgium</title><content type='html'>I've been invited to talk at the &lt;a href="http://jbug.be/"&gt;Belgian JBoss User Group&lt;/a&gt;&amp;nbsp;near Antwerp on 3rd June. The title of my talk will be "What's Cooking in JBoss AS 6" and I will talk about our current development model, ongoing optimizations and give a high-level overview of the new projects in AS 6 such as &lt;a href="http://seamframework.org/Weld"&gt;Weld&lt;/a&gt;, &lt;a href="http://www.jboss.org/resteasy"&gt;RestEasy&lt;/a&gt;, &lt;a href="http://www.jboss.org/hornetq"&gt;HornetQ&lt;/a&gt;&amp;nbsp;and many more.&lt;br /&gt;&lt;br /&gt;Hope to see you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-8273222582839831637?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/8273222582839831637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=8273222582839831637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/8273222582839831637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/8273222582839831637'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2010/05/jboss-user-group-belgium.html' title='JBoss User Group Belgium'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-3650669311375533589</id><published>2010-05-04T20:29:00.000+01:00</published><updated>2010-05-04T20:29:37.466+01:00</updated><title type='text'>JSR-330 and Qualifiers in the JBoss Microcontainer</title><content type='html'>The latest &lt;a href="http://www.jboss.org/jbossmc"&gt;JBoss Microcontainer&lt;/a&gt; &lt;a href="http://anonsvn.jboss.org/repos/jbossas/projects/kernel/tags/2.2.0.Alpha9/"&gt;jboss-kernel 2.2.0.Alphas&lt;/a&gt; contain support for the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Inject&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Qualifier&lt;/span&gt; annotations from &lt;a href="http://jcp.org/en/jsr/detail?id=330"&gt;JSR-330&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While most of the use of the JBoss Microcontainer in JBoss AS uses explicitly named injection, e.g.&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyDependency" class="org.jboss.test.Dependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;      &amp;lt;property name="dependency"&amp;gt;&amp;lt;inject bean="MyDependency"/&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;The above means that when deploying the &lt;i&gt;MyBean&lt;/i&gt; bean bean it will look up the &lt;i&gt;MyDependency&lt;/i&gt; bean by name and inject that instance into &lt;i&gt;MyBean&lt;/i&gt;'s dependency property.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Contextual injection &lt;/span&gt;&lt;br /&gt;We can also look up things by type, first let us see how to do this using xml. This has been supported by the Microcontainer for a while, so this might be familiar:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyDependency" class="org.jboss.test.Dependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;      &amp;lt;property name="dependency"&amp;gt;&amp;lt;inject/&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now if the definition of &lt;i&gt;MyBean&lt;/i&gt;'s class is: package org.jboss.test;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;public class Bean{&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   public void setDependency(Dependency dependency){&lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;When creating &lt;i&gt;MyBean&lt;/i&gt; this time, we have not given the name of the bean to use when configuring the dependency property. Instead the Microcontainer will check the type of the property, and find which beans are installed in the Microcontainer that can be cast to that type. In this case it finds &lt;i&gt;MyDependency&lt;/i&gt; and uses that. If there had been more beans that could be cast to this type, an error would have been thrown. We'll see later how qualifiers can be used to resolve the ambiguities.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Using @javax.inject.Inject&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Now let us do the same using annotations. We first need to install the beans into the MC, the simplest way is to use an xml file to define the beans:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyDependency" class="org.jboss.test.Dependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"/&amp;gt; &lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;Notice that we did not define any injection for the dependency property in this case, instead we use &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Inject&lt;/span&gt; on &lt;i&gt;MyBean&lt;/i&gt;'s class to define the injection: &lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test; &lt;br /&gt;&lt;br /&gt;import javax.inject.Inject; &lt;br /&gt;&lt;br /&gt;public class Bean{&lt;br /&gt;&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   @Inject&lt;br /&gt;   public void setDependency(Dependency dependency){ &lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   } &lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;What happens now is that when &lt;i&gt;MyBean&lt;/i&gt; is deployed we find the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Inject&lt;/span&gt; annotation on the &lt;i&gt;dependency&lt;/i&gt; property and this causes a lookup of the bean to be found. As in the last example it looks up the bean by type, and throws an error if more that one can be found. &lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Qualifiers to the rescue &lt;/span&gt;&lt;br /&gt;If we deploy the following beans:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="SomeDependency" class="org.jboss.test.SomeDependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestDependency" class="org.jboss.test.TestDependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"/&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;with the following classes&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class SomeDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class TestDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;/pre&gt;&lt;pre class="xml" name="code"&gt;import javax.inject.Inject;&lt;br /&gt;&lt;br /&gt;public class Bean{&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   @Inject&lt;br /&gt;   public void setDependency(Dependency dependency){&lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we have an ambiguity since both &lt;i&gt;TestDependency&lt;/i&gt; and &lt;i&gt;SomeDependency&lt;/i&gt; can be cast to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.test.Dependency&lt;/span&gt;. To give the Microcontainer a hint about which of these instances should be used we can use a qualifier. A qualifier is any annotation that has been annotated with the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Qualifier&lt;/span&gt; annotation. For example:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;import javax.inject.Qualifier;&lt;br /&gt;&lt;br /&gt;@Qualifier&lt;br /&gt;@Retention(RUNTIME)&lt;br /&gt;public @interface Test{&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we can use this qualifier on our beans by adding it to &lt;i&gt;TestDependency&lt;/i&gt;'s class and to the &lt;i&gt;Bean.dependency&lt;/i&gt; injection point:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;@Test&lt;br /&gt;public class TestDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;import javax.inject.Inject;&lt;br /&gt;&lt;br /&gt;public class Bean{&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   @Inject @Test&lt;br /&gt;   public void setDependency(Dependency dependency){&lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now the Microcontainer will look up all beans that can be cast to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.test.Dependency&lt;/span&gt; AND that have the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@org.jboss.test.Test&lt;/span&gt; annotation. In this case only &lt;i&gt;TestDependency&lt;/i&gt; satisfies those criteria and is used for injection.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Qualifiers via xml&lt;/span&gt;&lt;br /&gt;As part of implementing qualifiers in the Microcontainer we built in native support for qualifiers and came up with something somewhat more powerful that what is indicated by JSR-330. First let's deploy the classes from the previous example without any annotations:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class SomeDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class TestDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;import javax.inject.Inject;&lt;br /&gt;&lt;br /&gt;public class Bean{&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   public void setDependency(Dependency dependency){&lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;This time the injection and qualifier annotations are driven by xml:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="SomeDependency" class="org.jboss.test.SomeDependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestDependency" class="org.jboss.test.TestDependency"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier content="Annotation"&amp;gt;@org.jboss.test.Test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;      &amp;lt;property name="dependency"&amp;gt;&lt;br /&gt;         &amp;lt;inject&amp;gt;&lt;br /&gt;            &amp;lt;qualifier content="Annotation" type="Required"&amp;gt;@org.jboss.Test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;         &amp;lt;/inject&amp;gt;&lt;br /&gt;      &amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now, we're saying that &lt;i&gt;TestDependency&lt;/i&gt; provides the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@org.jboss.test.Test&lt;/span&gt; qualifier, and when injecting &lt;i&gt;Bean.dependency&lt;/i&gt; we want to inject any bean that is of type &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Dependency&lt;/span&gt; and that has the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@org.jboss.test.Test&lt;/span&gt; qualifier. As when using "real" annotations it will pick out the &lt;i&gt;TestDependency&lt;/i&gt; bean. The qualifier content is &lt;i&gt;Annotation&lt;/i&gt; which means the parser will try to create an annotation from the body of the qualifier annotation. When qualifier annotations are applied in this way, they do not need to be annotated with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@javax.inject.Inject&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;A qualifier does not have to be an annotation, simple strings can be used by omitting the content attribute:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="SomeDependency" class="org.jboss.test.SomeDependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestDependency" class="org.jboss.test.TestDependency"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;      &amp;lt;property name="dependency"&amp;gt;&lt;br /&gt;         &amp;lt;inject&amp;gt;&lt;br /&gt;            &amp;lt;qualifier type="Required"&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;         &amp;lt;/inject&amp;gt;&lt;br /&gt;      &amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;Qualifiers can also be used in other places supporting the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;inject&lt;/span&gt;&amp;nbsp;element, such as parameters to constructors and install methods.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Bean level qualifiers&lt;/span&gt;&lt;br /&gt;In the previous example we applied qualifiers to a particular property. As a convenience you can choose default qualifiers that should be applied when doing injection at bean level. This is useful when you have a lot of properties that need injecting, here is an example:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="SomeDependency" class="org.jboss.test.SomeDependency"/&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestDependency" class="org.jboss.test.TestDependency"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;   &amp;lt;bean name="SomeOtherDependency" class="org.jboss.test.SomeOtherDependency"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestOtherDependency" class="org.jboss.test.TestOtherDependency"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;qualifier&amp;gt;other&amp;lt;/qualifier&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;   &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;      &amp;lt;qualifier type="Required"&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;qualifier type="Optional"&amp;gt;other&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;property name="dependency"&amp;gt;&amp;lt;inject/&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;      &amp;lt;property name="otherDependency"&amp;gt;&amp;lt;inject/&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now we are saying that when doing contextual injection into &lt;i&gt;MyBean&lt;/i&gt;'s properties, the candidate beans MUST have the &lt;i&gt;test&lt;/i&gt; qualifier, and that the &lt;i&gt;other&lt;/i&gt; qualifier can be used to further strip out ambiguities. If we have the following bean classes:&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class SomeDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class TestDependency extends Dependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class SomeOtherDependency extends OtherDependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;public class TestOtherDependency extends OtherDependency{&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test;&lt;br /&gt;&lt;br /&gt;import javax.inject.Inject;&lt;br /&gt;&lt;br /&gt;public class Bean{&lt;br /&gt;   Dependency dependency;&lt;br /&gt;&lt;br /&gt;   OtherDependency otherDependency;&lt;br /&gt;&lt;br /&gt;   public void setDependency(Dependency dependency){&lt;br /&gt;      this.dependency = dependency;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void setOtherDependency(OtherDependency otherDependency){&lt;br /&gt;      this.otherDependency = otherDependency;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;then &lt;i&gt;TestDependency&lt;/i&gt; is used for &lt;i&gt;MyBean.dependency&lt;/i&gt; and &lt;i&gt;TestOtherDependency&lt;/i&gt; is used for injection into &lt;i&gt;MyBean.otherDependency&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Custom qualifiers&lt;/span&gt;&lt;br /&gt;If the above qualifiers are not enough to narrow down what you want to inject, you can create custom qualifiers as shown in this simple example. If we deploy the following beans we end up with &lt;i&gt;Dependency3&lt;/i&gt; being injected into &lt;i&gt;MyBean.dependency&lt;/i&gt;:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&amp;gt;&lt;br /&gt;   &amp;lt;bean name="TestMatcherAndParser"&lt;br /&gt;      class="org.jboss.test.kernel.qualifiers.support.TestMatcherAndParser"/&amp;gt;&lt;br /&gt;      &amp;lt;bean name="QualifierMatchers" class="org.jboss.kernel.spi.qualifier.QualifierMatchers"&amp;gt;&lt;br /&gt;         &amp;lt;constructor factoryMethod="getInstance"&amp;gt;&lt;br /&gt;      &amp;lt;/constructor&amp;gt;&lt;br /&gt;      &amp;lt;install method="addParser"&amp;gt;&lt;br /&gt;         &amp;lt;parameter&amp;gt;&amp;lt;inject bean="TestMatcherAndParser"/&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br /&gt;      &amp;lt;/install&amp;gt;&lt;br /&gt;      &amp;lt;install method="addMatcher"&amp;gt;&lt;br /&gt;         &amp;lt;parameter&amp;gt;&amp;lt;inject bean="TestMatcherAndParser"/&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br /&gt;      &amp;lt;/install&amp;gt;&lt;br /&gt;      &amp;lt;/bean&amp;gt; &lt;br /&gt;      &amp;lt;bean name="Dependency1" class="org.jboss.test.SomeDependency"&amp;gt;&lt;br /&gt;         &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;qualifier content="Test"&amp;gt;Hello-xxx&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;/bean&amp;gt;&lt;br /&gt;      &amp;lt;bean name="Dependency2" class="org.jboss.test.Dependency"&amp;gt;&lt;br /&gt;         &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;/bean&amp;gt;&lt;br /&gt;      &amp;lt;bean name="Dependency3" class="org.jboss.test.TestDependency"&amp;gt;&lt;br /&gt;         &amp;lt;qualifier&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;         &amp;lt;qualifier content="Test"&amp;gt;Hola-xxx&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;/bean&amp;gt;&lt;br /&gt;      &amp;lt;bean name="MyBean" class="org.jboss.test.Bean"&amp;gt;&lt;br /&gt;         &amp;lt;qualifier type="Required"&amp;gt;test&amp;lt;/qualifier&amp;gt;&lt;br /&gt;      &amp;lt;qualifier type="Required" content="Test"&amp;gt;xxx-Hola&amp;lt;/qualifier&amp;gt;&lt;br /&gt;    &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;/pre&gt;&lt;br /&gt;The magic behind understanding &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;content="Test"&lt;/span&gt; lives in the &lt;i&gt;TestMatcherAndParser&lt;/i&gt; bean which is installed via the &lt;i&gt;QualifierParser&lt;/i&gt; singleton:&lt;br /&gt;&lt;pre class="xml" name="code"&gt;package org.jboss.test.kernel.qualifiers.support;&lt;br /&gt;&lt;br /&gt;import java.util.Set;&lt;br /&gt;import org.jboss.beans.metadata.api.model.QualifierContent;&lt;br /&gt;import org.jboss.dependency.spi.ControllerContext;&lt;br /&gt;import org.jboss.kernel.spi.qualifier.QualifierMatcher;&lt;br /&gt;import org.jboss.kernel.spi.qualifier.QualifierParser;&lt;br /&gt;&lt;br /&gt;public class TestMatcherAndParser implements QualifierMatcher, QualifierParser{&lt;br /&gt;   public TestMatcherAndParser(){&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   //QualifierParser methods&lt;br /&gt;   public QualifierContent getHandledContent(){&lt;br /&gt;      return QualifierContent.getContent("Test");&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Object parseSupplied(ClassLoader cl, Object rawQualifier){&lt;br /&gt;      return new Supplied((String)rawQualifier);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Object parseWanted(ClassLoader cl, Object object){&lt;br /&gt;      return new Wanted((String)object);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   //QualifierMatcher methods&lt;br /&gt;   public Class getHandledType(){&lt;br /&gt;      return Wanted.class;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public boolean matches(ControllerContext context, Set&amp;lt;Object&amp;gt; suppliedQualifiers, Wanted qualifier){&lt;br /&gt;      for (Object supplied : suppliedQualifiers){&lt;br /&gt;         if (supplied instanceof Supplied)&lt;br /&gt;            return qualifier.getString().equals(((Supplied)supplied).getString());&lt;br /&gt;      }&lt;br /&gt;      return false;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   private static class Supplied{&lt;br /&gt;      String string;&lt;br /&gt;&lt;br /&gt;      public Supplied(String string){&lt;br /&gt;         int i = string.indexOf("-xxx");&lt;br /&gt;         if (i &amp;gt;= 0)&lt;br /&gt;            string = string.substring(0, i);&lt;br /&gt;            this.string = string;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public String getString(){&lt;br /&gt;         return string;&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;- - - - - - - - -&lt;br /&gt;package org.jboss.test.kernel.qualifiers.support;&lt;br /&gt;&lt;br /&gt;public class Wanted{&lt;br /&gt;   String string;&lt;br /&gt;   public Wanted(String string){&lt;br /&gt;      this.string = string;&lt;br /&gt;      if (string.startsWith("xxx-"))&lt;br /&gt;         string = string.substring(4);&lt;br /&gt;         this.string = string;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;   public String getString(){&lt;br /&gt;      return string;&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;TestMatcherAndParser&lt;/i&gt; implements the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;QualifierParser&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;QualifierMatcher&lt;/span&gt; interfaces. The &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;getHandledContent()&lt;/span&gt; method is what links this parser to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;content="Test"&lt;/span&gt;. When parsing a qualifier with that content type supplied from from a bean (e.g. the qualifier entries in &lt;i&gt;Dependency1&lt;/i&gt; and &lt;i&gt;Dependency3&lt;/i&gt;) we end up in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;parseSupplied()&lt;/span&gt; method which creates an instance of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt;. Similarly when parsing a qualifier with that content type from a bean wanting to inject something we end up in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;parseWanted()&lt;/span&gt; method which creates an instance of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;So for &lt;i&gt;Dependency1&lt;/i&gt; we end up with a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt; containing the string &lt;i&gt;Hello&lt;/i&gt; and for &lt;i&gt;Dependency3&lt;/i&gt; we end up with a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt; containing the string &lt;i&gt;Hola&lt;/i&gt;. We end up with a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt; containing the string &lt;i&gt;Hola&lt;/i&gt; for &lt;i&gt;MyBean&lt;/i&gt;.&lt;br /&gt;Next when checking the qualifiers when doing injection into &lt;i&gt;MyBean&lt;/i&gt; and checking&lt;br /&gt;&lt;br /&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;qualifier type="Required" content="Test"&amp;gt;xxx-Hola&amp;lt;/qualifier&amp;gt;&lt;/pre&gt;&lt;br /&gt;behind the scenes the microcontainer finds all the contexts that are of the correct type and which have supplied qualifiers where type &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;content="Test"&lt;/span&gt;, i.e. the contexts &lt;i&gt;Dependency1&lt;/i&gt; and &lt;i&gt;Dependency3&lt;/i&gt;. Then for each of these contexts it calls &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;matches()&lt;/span&gt; with all the qualifiers for the candidate bean along with the parsed &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt; qualifier for MyBean.&lt;br /&gt;&lt;br /&gt;When checking &lt;i&gt;Dependency1&lt;/i&gt; it calls &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;matches() &lt;/span&gt;with the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt; containing &lt;i&gt;Hello&lt;/i&gt; and the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt; containing &lt;i&gt;Hola&lt;/i&gt; which does not match, and for &lt;i&gt;Dependency2&lt;/i&gt; it calls &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;matches()&lt;/span&gt; with the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt; containing &lt;i&gt;Hello&lt;/i&gt; and the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt; containing &lt;i&gt;Hola&lt;/i&gt; which matches, meaning that only &lt;i&gt;Dependency1&lt;/i&gt; matches all the criteria. When calling &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;matches()&lt;/span&gt; the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ControllerContext&lt;/span&gt; (with information about the candidate bean's name, type, instance and other things) is passed in as well.&lt;br /&gt;&lt;br /&gt;In the provided example we are only doing a silly little check where the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Supplied&lt;/span&gt; gets rid of the final &lt;i&gt;-xxx&lt;/i&gt; and the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Wanted&lt;/span&gt; gets rid of the leading &lt;i&gt;-xxx&lt;/i&gt;. The point here is that it is simple to implement more advanced qualifier checking than is provided out-of-the-box, and this mechanism has already been used to provide support for matching OSGi properties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-3650669311375533589?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/3650669311375533589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=3650669311375533589' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/3650669311375533589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/3650669311375533589'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2010/05/jsr-330-and-qualifiers-in-jboss.html' title='JSR-330 and Qualifiers in the JBoss Microcontainer'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-5446961899301191411</id><published>2010-03-08T17:33:00.002Z</published><updated>2010-07-12T10:23:30.276+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>Microcontainer Inspector Tool</title><content type='html'>For those of you familiar with the Twiddle application, which&amp;nbsp;allows you to inspect the JMX MBeans in JBoss Application Server, I have created a similar tool for use with the &lt;a href="http://www.jboss.org/jbossmc"&gt;JBoss Microcontainer&lt;/a&gt;. This means that you can now manage and inspect ALL the beans in the JBoss Application Server (or in a standalone Microcontainer application). I'll briefly outline the existing functionality below and how to use it. The functionality supported so far is quite basic, but hopefully it will be useful to somebody. I'll be adding more commands to it when I have the time.&lt;br /&gt;&lt;br /&gt;Implementing commands to extend the feature set is very easy. If you would like to be a Microcontainer committer, this is a great opportunity to get involved by implementing something simple while you get to know the code and the team. If you are interested please contact me &lt;a href="mailto:kabir.khan@jboss.com"&gt;privately&lt;/a&gt; or via our &lt;a href="http://community.jboss.org/en/jbossmc/dev?view=discussions"&gt;forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Installation&lt;/span&gt;&lt;br /&gt;If you want to run this in a standalone environment you simply create an instance of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.microcontainer.mcinspector.bean.McInspector&lt;/span&gt; and pass it your bootstrapped kernel as shown in the test cases. To install it into a JBoss Application Server installed to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;~/jbossas/&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check out the source from &lt;a href="http://anonsvn.jboss.org/repos/jbossas/projects/mc-tools/mcinspector/trunk/"&gt;http://anonsvn.jboss.org/repos/jbossas/projects/mc-tools/mcinspector/trunk/&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Build it by going to the checkout directory and run &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;mvn install&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Copy &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;target/mcinspector-server.jar&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;~/jbossas/server/default/deploy&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Copy &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;target/mcinspector.jar&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;~/jbossas/bin&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Copy &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;src/main/resources/mcinspector.sh&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;~/jbossas/bin&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;chmod 755 ~/jbossas/bin/mcinspector.sh&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;That's all, now start up JBoss as normal, and in another terminal:&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cd ~/jbossas/bin&lt;/span&gt;. This last terminal is the one we will be using to try out the commands in the rest of this demo.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Help&lt;/span&gt;&lt;br /&gt;To get help you enter: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./mcinspector.sh help&lt;/span&gt;, which gives you an overview of the commands available. The command and its output are shown below:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh help&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Available commands:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;help &amp;nbsp; Prints the list of available commands.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;list &amp;nbsp; Lists all the available contexts.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;change  Changes the state of the context.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;bean &amp;nbsp; Inspect a particular bean.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;For more information about a particular command, enter 'help '.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 1026ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also get more information about a particular command, e.g.:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh help list&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Lists all the contexts in the controller.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Usage: list [-o | -v] [ []*]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;If no state arguments are passed in all states will be checked for contexts. Otherwise&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;only the passed in states will be checked&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Options:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-o  Overview. Show all the states in the controller with the number of contexts in each&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; Normally only states with contexts will be shown&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-e  Error. Show only the contexts which are in the error state. Can not be used in combination &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; with state arguments.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-v  Verbose. Show extra information for each context. Contexts with unresolved dependencies&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; will&amp;nbsp;have a '*' after their name. Additional information is in the format&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; (ControllerMode, Current state)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 523ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;List&lt;/span&gt;&lt;br /&gt;Let's try out the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;list&lt;/span&gt; command. As promised in the help section, it lists all the states, in ascending order, in the Application Server's main controller and displays the number of beans found in each state:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh list -o&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NOT INSTALLED: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PREPARSE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PARSE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;POSTPARSE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PREDESCRIBE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DESCRIBE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CLASSLOADER: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;POSTCLASSLOADER: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PREREAL: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;REAL: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PREINSTALL: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DESCRIBED: 33 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;INSTANTIATED: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CONFIGURED: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CREATE: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;START: 0 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;INSTALLED: 997 contexts&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 509ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To view which beans are in the different states we execute &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./mcinspector.sh list&lt;/span&gt;. Since there are lot of beans in the Application Server I have deleted most of the output below:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DESCRIBED: &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;JBossLogManagerContextSelectorService&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioDatagramChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.local.DefaultLocalClientChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.local.DefaultLocalServerChannelFactory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ModClusterListener&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ModClusterService&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;INSTALLED: &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;JBossServer&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ClassLoaderSystem&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ClassLoaderDomain&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ClassLoading&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bootstrap-classloader:0.0.0$MODULE&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bootstrap-classloader:0.0.0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;stdio-classloader:0.0.0$MODULE&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;stdio-classloader:0.0.0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;JBossStdioSystemOutStream&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;JBossStdioSystemErrStream&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;…&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspectorCommands&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspector&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.kernel:service=McInspector&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspectorHelpCommand&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspectorListCommand&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspectorChangeCommand&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;McInspectorBeanCommand&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;file:///Users/kabir/sourcecontrol/jbossas/trunk/subversion/build/target/jboss-6.0.0-SNAPSHOT/server/default/deploy/mcinspector.jar&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 596ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get more information about the contexts for a given state, you can do &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./mcinspector.sh list -v DESCRIBED&lt;/span&gt;. The verbose output currently shows the controller mode of the beans' contexts, along with the current state of the bean. The * means that the context has unresolved dependencies.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh list -v DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DESCRIBED: &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;JBossLogManagerContextSelectorService* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioServerSocketChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.socket.oio.OioDatagramChannelFactory* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.local.DefaultLocalClientChannelFactory (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;org.jboss.netty.channel.local.DefaultLocalServerChannelFactory (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ModClusterListener* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ModClusterService* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;HAModClusterService* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ModClusterConfig* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DynamicLoadBalanceFactorProvider* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;AverageSystemLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;OperatingSystemLoadMetricSource (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;BusyConnectorsLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ThreadPoolLoadMetricSource* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SimpleLoadBalanceFactorProvider* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SystemMemoryUsageLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;HeapMemoryUsageLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RequestCountLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ReceiveTrafficLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SendTrafficLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RequestProcessorLoadMetricSource* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ActiveSessionsLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SessionLoadMetricSource* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ConnectionPoolUsageMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ConnectionPoolLoadMetricSource* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;MBeanAttributeLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;MBeanAttributeRatioLoadMetric* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;MBeanQueryLoadMetricSource* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;XnioProvider* (ON_DEMAND, DESCRIBED)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 479ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Bean&lt;/span&gt;&lt;br /&gt;To get more information about one or more beans in particular, you can run the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bean&lt;/span&gt; command. e.g.:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh bean ModClusterListener ModClusterService&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Name='ModClusterListener'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;bean type=org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;mode=ON_DEMAND&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;required state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;context type=org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;unresolved dependencies=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Name='ModClusterService'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;bean type=org.jboss.modcluster.ModClusterService&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;mode=ON_DEMAND&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;required state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;context type=org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;unresolved dependencies=5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 485ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get some more information about the dependencies, you can pass in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-d&lt;/span&gt; flag&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh bean -d ModClusterListener&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Name='ModClusterListener'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;bean type=org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;mode=ON_DEMAND&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;required state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;context type=org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;unresolved dependencies=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;Resolved dependencies:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;Unresolved dependencies:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;iDependOn=ModClusterService; whenRequired=INSTANTIATED; dependentState=INSTALLED&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-u&lt;/span&gt; flag is the same as &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-d&lt;/span&gt; apart from it does not look for resolved dependencies:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh bean -d ModClusterListener&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Name='ModClusterListener'&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;bean type=org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;mode=ON_DEMAND&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;required state=DESCRIBED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;context type=org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;unresolved dependencies=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;Unresolved dependencies:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;iDependOn=ModClusterService; whenRequired=INSTANTIATED; dependentState=INSTALLED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 492ms&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Change&lt;/span&gt;&lt;br /&gt;Finally there is the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;change&lt;/span&gt; command which attempts to change the state of a bean, so it can for example be used to temporarily disable a bean. Only do this if you know what you are doing! For example, let us try to stop the bean that implements the MC Inspector's&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bean&lt;/span&gt; command:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh change INSTANTIATED McInspectorBeanCommand&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Changed 'McInspectorBeanCommand' to INSTANTIATED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Handled in 473ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This has stopped the bean implementing the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bean&lt;/span&gt; command, so &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bean&lt;/span&gt; no longer appears in the list of available commands:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$./mcinspector.sh help&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Available commands:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;help    Prints the list of available commands.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;list    Lists all the available contexts.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;change  Changes the state of the context.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;For more information about a particular command, enter 'help &lt;/span&gt;&lt;command&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;'.&lt;br /&gt;Handled in 497ms&lt;/span&gt; &lt;br /&gt;And it appears in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;INSTANTIATED&lt;/span&gt; state:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; $./mcinspector.sh list INSTANTIATED -v&lt;br /&gt;INSTANTIATED: &lt;br /&gt;McInspectorBeanCommand (AUTOMATIC, INSTANTIATED)&lt;br /&gt;Handled in 488ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let us make it installed again:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; $./mcinspector.sh change INSTALLED McInspectorBeanCommand&lt;br /&gt;Changed 'McInspectorBeanCommand' to INSTALLED&lt;br /&gt;Handled in 474ms&lt;/span&gt; &lt;br /&gt;Now &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bean&lt;/span&gt; appears in the list of available commands again:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; $./mcinspector.sh help&lt;br /&gt;Available commands:&lt;br /&gt;&amp;nbsp;&amp;nbsp;help    Prints the list of available commands.&lt;br /&gt;&amp;nbsp;&amp;nbsp;list    Lists all the available contexts.&lt;br /&gt;&amp;nbsp;&amp;nbsp;change  Changes the state of the context.&lt;br /&gt;&amp;nbsp;&amp;nbsp;bean    Inspect a particular bean.&lt;br /&gt;For more information about a particular command, enter 'help &lt;/span&gt;&lt;command&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;'.&lt;br /&gt;Handled in 480ms&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;/command&gt;&lt;/command&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-5446961899301191411?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/5446961899301191411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=5446961899301191411' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/5446961899301191411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/5446961899301191411'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2010/03/microcontainer-inspector-tool.html' title='Microcontainer Inspector Tool'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-3590334937564903765</id><published>2010-02-19T11:01:00.000Z</published><updated>2010-02-19T12:07:15.848Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>Optimizing the JBoss Microcontainer</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Helvetica;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://in.relation.to/Bloggers/MC22SeriesAndNewJBossAS6M2"&gt;Ales&lt;/a&gt; linked to the ongoing optimization work before I had planned on writing anything, so here is a very rushed overview of what is going on :-)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For &lt;a href="http://bstansberry.wordpress.com/2010/02/16/jboss-application-server-6-0-0-m2-is-out/"&gt;JBoss Application Server 6.0.0.M2&lt;/a&gt; a lot of work went in to optimizing the boot time. Some of the work done by the AS team that really made a difference was optimizing the algorithm to add the deployers, and to make things like the admin console start when first accessed rather than use eager loading.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As part of this, for JBoss Kernel 2.2.0.Alpha6 I took a look at optimizing the dependency resolution algorithm of the Microcontainer, which is used to install and wire together the services the core of the application server. The dependency resolution algorithm is used to determine if the beans implementing the services can be moved through the states on the way from being put into the Microcontainer to being fully up and running. Initially I did work on a &lt;a href="http://community.jboss.org/thread/146838"&gt;fully optimized prototype&lt;/a&gt;, but this was too big and risky an undertaking for the short timeframe and did not yield the expected results. This prototype is far from "finished" and there is plenty of room for improvement, so I might come back to it at some later stage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So instead I went through and used&amp;nbsp;&lt;a href="http://www.ej-technologies.com/products/jprofiler/overview.html"&gt;JProfiler&lt;/a&gt;&amp;nbsp;to see what is taking the time in the dependency resolution algorithm that we have &lt;a href="http://community.jboss.org/thread/147883"&gt;today&lt;/a&gt;. What really made a difference here was that I found that when a bean can not be moved to the next state we were looking up its unresolved dependency three times in the Microcontainer. Wrapping these three calls into one gave a lot less overhead. That was the main optimization we had time for for JBoss Kernel 2.2.0.Alpha6 which is what is used in AS 6.0.0.M2.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since then I have been working on quite a few other optimizations that you can see on the &lt;a href="http://community.jboss.org/community/jbossmc/dev?view=discussions&amp;amp;start=0"&gt;Microcontainer Development Forum&lt;/a&gt;, more specifically &lt;a href="http://community.jboss.org/thread/148044"&gt;here&lt;/a&gt;, which so far significantly improve the boot time of 6.0.0.M2 in my local benchmarks, and I am nowhere not done yet. The fixes are mainly making sure that objects used in maps are properly hashed, and making objects that are expensive to create less expensive to create. All these fixes will all go into the next community release of JBoss AS: 6.0.0.M3.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another thing is that John Bailey is currently integrating JBoss Virtual File System 3 into AS. VFS is used as an abstraction layer to read files from several different sources, and VFS 3 promises to really speed things up when reading from zipped archives. This is something that happens a lot in the application server, when scanning archives for deployment descriptors and annotations, and loading classes and so on. So it will be very exciting to see this in JBoss AS 6.0.0.M3!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-3590334937564903765?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/3590334937564903765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=3590334937564903765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/3590334937564903765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/3590334937564903765'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2010/02/optimizing-jboss-microcontainer.html' title='Optimizing the JBoss Microcontainer'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-8596229716013379474</id><published>2009-10-05T16:00:00.000+01:00</published><updated>2009-10-05T19:36:10.233+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>Findbugs Filter Creation Tool</title><content type='html'>We have started using findbugs on some of the projects I am working on. It seems pretty useful, and it has picked out some bugs already. It does however, report quite a few bugs that are not a problem. Luckily, findbugs provides &lt;a href="http://findbugs.sourceforge.net/manual/filter.html"&gt;filters&lt;/a&gt; to be able to exclude the bugs you don't want to include.&lt;br /&gt;&lt;br /&gt;After spending a day on creating the filter files manually, I found it to be a bit fiddly and time-consuming to create these by hand. I tried looking to see if there was a way to automate this a bit more. I might be wrong, but I could not find a tool to do this. Hopefully the below will help others in the same situation.&lt;br /&gt;&lt;br /&gt;When you run a findbugs check it generates an output file. I do this via the maven plugin: &lt;code&gt;mvn findbugs:check&lt;/code&gt; which yields a file called &lt;code&gt;findbugsCheck.xml&lt;/code&gt;. This file references an xsl stylesheet:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;?xml-stylesheet type="text/xsl" href="http://findbugs.sourceforge.net/xsl/default.xsl"?&amp;gt;&lt;/pre&gt;&lt;br /&gt;so if you open this file in your browser you will see something like this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_TXHtTxzXe9g/SsoVOiaq2aI/AAAAAAAAAAM/PuBbHYVHcjo/s1600-h/original.png"&gt;&lt;img style="width: 320px; height: 182px;" src="http://1.bp.blogspot.com/_TXHtTxzXe9g/SsoVOiaq2aI/AAAAAAAAAAM/PuBbHYVHcjo/s320/original.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5389143243603237282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I created another version of default.xsl called &lt;a href="http://anonsvn.jboss.org/repos/jbossas/projects/findbugs-filtercreator/trunk/filterHelper.xsl"&gt;filterHelper.xsl&lt;/a&gt;. Modifying findbugsCheck.xml to use this stylesheet:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;?xml-stylesheet type="text/xsl" href="http://anonsvn.jboss.org/repos/jbossas/projects/findbugs-filtercreator/trunk/filterHelper.xsl"?&amp;gt;&lt;/pre&gt;&lt;br /&gt;gives output that looks much the same&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_TXHtTxzXe9g/SsoVPJWp-cI/AAAAAAAAAAU/kAGMTE6CroM/s1600-h/helper.png"&gt;&lt;img style="width: 320px; height: 246px;" src="http://2.bp.blogspot.com/_TXHtTxzXe9g/SsoVPJWp-cI/AAAAAAAAAAU/kAGMTE6CroM/s320/helper.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5389143254055385538" /&gt;&lt;/a&gt;&lt;br /&gt;Now each bug has a a checkbox next to it. Check the bugs you want to create an exclude filter for, press the "Create Filter" button and the textarea gets populated with the &lt;code&gt;Match&lt;/code&gt; elements for each bug.&lt;br /&gt;&lt;br /&gt;You can then copy the results into a file, in my projects they are under &lt;code&gt;src/main/resources/findbugs/exclude.xml&lt;/code&gt;. For example:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;FindBugsFilter&amp;gt;&lt;br /&gt;&amp;lt;Match&amp;gt;&lt;br /&gt;   &amp;lt;Class name="org.jboss.system.ServiceMBeanSupport"/&amp;gt;&lt;br /&gt;   &amp;lt;Field name="SERVICE_CONTROLLER_SIG"/&amp;gt;&lt;br /&gt;   &amp;lt;Bug pattern="MS_PKGPROTECT"/&amp;gt;&lt;br /&gt;&amp;lt;/Match&amp;gt;&lt;br /&gt;&amp;lt;!-- Rest of exclusions here --&amp;gt;&lt;br /&gt;&amp;lt;/FindBugsFilter&amp;gt;&lt;/pre&gt;&lt;br /&gt;Then set maven up to use the filter in the plugins section:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;findbugs-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;2.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;   &amp;lt;configuration&amp;gt;&lt;br /&gt;      &amp;lt;excludeFilterFile&amp;gt;${project.build.outputDirectory}/findbugs/exclude.xml&amp;lt;/excludeFilterFile&amp;gt;&lt;br /&gt;       &amp;lt;debug&amp;gt;true&amp;lt;/debug&amp;gt;&lt;br /&gt;   &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-8596229716013379474?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/8596229716013379474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=8596229716013379474' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/8596229716013379474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/8596229716013379474'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2009/10/findbugs-filter-creation.html' title='Findbugs Filter Creation Tool'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_TXHtTxzXe9g/SsoVOiaq2aI/AAAAAAAAAAM/PuBbHYVHcjo/s72-c/original.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37420196.post-864921998278858608</id><published>2009-05-27T11:22:00.000+01:00</published><updated>2009-05-27T14:50:22.033+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='mc'/><title type='text'>Microcontainer Downloads</title><content type='html'>While getting up to speed after joining the &lt;a href="http://www.jboss.org/jbossmc/"&gt;JBoss Microcontainer&lt;/a&gt; project, I have updated our &lt;a href="http://www.jboss.org/jbossmc/downloads/"&gt;downloads&lt;/a&gt; section with the latest releases.&lt;br /&gt;&lt;br /&gt;The old JBoss Microcontainer 1.0.x releases can still be found on &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=22866&amp;amp;package_id=137237"&gt;Sourceforge&lt;/a&gt;. Since those early releases were uploaded the JBoss Microcontainer has developed a lot, and it is now the umbrella for several sub-projects.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.jboss.org/jbossmc/downloads/"&gt;downloads&lt;/a&gt; section has been split into two main categories:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;The &lt;a href="http://www.jboss.org/jbossmc/downloads/framework/"&gt;Frameworks&lt;/a&gt; category contains the downloads most convenient for end users:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/jbossmc/downloads/framework/jboss-kernel"&gt;Kernel&lt;/a&gt;: This is what most people think of when they hear "Microcontainer". It contains the core of the Microcontainer and its dependencies. In brief this is the core state machine with the dependency injection framework, with support for bean metadata supplied via xml or annotations.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/jbossmc/downloads/framework/jboss-deployers"&gt;JBoss Virtual Deployment Framework&lt;/a&gt;: This contains all the individual projects from the JBoss Microcontainer project. It consists of the Kernel, advanced classloading capabilities and deployment support, as consumed by JBoss Application Server and &lt;a href="http://www.jboss.org/community/wiki/JBossReloadedDesign"&gt;JBoss Reloaded&lt;/a&gt;. &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The &lt;a href="http://www.jboss.org/jbossmc/downloads/individual"&gt;Individual Projects&lt;/a&gt; section contains the independent releases of the JBoss Microcontainer sub-projects. Only the binaries and sources are currently contained in the downloads, with no dependencies. The sources are however buildable using maven (version 2.0.9 or later), so you can get all the dependencies and javadoc.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The current releases on the downloads pages take the already released latest releases of the MC projects. Over the next few releases the plan is to put in a lot of effort in improving our consumables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/37420196-864921998278858608?l=kabir-khan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kabir-khan.blogspot.com/feeds/864921998278858608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=37420196&amp;postID=864921998278858608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/864921998278858608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37420196/posts/default/864921998278858608'/><link rel='alternate' type='text/html' href='http://kabir-khan.blogspot.com/2009/05/microcontainer-downloads.html' title='Microcontainer Downloads'/><author><name>Kabir Khan</name><uri>http://www.blogger.com/profile/07617777936175446685</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
