This content has been marked as final.
Show 6 replies
-
1. Re: Injecting properties (setters in the base class)
anil.saldhana Nov 8, 2006 1:14 PM (in response to anil.saldhana)I am temporarily fixing this with a setter in TomcatDeployer. I think the ReflectionUtils mechanism needs to be looked at in the mc codebase.
Also the information that is held in DeployerConfig that is passed to TomcatDeployment is not getting unwrapped to set the properties on the AbstractWar/TomcatDeployment. -
2. Re: Injecting properties (setters in the base class)
alesj Nov 8, 2006 2:36 PM (in response to anil.saldhana)"anil.saldhana@jboss.com" wrote:
I think the ReflectionUtils mechanism needs to be looked at in the mc codebase.
I just did a test with this code - and it works for me.public class AnnotatedLifecycleBean extends SuperLifecycleBean { ... public class SuperLifecycleBean { private String test; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } <bean name="LifecycleBean" class="org.jboss.test.kernel.deployment.support.AnnotatedLifecycleBean" mode="Manual"> <property name="test">juhuhu</property> </bean>
This is tested on the current MC trunk - but I don't think property injection has changed recently.
Also the information that is held in DeployerConfig that is passed to TomcatDeployment is not getting unwrapped to set the properties on the AbstractWar/TomcatDeployment.
Unwrapped? -
3. Re: Injecting properties (setters in the base class)
anil.saldhana Nov 8, 2006 2:56 PM (in response to anil.saldhana)"alesj" wrote:
Unwrapped?
I basically meant the following:public void init(Object containerConfig) throws Exception { this.config = (DeployerConfig)containerConfig; super.setJava2ClassLoadingCompliance(config.isJava2ClassLoadingCompliance()); super.setUnpackWars(config.isUnpackWars()); super.setLenientEjbLink(config.isLenientEjbLink()); super.setDefaultSecurityDomain(config.getDefaultSecurityDomain()); }
The last 4 statements were not being performed. I am fixing that. -
4. Re: Injecting properties (setters in the base class)
alesj Nov 8, 2006 3:05 PM (in response to anil.saldhana)What's this got to do with MC?
Is init defined as lifecycle method with DeployerConfig instance as parameter? -
5. Re: Injecting properties (setters in the base class)
anil.saldhana Nov 8, 2006 3:38 PM (in response to anil.saldhana)I am talking of WarDeployer/TomcatDeployment. Not related to MC.
-
6. Re: Injecting properties in WarDeployer(setters in the base
starksm64 Nov 8, 2006 11:38 PM (in response to anil.saldhana)The property setters were working, its just that they were not being propagated to the TomcatDeployment from within the getDeployment callout.