Patches item #491497, was opened at 2001-12-11 02:07 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=491497&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole (unstable) Status: Open Resolution: None Priority: 5 Submitted By: Adrian Brock (ejort) Assigned to: Nobody/Anonymous (nobody) Summary: Third party Deployers and Auto Deployer Initial Comment: SUMMARY A patch to allow a deployer to add and remove itself from the AutoDeployer. This is done automatically when derived from DeployerMBeanSupport during registration. This change is aimed at allowing third-party plugin deployers to use the auto-deployer. Added same processing to J2eeDeployer, I haven't done the scoped deployer. With these changes, only ServiceDeployer needs to be configured in the AutoDeployer Deployers attribute in jboss-service.xml AUTODEPLOYER CHANGES New MBean methods addDeployer(), removeDeployer() and getDeployerNames() addDeployer() performs the same processing as adding the JMX name to the Deployers attribute at start up. In fact the Deployers attribute is now processed through addDeployer removeDeployer() removes the deployer from auto-deployment added code to the run() thread to remove watches for removed deployers the urls are NOT undeployed getDeployerNames() lists all active auto-deployer deployers as opposed to getDeployers which only contains the configuration from jboss-service.xml Changed the deployer arrays to be collections so they can dynamically grow and contract. Added synchornization to avoid concurrency problems between MBean methods and the run() thread. Specifically when undeploying a deployer which also undeploys it's urls at the same time. It works but there's some untidyness and existing problems.... PROBLEMS The ServiceDeployer is derived from DeployerMBeanSupport. This leads to a warning about the AutoDeployer not being present at start-up. It still auto-deploys because it is listed in the Deployers attribute. The AutoDeployer is undeployed before the RARDeployer this leads to a trapped error reporting a missing AutoDeployer at shutdown. Because the watches are removed when the deployer is removed from the AutoDeployer, re-adding the deployer leads to all the deployer's urls redeploying. The watches are removed because otherwise the urls would still try to auto-deploy, see later. The watches aren't removed until the next cycle of the run() thread. This avoids concurrency problems. addDeployer/removeDeployer might be confusing names from a JMX user point of view since the deployers are only added/removed from the autodeployer not the server. The alternative register/unregister might be confused with JMX registion. link/unlink???? The Deployers and DeployerNames attributes will be confusing as well! Perhaps these can be combined? Excessive use of the word deploy in this patch about automatically adding/removing deployers to the auto-deployer when they are deployed/undeployed :-) PROBLEMS THAT ALREADY EXISTED The watches not being removed at deregistration of the deployer was a problem. The AutoDeployer reported an InstanceNotFoundException for the deployer when one of the watched urls is modified. - FIXEDish This could still happen when a deployer.sar is removed at the same time as one of its urls and the two requests go through on the same cycle of the run() thread. It's NOT a FATAL though. The next cycle should remove the watched url. Another existing problem is that a stopped deployer will still deploy through the AutoDeployer because the watches aren't removed. - not fixed The "default deployer" doesn't work as originally intended. I've made what it does explicit but it's not correct. It originally tried to deploy a directory containing META-INF/ejb-jar.xml using the J2eeDeployer. At the moment it actually uses the service deployer. I've commented some of the issues with my initials ARB - not fixed Regards, Adrian NOTE: A lot of the AutoDeployer patch is due realigning code. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376687&aid=491497&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
