I've committed a initial prototype on sub-profiles in AS trunk, based on different
comments i could gather on this topic.
The most important changes are to the ProfileService and Profile spi itself. Where
ProfileService got a register and activate method for a profile and the Profile got a list
of DependencyItems:
| public interface ProfileService
| {
| // ....
| public void registerProfile(Profile profile)
| public void activateProfile(ProfileKey key)
| public void releaseProfile(ProfileKey key)
| public void unregisterProfile(Profile profile)
| }
|
| public interface Profile
| {
| // ....
| Collection<DependencyItem> getDependencies();
| }
|
The full interfaces can be found here:
http://anonsvn.jboss.org/repos/jbossas/projects/integration/trunk/jboss-p...
http://anonsvn.jboss.org/repos/jbossas/projects/integration/trunk/jboss-p...
One other major change was that i dropped the DeploymentPhase from the
profileservice.spi.* interfaces.
I think this is not needed anymore, as the relationships and order when profiles are
getting installed should be based on the dependency information of the profile.
Based on that i've created a simple profile factory which does basically the same as
the current profile service,
just that there are now 3 active profiles (bootstrap, deployers, $serverName).
The profileService itself uses a scoped mc controller to install/uninstall the profiles in
the correct order,
this is also not really finished, but seems to work for now ;)
http://anonsvn.jboss.org/repos/jbossas/trunk/system/src/main/org/jboss/sy...
and the beans.xml:
http://anonsvn.jboss.org/repos/jbossas/trunk/server/src/etc/conf/default/...
Furthermore i did a simple prototype for xml configuration, based on Adrian's examples
in a different thread.
So this could for example look like the files in the 2 folders here:
http://anonsvn.jboss.org/repos/jbossas/trunk/system/src/resources/parsing...
and a simple factory:
http://anonsvn.jboss.org/repos/jbossas/trunk/system/src/main/org/jboss/sy...
So basically a sub-profile is just a dependency on a different profile. But the main
question for me is - from where should e.g. ejb-runtime know that it depends on
ejb-deployers?
At the moment i just add some dependencies based on the ordering in the xml, which is not
really sophisticated :)
There should only be one single test case failure in the profileservice tests, this is
because of a changed behavior of the ManagementView,
but i would like to discuss ManagementView and DeploymentManager in a different thread
later on.
Not sure if the clustering tests are using the HASingleton, because i also had to remove
the DeploymentPhase there, but it could maybe work - haven't tried that yet.
I don't consider the spi as done and there are still some things to do, but i think
this is at least a good start for further discussions on that.
So any ideas / comments / criticism? :)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201376#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...