Breaking MC in 2?
starksm64 Dec 6, 2005 1:17 PMFrom Tom,
last two months i have been abstracting jbpm from the environment in which it runs. here i want to share and challenge the observations i made during that work. the conclusion i will make is that we don't have a separate dependency injection (di) container.
in 3.0, jbpm's main dependency is a hibernate session. the occasion to expand this was the introduction of a new dependency on a async message system. that made me realize that jbpm needs a number of services from its environment. each of those services must be pluggable so that jbpm can be embedded in any environment (junit with mock svcs, j2se, j2ee, spring, ...). the work i did to accomodate this is interesting. i found myself developing patterns as in jboss and spring but dedicated to my use case so less general and less complex.
i believe that a simple library can be written to support the same abstraction in a general way. meaning no service implementations. just a framework that bridges between a component and the services that are used from the environment.
ok... so that is exactly what spring does. right ?
i think that our new microcontainer has a different goal and target. since the focus has been to implement a service container itself. so mc ties 2 things together that i would like to see more separated: 1) classloading, deployment & service container (== all you need to boot a server) and 2) aop, thread local contexts(as in SEAM), service usage (== all you need to write a component).
is a clear separation between these 2 thinkable in the mc ?
another issue that kept me from using the mc were the library dependencies. i believe it is possible to write a decent service provider framework (or di-container) in less then 200 K based on only J2SE 1.4.
also i think that a separate service provider framework is a necessary key element for what i would call "an integrated development environment" :) meaning one environment in which you write your domain model, your services and your web service integration. i believe this is one of the meanings of "SOA" :-)
thoughts ?
regards, tom.
tom.baeyens@jboss.com