The first step doesn't need to be very complicated.
We just need to logically seperate the deployment chain
from the runtime.
Migrating to POJOs isn't a requirement.
You can leave all the classes in the jbossweb.deployer deployment
for now, there's no need to seperate immediately runtime classes from deployment
classes.
If you look at jbossweb.deployer/META-INF/war-deployer-beans.xml
it contains a number of deployers but these mix the deployment process
with the runtime.
What we want is a
1) deployers/jbossweb.deployer
that is just the deployers and handles the metadata (constructing ServiceMetaData
for the individual web apps)
2) deploy/jbossweb
this is the runtime that the mbeans above get deployed into
In more detail, the current deployers are
1) WebAppParsingDeployer
Ok, this parses the web.xml to create a WebMetaData
2) JBossWebAppParsingDeployer
Adds the jboss-web.xml to the WebMetaData (again ok, except the loader repository
stuff which shouldn't be in the parsing layer)
3) WebAppClusteringDefaultsDeployer
This is ok. It just modifies the WebMetaData to add defaults
4) WebAppClusteringDependencyDeployer
Again just modifies the metadata to add dependencies that will later be used
by the mbean deployment
5) WarDeployer
This is what is wrong. It does at least two things
5a) It configures Tomcat
5b) It creates the ServiceMetaData that represent web deployments
My guess is that it also handles some of the runtime process of that
ServiceMetaData as well?
Instead what should happen is that the runtime processing
(configuration of the connectors and the other bits associated
Tomcat's runtime in the server.xml) should be in deploy/jboss-web
as a seperate service.
The MBean that gets constructed from the ServiceMetaData
will interact with this seperate runtime.
In summary, the deployers should just be deailing with the metadata
{jboss-}web.xml -> WebMetaData -> ServiceMetaData
this ServiceMetaData will then desribe a WebDeployment MBean
that will interact with the runtime services to create the actual WAR.
Once that is done, we will no longer neded to pull lots of services
like the transaction manager or the CachedConnectionManager into
the bootstrap just to satisfy the Tomcat deployer's dependency on them.
The clustering part of the WAR deployment has it correct,
in that the dependencies are just names (not implementation)
that will be satiisfied when those services are deployed.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124067#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...