Nulling properties on uninstall
starksm64 Jul 14, 2006 4:01 PMI just saw that on a failed installation, the mc is nulling out previously set properties as part of the uninstall process. I'm not expecting this so an NPE is resulting:
40250 TRACE [AbstractKernelController] Uninstalling VFSDeploymentScanner from Create 40250 TRACE [CreateDestroyLifecycleAction] No destroy method for AbstractKernelControllerContext@3727c5{ metadata=AbstractBeanMetaData@2f1e75{name=VFSDeploymentScanner bean=org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl properties=[mainDeployer, URIList] constructor=null}name=VFSDeploymentScanner target=VFSDeploymentScannerImpl@18baf36{} state=Configured depends=AbstractDependencyInfo@19c4091{idependOn=[AbstractDependencyItem@19ed7e{name=VFSDeploymentScanner dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=true}] unresolved=[AbstractDependencyItem@19ed7e{name=VFSDeploymentScanner dependsOn=MainDeployer whenRequired=Configured dependentState=Installed resolved=true}]}} 40250 TRACE [AbstractKernelController] Uninstalling VFSDeploymentScanner from Configured 40250 TRACE [ConfigureAction] Ignored for org.jboss.joinpoint.plugins.BasicMethodJoinPoint@ecd92c java.lang.NullPointerException at org.jboss.deployers.plugins.scanner.VFSDeploymentScannerImpl.setMainDeployer(VFSDeploymentScannerImpl.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
I guess there needs to be a convention for the injection state of properties vs the bean kernel state. In this particular case I was just obtaining another property from the injected bean so I could actually delegate that to the kernel, but consider the case of deployers registering with the MainDeployer on injection. If there is no explicit start lifecycle, and injection of the MainDeployer was used as a proxy for this, there would be no way to unregister on uninstall. I guess that just means injection cannot be used as a proxy for lifecycle callbacks.