[jboss-cvs] JBossAS SVN: r91541 - trunk/webservices/src/main/org/jboss/wsf/container/jboss60/deployer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 22 04:26:39 EDT 2009
Author: alessio.soldano at jboss.com
Date: 2009-07-22 04:26:39 -0400 (Wed, 22 Jul 2009)
New Revision: 91541
Modified:
trunk/webservices/src/main/org/jboss/wsf/container/jboss60/deployer/ServerConfigImpl.java
Log:
[JBWS-2652] Fix trunk now that JBAS-6856 work has been merged to trunk
Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss60/deployer/ServerConfigImpl.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss60/deployer/ServerConfigImpl.java 2009-07-22 08:12:03 UTC (rev 91540)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss60/deployer/ServerConfigImpl.java 2009-07-22 08:26:39 UTC (rev 91541)
@@ -22,6 +22,8 @@
package org.jboss.wsf.container.jboss60.deployer;
import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
import javax.management.JMException;
import javax.management.ObjectName;
@@ -30,10 +32,10 @@
import org.jboss.wsf.common.management.AbstractServerConfigMBean;
/**
- * A ServerConfig using Legacy Bootstrap
+ * A ServerConfig for AS > 5.1.0 (5.1.0 excluded)
*
* @author alessio.soldano at jboss.com
- * @author Thomas.Diesler at jboss.org
+ * @author ALR
*
*/
public class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
@@ -41,17 +43,17 @@
public File getServerTempDir()
{
- return this.getDirFromServerConfig("ServerTempDir");
+ return this.getDirFromServerConfig("ServerTempLocation");
}
public File getHomeDir()
{
- return this.getDirFromServerConfig("HomeDir");
+ return this.getDirFromServerConfig("JBossHome");
}
public File getServerDataDir()
{
- return this.getDirFromServerConfig("ServerDataDir");
+ return this.getDirFromServerConfig("ServerDataLocation");
}
/**
@@ -68,15 +70,29 @@
final ObjectName on = OBJECT_NAME_SERVER_CONFIG;
// Get the URL location
- File location = null;
+ URL location = null;
try
{
- location = (File) getMbeanServer().getAttribute(on, attributeName);
+ location = (URL) getMbeanServer().getAttribute(on, attributeName);
}
catch (final JMException e)
{
throw new RuntimeException("Could not obtain attribute " + attributeName + " from " + on, e);
}
- return location;
+
+ // Represent as a File
+ File dir = null;
+ try
+ {
+ dir = new File(location.toURI());
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new RuntimeException("Could not desired directory from URL: " + location, urise);
+ }
+
+ // Return
+ return dir;
}
}
+
More information about the jboss-cvs-commits
mailing list