[jboss-cvs] JBossAS SVN: r84002 - in branches/Branch_5_0: testsuite/imports/sections and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 9 10:53:11 EST 2009
Author: alesj
Date: 2009-02-09 10:53:11 -0500 (Mon, 09 Feb 2009)
New Revision: 84002
Modified:
branches/Branch_5_0/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
branches/Branch_5_0/testsuite/imports/sections/util.xml
branches/Branch_5_0/testsuite/src/main/org/jboss/test/util/test/SchedulerUnitTestCase.java
Log:
Avoid caching (as we don't explicitly control that root).
Avoid .. at top level - too cache/root dependent.
Modified: branches/Branch_5_0/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
===================================================================
--- branches/Branch_5_0/system-jmx/src/main/org/jboss/deployment/MainDeployer.java 2009-02-09 15:43:21 UTC (rev 84001)
+++ branches/Branch_5_0/system-jmx/src/main/org/jboss/deployment/MainDeployer.java 2009-02-09 15:53:11 UTC (rev 84002)
@@ -72,7 +72,7 @@
* Main
*
* @deprecated see org.jboss.deployers.spi.deployment.MainDeployer
- *
+ *
* @author <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
* @author <a href="mailto:scott.stark at jboss.org">Scott Stark</a>
* @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
@@ -90,7 +90,7 @@
/** The deployment factory */
private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
-
+
/**
* The variable <code>serviceController</code> is used by the
* checkIncompleteDeployments method to ask for lists of mbeans
@@ -118,7 +118,7 @@
/** Helper class handling the SuffixOrder and EnhancedSuffixOrder attributes */
private final SuffixOrderHelper suffixOrderHelper = new SuffixOrderHelper(sorter);
-
+
/** Should local copies be made of resources on the local file system */
private boolean copyFiles = true;
@@ -223,17 +223,17 @@
{
return suffixOrderHelper.getSuffixOrder();
}
-
+
/** Get the enhanced suffix order
- *
- * @return the enhanced suffix order
+ *
+ * @return the enhanced suffix order
* @jmx.managed-attribute
*/
public String[] getEnhancedSuffixOrder()
{
return suffixOrderHelper.getEnhancedSuffixes();
}
-
+
/** Set the enhanced suffix order
*
* @param enhancedSuffixOrder the enhanced suffix order
@@ -243,7 +243,7 @@
{
suffixOrderHelper.setEnhancedSuffixes(enhancedSuffixOrder);
}
-
+
/**
* Describe <code>setServiceController</code> method here.
*
@@ -366,7 +366,7 @@
{
log.debug("Adding deployer: " + deployer);
ObjectName deployerName = deployer.getServiceName();
-
+
synchronized(deployers)
{
deployers.addFirst(deployer);
@@ -381,7 +381,7 @@
suffixOrderHelper.addSuffixes(deployer.getSuffixes(), deployer.getRelativeOrder());
}
}
-
+
// Send a notification about the deployer addition
Notification msg = new Notification(ADD_DEPLOYER, this, getNextNotificationSequenceNumber());
msg.setUserData(deployerName);
@@ -407,7 +407,7 @@
} // end of for ()
}
}
-
+
/**
* The <code>removeDeployer</code> method unregisters a deployer with the MainDeployer.
* Deployed packages deployed with this deployer are undeployed.
@@ -420,7 +420,7 @@
log.debug("Removing deployer: " + deployer);
ObjectName deployerName = deployer.getServiceName();
boolean removed = false;
-
+
synchronized(deployers)
{
removed = deployers.remove(deployer);
@@ -435,7 +435,7 @@
suffixOrderHelper.removeSuffixes(deployer.getSuffixes(), deployer.getRelativeOrder());
}
}
-
+
// Send a notification about the deployer removal
if (removed)
{
@@ -513,7 +513,7 @@
// used in inLocalCopyDir
tempDirString = tempDir.toURL().toString();
-
+
// handles SuffixOrder & RelativeSuffixOrder attributes
suffixOrderHelper.initialize();
}
@@ -555,7 +555,7 @@
this.deploymentList.clear();
this.waitingDeployments.clear();
this.tempDir = null;
-
+
log.debug("Undeployed " + deployCounter + " deployed packages");
}
@@ -620,7 +620,7 @@
{
undeploy(new URL(urlspec));
}
-
+
/**
* The <code>undeploy</code> method undeploys a package identified by a URL
*
@@ -805,14 +805,7 @@
{
try
{
-/*
- // disable reaper for old deployments
- // currently I (alesj) have no idea why this custom enable doesn't work
- VFS vfs = VFS.getVFS(url);
- VFSUtils.enableNoReaper(vfs);
- VirtualFile file = vfs.getRoot();
-*/
- VirtualFile file = VFS.getRoot(url);
+ VirtualFile file = VFS.createNewRoot(url);
VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
delegate.addDeployment(deployment);
deploymentName = deployment.getName();
@@ -1244,7 +1237,7 @@
protected void copy(URL src, File dest) throws IOException
{
log.debug("Copying " + src + " -> " + dest);
-
+
// Validate that the dest parent directory structure exists
File dir = dest.getParentFile();
if (!dir.exists())
@@ -1304,7 +1297,7 @@
*/
public void stop(String urlspec)
throws DeploymentException, MalformedURLException
- {
+ {
throw new DeploymentException("Not supported");
}
@@ -1354,7 +1347,7 @@
* Is deployed.
*
* @param name the name of the deployment
- * @return true if deployed, false otherwise
+ * @return true if deployed, false otherwise
*/
protected boolean checkDeployed(String name)
{
@@ -1459,12 +1452,12 @@
*/
private void fillParentAndChildrenSDI(DeploymentInfo parent, Map map)
{
- Set subDeployments = parent.subDeployments;
+ Set subDeployments = parent.subDeployments;
Iterator it = subDeployments.iterator();
while (it.hasNext())
{
DeploymentInfo child = (DeploymentInfo) it.next();
- SerializableDeploymentInfo sdichild = returnSDI(child, map);
+ SerializableDeploymentInfo sdichild = returnSDI(child, map);
sdichild.parent = returnSDI(parent, map);
sdichild.parent.subDeployments.add(sdichild);
fillParentAndChildrenSDI(child, map);
@@ -1477,7 +1470,7 @@
if( sdi == null )
{
sdi = new SerializableDeploymentInfo(di);
- map.put(di.url, sdi);
+ map.put(di.url, sdi);
}
return sdi;
}
Modified: branches/Branch_5_0/testsuite/imports/sections/util.xml
===================================================================
--- branches/Branch_5_0/testsuite/imports/sections/util.xml 2009-02-09 15:43:21 UTC (rev 84001)
+++ branches/Branch_5_0/testsuite/imports/sections/util.xml 2009-02-09 15:53:11 UTC (rev 84002)
@@ -35,5 +35,7 @@
<include name="org/jboss/test/util/mbean/**"/>
</fileset>
</jar>
+ <!-- The service -->
+ <copy tofile="${build.lib}/test-default-scheduler-service.xml" file="${build.resources}/util/test-default-scheduler-service.xml"/>
</target>
</project>
Modified: branches/Branch_5_0/testsuite/src/main/org/jboss/test/util/test/SchedulerUnitTestCase.java
===================================================================
--- branches/Branch_5_0/testsuite/src/main/org/jboss/test/util/test/SchedulerUnitTestCase.java 2009-02-09 15:43:21 UTC (rev 84001)
+++ branches/Branch_5_0/testsuite/src/main/org/jboss/test/util/test/SchedulerUnitTestCase.java 2009-02-09 15:53:11 UTC (rev 84002)
@@ -47,7 +47,7 @@
extends JBossTestCase
{
- private String file = "../resources/util/test-default-scheduler-service.xml";
+ private String file = "test-default-scheduler-service.xml";
/**
* Constructor for the SchedulerUnitTestCase object
@@ -93,7 +93,7 @@
if (hits > 0)
{
Date now = new Date();
- assertNotNull("hit date", hd);
+ assertNotNull("hit date", hd);
assertTrue("date " + hd + " " + now, !hd.after(now));
assertTrue("note", ex.getHitNotification() != null);
assertTrue("sched", ex.getSchedulerName() != null);
@@ -128,11 +128,11 @@
registered(scheduler2);
registered(manager1);
- Thread.sleep(2500); // Half of one period
+ Thread.sleep(2500); // Half of one period
check(ex1, 1, 0); // Only one
check(ex2, 0, 0); // StartAtStartup is false
check(ex3, 1, 2); // First of three
-
+
// Sleep for the remainder of the period and start the other schedule
Thread.sleep(2500);
invoke(scheduler2, "startSchedule", null, null);
@@ -140,7 +140,7 @@
Thread.sleep(2500); // Half of one period
check(ex1, 1, 0); // done
check(ex2, 1, -1); // first
- check(ex3, 2, 1); // one more to go
+ check(ex3, 2, 1); // one more to go
Thread.sleep(5000); // one period
check(ex1, 1, 0); // done
@@ -172,7 +172,7 @@
}
}
- /**
+ /**
* Test the deployment of a ear containing a sar which creates an
* instance of the org.jboss.varia.scheduler.Scheduler service with a
* Schedulable class that exists in an external jar referenced by the
More information about the jboss-cvs-commits
mailing list