Description of problem: Here is the problem: <code> var destinationId = jbasDestination; if (typeof(jbasDestination) == 'object') { destinationId = jbasDestination.id; } var destCrit = new BundleDestinationCriteria destCrit.fetchGroup(true) var destinations = BundleManager.findBundleDestinationsByCriteria(destCrit); </code> Used destCrit doesn't have FilterId set. So the findBundleDestinationsByCriteria function then finds first destination which could be incorrect. Correct version: <code> var destinationId = jbasDestination; if (typeof(jbasDestination) == 'object') { destinationId = jbasDestination.id; } var destCrit = new BundleDestinationCriteria destCrit.fetchGroup(true) destCrit.addFilterId(destinationId); var destinations = BundleManager.findBundleDestinationsByCriteria(destCrit); </code> Version-Release number of selected component (if applicable): Jon3.2.ER5 and master as well: Version : 4.10.0-SNAPSHOT Build Number : cb5f098
The same problem is in jbossas module
Note that this was fixed POST ER7. commit 3217afa463913656a1e0af3b58b27a782f55d472 Author: Lukas Krejci <lkrejci> Date: Thu Nov 21 21:41:06 2013 +0100 [BZ 1033119] Find the asked for destination, not just a random one in deploy-to-and-restrart-JBAS.js#updateAppAndRestartJBAS(), require("modules:/jbossas").updateAppAndRestart()
Moving to ON_QA for testing in latest(CR1) brew build.
Verified on: Version : 3.2.0.CR1 Build Number : 6ecd678:d0dc0b6