[jboss-dev-forums] [Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-3532 Design

bstansberry@jboss.com do-not-reply at jboss.com
Thu Jul 26 14:31:28 EDT 2007


As you said, the issue with DRM/ClusterPartition is that it's a circular dependency, making it a wee bit complex for dependency injection.  That should be solvable by adding "whenRequired" attributes to the inject elements.

I.e in pseudo-xml in cluster-beans.xml:


  | <bean name="HAPartition" ...>
  |    <property name="distributedReplicantManager"><inject bean="DRM" whenRequired="Create"/></property>
  | </bean>
  | <bean name="DRM" ...>
  |    <property name="HAPartition"><inject bean="HAPartition" whenRequired="Instantiated"/></property>
  | </bean>
  | 

The above example could be wrong; it's more there to give you the concept.  Idea is you inject the DRM into the HAPartition just before it needs it in create().  You inject HAPartition into DRM early, since a DRM without an HAPartition is basically useless.  The MC can analyze this situation and properly instantiate both objects.

The schema for beans.xml explains this stuff fairly well; it's in the Microcontainer source at https://svn.jboss.org//repos/jbossas/projects/microcontainer/trunk/kernel/src/resources/main/schema/bean-deployer_2_0.xsd . Valid values for "whenRequired" are the various states the MC moves a bean through as it deploys it:

Described
Instantiated
Configured
Create
Start
Installed

I didn't have a chance to properly explore this last Nov when I was looking at this.  If you have bandwidth to play with it a bit and try to get it sorted, that would be great.  (Note I'm leaving on 2 week vacation in a few hours, so will not be in touch.)

Re: JBAS-3499, that's still really low priority.  DRM works now, except for a couple JIRAs we need to track down.  DRM is mission critical, and with all the stuff there is to do, I have a "if it ain't broke don't fix it" attitude toward making DRM use JBoss Cache.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067961#4067961

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067961



More information about the jboss-dev-forums mailing list