"adrian(a)jboss.org" wrote : It's here:
|
https://jira.jboss.org/jira/browse/JBMICROCONT-81
| but Ales has closed it.
|
| He's done it for annotations but not for xml.
|
| Which maybe enough if you do?
|
Sure. ;-)
I've written two examples (they are commited to the trunk)
of what you can do to enable this:
(1) annotation based
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="AnnotationHandlerFactory">
| <constructor
factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory"
factoryMethod="getInstance" />
| </bean>
| <bean name="AnnotationHandler">
| <constructor factoryMethod="getBeanAnnotationAdapter">
| <factory bean="AnnotationHandlerFactory"/>
| </constructor>
| <incallback method="addAnnotationPlugin" />
| <uncallback method="removeAnnotationPlugin" />
| </bean>
| <bean name="SuperDemandAnnotationPlugin"
class="org.jboss.test.kernel.deployment.support.SuperDemandAnnotationPlugin"
/>
|
| <bean name="Manager"
class="org.jboss.test.kernel.deployment.support.SomeCacheTreeManager">
| <property name="clusteredCache"><inject
bean="HAPartitionCacheHandler" property="cache"/></property>
|
<annotation>(a)org.jboss.test.kernel.deployment.support.SuperDemand(demand="Partition",
whenRequired="Configured", dependentState="Start")</annotation>
| </bean>
|
| <bean name="HAPartitionCacheHandler"
class="org.jboss.test.kernel.deployment.support.HAPartitionCacheHandler"/>
|
| <bean name="Partition"
class="org.jboss.test.kernel.deployment.support.HAPartition">
| <property name="handler"><inject
bean="HAPartitionCacheHandler"/></property>
| </bean>
|
| </deployment>
|
(2) install
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="SuperDemand"
class="org.jboss.test.kernel.deployment.support.SuperDemandCreator"/>
|
| <bean name="Manager"
class="org.jboss.test.kernel.deployment.support.SomeCacheTreeManager">
| <property name="clusteredCache"><inject
bean="HAPartitionCacheHandler" property="cache"/></property>
| <install bean="SuperDemand" method="createDependency"
whenRequired="Instantiated">
| <parameter><inject fromContext="name"/></parameter>
| <parameter>Partition</parameter>
| <parameter>Configured</parameter>
| <parameter>Start</parameter>
| </install>
| </bean>
|
| <bean name="HAPartitionCacheHandler"
class="org.jboss.test.kernel.deployment.support.HAPartitionCacheHandler"/>
|
| <bean name="Partition"
class="org.jboss.test.kernel.deployment.support.HAPartition">
| <property name="handler"><inject
bean="HAPartitionCacheHandler"/></property>
| </bean>
|
| </deployment>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182301#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...