Saturday, 29 December 2007
Why JBoss Microcontainer doesn't work for me
First off the JBoss Microcontainer is a big step forward for JBoss. It will hopefully let the meaty parts of the appserver unhinge from the gooey stuff that is the API. However, I can't help but not think that it is that big of the deal for the rest of the world. First off, since Spring added annotations as seemingly first class citizens, I think the only profound step forward for the JBoss Microcontainer is:
- Hibernate Annotations/EJB3 as first class citizens (you can even scan a directory for them with an ant task from a plain Java application)
- Designed rather than organic. This is like "gee if we had it to do all over today we would..." This is especially apparent when you DO write XML. Spring's XML has always made me gag. The JBoss MC ones only make me slightly sick to my stomach.
- Persisted attributes. This was most of the point really. Somewhere this was supposed to be configurable to different stores. This seems under documented.
Springy people are going to comment and tell me how wrong I am about even these things and that is fine, but I've actually looked and at least run both where they'll just run around looking for anything that is positive about anything else and "correct" (I only like one "evangelist" in the world and think the rest of you are techno-scum and worse the kind that aren't paid to do it are messed in the head to boot) :-).
For JBoss users the Microcontainer is probably going to be a snoozer. They're probably going to find more third-party reference material and tutorials on Spring and even Guice. There probably will be better Eclipse tools and other tool integration for Spring. For JBoss internals this will probably be a big deal. For users of OTHER appservers, this is a biggy as JBoss is developing some really good stuff that will no longer be strictly bound to JBoss. In some ways I hope this along with OSGi support shrinks JBossAS and allows it to finally be right-sizable by dumb people.
For Meldware this misses the mark because it still "by Java developers and for Java developers". It doesn't abstract configuration from Java. Meldware users don't as a whole care much about Java. The developers mostly whine about it as it is a means to an ends and not all that interesting in itself.
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.test.javabean.support.SimpleBean">
<property name="ADouble">3.14e12</property>
<property name="ADate">Jan 01 00:00:00 CET 2001</property>
<property name="ABigDecimal">12e4</property>
<property name="ABigInteger">123456</property>
<property name="abyte">12</property>
</javabean>
How many system administrators do you think really want to think about WHAT class we implemented the SMTP Protocol in? How many do you think want to know what class we implemented the socket listener in? Probably pretty few. They may want to declare another socket bound to the same SMTLSSL service they defined but I can't imagine that they want to type all this org crap. Secondly try writing a tool that can not only read, write but update this!!! (I did for JBossMX the MC predecessor and it hurts my head)
For us we want a way to use Java to define a service "smtp" and then configure the service:
exampleService { type = example setting = "settingValue" anotherSetting = 4 }bkernel prototype out of a unit test
Where did all the Java crap go? It is behind the definition of "example" which is either an annotation or in another file somewhere. It probably never changes so WHO CARES. It is a "type" of thing to be configured. Indeed this may also look like:
... dn: ou=Services,dc=buni,dc=org objectClass: organizationalunit objectClass: top ou: Services dn: cn=Service,ou=Services,dc=buni,dc=org ObjectClass: bkernelService objectClass: top setting: o=setting,cn=Service,ou=Services,dc=buni,dc=org setting: o=anotherSetting,cn=Service,ou=Services,dc=buni,dc=org cn: Service dn: o=setting,cn=Service,ou=Services,dc=buni,dc=org ObjectClass: bkernelServiceSetting objectClass: top value: settingValue o: setting dn: o=anotherSetting,cn=Service,ou=Services,dc=buni,dc=org ObjectClass: bkernelServiceSetting objectClass: top value: 4 o: anotherSettingLDIF from one of Andy's nightmeres
That looks like something logical exploded and its guts were left on the road but that is not intended to be written by hand but generated by tools or processes inside of LDAP. The advantage is that you can centralize configuration in a directory with replication and all that cool stuff. Moreover this stuff is poorly expressed in a relational database as the stuff is really more of a tree and walking a tree in ANSI SQL is at least horrible.
The point is that the microcontainer is still just Spring reloaded. For me it isn't very useful because I can't abstract the Java out of my configuration. For Java Application developers who do not work with non-Java programmers, "who cares". For me...it's just another flavor of the same stuff we've all been smoking for a few years now. Let's have some config files that don't look like throw-up and don't expose your guts to the world. For JBoss...when is JBossAS 5 coming out again (okay I'm a hypocrite but it is still a good question)?
Technorati Tags: jboss jboss microcontainer spring meldware bkernel


