[jboss-cvs] JBossAS SVN: r91254 - in trunk: client and 66 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 14 17:17:46 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-07-14 17:17:44 -0400 (Tue, 14 Jul 2009)
New Revision: 91254
Added:
trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java
trunk/main/src/main/org/jboss/SecurityActions.java
trunk/main/src/resources/logging.properties
trunk/server/src/etc/deploy/jboss-logging.xml
trunk/server/src/main/org/jboss/config/
trunk/server/src/main/org/jboss/config/ServerConfigUtil.java
trunk/system-jmx/src/main/org/jboss/system/server/ServerConstants.java
trunk/system/src/resources/logging.properties
trunk/varia/src/resources/logging/
trunk/varia/src/resources/logging/logmanager-jboss-beans.xml
Removed:
trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java
trunk/main/src/main/org/jboss/system/server/
trunk/main/src/resources/log4j-debug.properties
trunk/main/src/resources/log4j-trace.properties
trunk/main/src/resources/log4j.properties
trunk/server/src/etc/conf/all/bootstrap/logging.xml
trunk/server/src/etc/conf/all/jboss-log4j.xml
trunk/server/src/etc/conf/all/xmdesc/Log4jService-xmbean.xml
trunk/server/src/etc/deployers/logbridge-jboss-beans.xml
trunk/server/src/main/org/jboss/config/ServerConfigUtil.java
trunk/server/src/main/org/jboss/logging/Log4jService.java
trunk/server/src/main/org/jboss/logging/Log4jServiceMBean.java
trunk/system/src/resources/jdklogger.xml
trunk/system/src/resources/log4j-debug.properties
trunk/system/src/resources/log4j-trace.properties
trunk/system/src/resources/log4j.properties
trunk/varia/src/resources/logging/logmanager-jboss-beans.xml
Modified:
trunk/build/build.xml
trunk/build/pom.xml
trunk/client/pom.xml
trunk/cluster/pom.xml
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
trunk/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java
trunk/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java
trunk/component-matrix/pom.xml
trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
trunk/console/pom.xml
trunk/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java
trunk/hibernate-int/pom.xml
trunk/iiop/src/assembly/client.xml
trunk/iiop/src/main/org/jboss/iiop/CorbaORBService.java
trunk/main/build.xml
trunk/main/pom.xml
trunk/main/src/assembly/run.xml
trunk/main/src/main/org/jboss/Main.java
trunk/management/pom.xml
trunk/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java
trunk/profileservice/src/resources/hdscanner-jboss-beans.xml
trunk/server/pom.xml
trunk/server/src/etc/conf/all/bootstrap.xml
trunk/server/src/etc/conf/all/bootstrap/profile.xml
trunk/server/src/etc/conf/all/jboss-service.xml
trunk/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml
trunk/server/src/etc/conf/minimal/jboss-service.xml
trunk/server/src/etc/conf/standard/jboss-service.xml
trunk/server/src/etc/conf/web/jboss-service.xml
trunk/server/src/main/org/jboss/Shutdown.java
trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
trunk/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
trunk/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
trunk/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java
trunk/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java
trunk/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java
trunk/server/src/main/org/jboss/naming/NamingProviderURLWriter.java
trunk/server/src/main/org/jboss/web/WebService.java
trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
trunk/system-jmx/pom.xml
trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
trunk/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java
trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java
trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java
trunk/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java
trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
trunk/system/pom.xml
trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java
trunk/system/src/main/org/jboss/system/tools/DeploymentScanner.java
trunk/testsuite/build.xml
trunk/testsuite/imports/sections/classloader.xml
trunk/testsuite/imports/server-config.xml
trunk/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java
trunk/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java
trunk/thirdparty/pom.xml
trunk/tomcat/pom.xml
trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
trunk/varia/pom.xml
trunk/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java
trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java
trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java
trunk/varia/src/main/org/jboss/services/deployment/DeploymentManager.java
trunk/varia/src/main/org/jboss/services/deployment/LibraryManager.java
trunk/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java
Log:
Merge the log+bootstrap integration branch:
ALR: [JBAS-6856] Component upgrade and refactoring to jboss-bootstrap:2.0.0 Series
DML: [JBAS-2412] Update the logging framework with jboss-logmanager
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/build/build.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -277,6 +277,7 @@
<copy todir="${install.minimal.deployers}" overwrite="true">
<fileset dir="${install.default.deployers}">
<include name="jboss-threads.deployer/**"/>
+ <include name="jboss-logging.deployer/**"/>
</fileset>
</copy>
<copy todir="${install.minimal.deploy}" overwrite="true">
@@ -323,6 +324,7 @@
<include name="metadata-deployer-jboss-beans.xml"/>
<include name="security-deployer-jboss-beans.xml"/>
<include name="jboss-threads.deployer/**"/>
+ <include name="jboss-logging.deployer/**"/>
</fileset>
</copy>
<copy todir="${install.web.deploy}">
@@ -410,7 +412,7 @@
<include name="*-client.jar"/>
<include name="asm.jar"/>
<include name="cglib-2.1.1.jar"/>
- <include name="commons-logging.jar"/>
+ <include name="jcl-over-slf4j.jar"/>
<include name="concurrent.jar"/>
<include name="ejb3-persistence.jar"/>
<include name="hibernate-annotations.jar"/>
@@ -781,8 +783,6 @@
<mkdir dir="${install.lib}"/>
<copy file="${main.module.output}/jboss-as-main.jar"
tofile="${install.lib}/jboss-main.jar" filtering="no"/>
- <copy file="${main.module.output}/jboss-as-main-log4j-boot.jar"
- tofile="${install.lib}/log4j-boot.jar" filtering="no"/>
<!-- Copy the generated client -->
<mkdir dir="${install.client}"/>
@@ -1481,6 +1481,10 @@
<fileset dir="${varia.module.output}/resources/threads"/>
</copy>
+ <copy todir="${install.server}/all/deployers/jboss-logging.deployer/META-INF">
+ <fileset dir="${varia.module.output}/resources/logging"/>
+ </copy>
+
<copy todir="${install.server}/all/deploy/xnio-provider.jar/META-INF">
<fileset dir="${varia.module.output}/resources/xnio">
<include name="xnio-jboss-beans.xml"/>
@@ -1966,11 +1970,14 @@
<fileset refid="org.jboss.security:jboss-security-spi:jar"/>
<fileset refid="org.jboss.security:jbosssx:jar"/>
<fileset refid="org.jboss.security:jbossxacml:jar"/>
+ <fileset refid="org.jboss.slf4j:slf4j-jboss-logmanager:jar"/>
<fileset refid="org.slf4j:slf4j-api:jar"/>
- <fileset refid="org.jboss.slf4j:slf4j-jboss-logging:jar"/>
+ <fileset refid="org.slf4j:jcl-over-slf4j:jar"/>
<fileset refid="log4j:log4j:jar"/>
+ <fileset refid="org.jboss.logging:jboss-logging-log4j:jar"/>
+ <fileset refid="org.jboss.logging:jboss-logging-jdk:jar"/>
+ <fileset refid="org.jboss.logmanager:jboss-logmanager-log4j:jar"/>
<fileset refid="quartz:quartz:jar"/>
- <fileset refid="commons-logging:commons-logging:jar"/>
<fileset refid="jaxen:jaxen:jar"/>
<fileset refid="org.jboss.cluster:jboss-ha-client:jar"/>
<fileset refid="org.jboss.cluster:jboss-ha-server-api:jar"/>
@@ -2049,12 +2056,15 @@
<copy todir="${install.lib}" filtering="no">
<fileset refid="javassist:javassist:jar"/>
<fileset refid="org.jboss.aop:jboss-aop:jar"/>
- <fileset refid="org.jboss.bootstrap:jboss-bootstrap:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-spi:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-spi-mc:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-spi-as:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-impl-base:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-impl-mc:jar"/>
+ <fileset refid="org.jboss.bootstrap:jboss-bootstrap-impl-as:jar"/>
<fileset refid="org.jboss:jboss-common-core:jar"/>
<fileset refid="org.jboss.logging:jboss-logging-spi:jar"/>
- <fileset refid="org.jboss.logging:jboss-logging-jdk:jar"/>
- <fileset refid="org.jboss.logging:jboss-logging-log4j:jar"/>
- <fileset refid="org.jboss.logbridge:jboss-logbridge:jar"/>
+ <fileset refid="org.jboss.logging:jboss-logging-logmanager:jar"/>
<fileset refid="org.jboss.logmanager:jboss-logmanager:jar"/>
<fileset refid="org.jboss.integration:jboss-classloading-spi:jar"/>
<fileset refid="org.jboss.integration:jboss-profileservice-spi:jar"/>
@@ -2107,7 +2117,6 @@
<mkdir dir="${install.client}"/>
<copy todir="${install.client}" filtering="no">
<fileset refid="antlr:antlr:jar"/>
- <fileset refid="commons-logging:commons-logging:jar"/>
<fileset refid="org.apache:xmlsec:jar"/>
<fileset refid="wsdl4j:wsdl4j:jar"/>
<fileset refid="javassist:javassist:jar"/>
@@ -2116,6 +2125,7 @@
<fileset refid="org.jboss.logging:jboss-logging-jdk:jar"/>
<fileset refid="org.jboss.logging:jboss-logging-log4j:jar"/>
<fileset refid="org.slf4j:slf4j-api:jar"/>
+ <fileset refid="org.slf4j:jcl-over-slf4j:jar"/>
<fileset refid="org.jboss.slf4j:slf4j-jboss-logging:jar"/>
<fileset refid="org.jboss.integration:jboss-integration:jar"/>
<fileset refid="org.jboss.ejb3:jboss-ejb3-ext-api:jar"/>
@@ -2296,6 +2306,13 @@
<mapper refid="remove-versions" />
</copy>
+ <!-- copy the logging deployer files into their proper places -->
+ <mkdir dir="${install.server}/all/deployers/jboss-logging.deployer/META-INF"/>
+ <copy todir="${install.server}/all/deployers/jboss-logging.deployer">
+ <fileset refid="org.jboss.logging:logging-service-metadata:jar"/>
+ <mapper refid="remove-versions" />
+ </copy>
+
<!-- copy the xnio deployer files into their proper places -->
<mkdir dir="${install.server}/all/deploy/xnio-provider.jar/META-INF"/>
<copy todir="${install.server}/all/deploy/xnio-provider.jar">
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/build/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -28,10 +28,6 @@
<artifactId>jboss-aop-deployers</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-cluster</artifactId>
</dependency>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/client/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -14,12 +14,8 @@
<url>http://www.jboss.org/jbossas</url>
<dependencies>
+
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
-
- <dependency>
<groupId>oswego-concurrent</groupId>
<artifactId>concurrent</artifactId>
</dependency>
@@ -244,12 +240,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
-
+
<dependency>
- <groupId>org.jboss.slf4j</groupId>
- <artifactId>slf4j-jboss-logging</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
</dependency>
-
+
</dependencies>
</project>
Modified: trunk/cluster/pom.xml
===================================================================
--- trunk/cluster/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/cluster/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -132,10 +132,10 @@
<dependencies>
<!-- Compile (global dependencies) -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
@@ -204,7 +204,7 @@
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -41,7 +41,15 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.Name;
+import javax.naming.NameNotFoundException;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
import org.jboss.ha.framework.interfaces.HAPartition;
@@ -84,13 +92,6 @@
import org.jgroups.util.Rsp;
import org.jgroups.util.RspList;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.Name;
-import javax.naming.NameNotFoundException;
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-
/**
* {@link HAPartition} implementation based on a
* <a href="http://www.jgroups.com/">JGroups</a> <code>RpcDispatcher</code>
@@ -203,7 +204,7 @@
private String cacheConfigName;
private ChannelFactory channelFactory;
private String stackName;
- private String partitionName = ServerConfigUtil.getDefaultPartitionName();
+ private String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
private InetAddress nodeAddress = null;
private long state_transfer_timeout=60000;
private long method_call_timeout=60000;
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/JChannelFactory.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -43,7 +43,7 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
import org.jboss.ha.framework.server.managed.OpenChannelsMapper;
import org.jboss.ha.framework.server.managed.ProtocolStackConfigurationsMapper;
import org.jboss.logging.Logger;
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/util/TopologyMonitorService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -30,7 +30,7 @@
import javax.naming.InitialContext;
import org.apache.log4j.MDC;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.ha.framework.interfaces.HAPartition.AsynchHAMembershipListener;
import org.jboss.ha.framework.server.HAPartitionLocator;
@@ -88,7 +88,7 @@
private static Logger changeLog = Logger.getLogger(CHANGE_NAME);
- private volatile String partitionName = ServerConfigUtil.getDefaultPartitionName();
+ private volatile String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
private volatile HAPartition partition;
Modified: trunk/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java
===================================================================
--- trunk/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/cluster/src/main/org/jboss/invocation/http/server/HttpProxyFactoryHA.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -24,19 +24,20 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Hashtable;
+
+import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import javax.management.MBeanServer;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.ha.framework.interfaces.HAPartition;
+import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
+import org.jboss.ha.framework.server.HAPartitionLocator;
+import org.jboss.ha.framework.server.HATarget;
import org.jboss.invocation.Invoker;
import org.jboss.invocation.InvokerInterceptor;
import org.jboss.invocation.http.interfaces.ClientMethodInterceptorHA;
import org.jboss.invocation.http.interfaces.HttpInvokerProxyHA;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
-import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
-import org.jboss.ha.framework.interfaces.HAPartition;
-import org.jboss.ha.framework.server.HAPartitionLocator;
-import org.jboss.ha.framework.server.HATarget;
/** An extension of HttpProxyFactory that supports clustering of invoker proxies.
* It does this by creating a HATarget that monitors the replication of the
@@ -52,7 +53,7 @@
{
private ObjectName realJmxInvokerName;
private ObjectName wrappedJmxInvokerName;
- private String partitionName = ServerConfigUtil.getDefaultPartitionName();
+ private String partitionName = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
private Class policyClass;
private HAInvokerWrapper invokerWrapper;
private HATarget invokerTarget;
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/component-matrix/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -55,7 +55,12 @@
<version.org.jboss.aspects.remoting>1.0.1.GA</version.org.jboss.aspects.remoting>
<version.org.jboss.aspects.security>1.0.1</version.org.jboss.aspects.security>
<version.org.jboss.aspects.transaction>1.0.0.GA</version.org.jboss.aspects.transaction>
- <version.org.jboss.bootstrap>1.0.0-Beta-2</version.org.jboss.bootstrap>
+ <version.org.jboss.bootstrap.impl.as>2.0.0-alpha-2</version.org.jboss.bootstrap.impl.as>
+ <version.org.jboss.bootstrap.impl.base>2.0.0-alpha-2</version.org.jboss.bootstrap.impl.base>
+ <version.org.jboss.bootstrap.impl.mc>2.0.0-alpha-1</version.org.jboss.bootstrap.impl.mc>
+ <version.org.jboss.bootstrap.spi>2.0.0-alpha-2</version.org.jboss.bootstrap.spi>
+ <version.org.jboss.bootstrap.spi.as>2.0.0-alpha-2</version.org.jboss.bootstrap.spi.as>
+ <version.org.jboss.bootstrap.spi.mc>2.0.0-alpha-1</version.org.jboss.bootstrap.spi.mc>
<version.org.jboss.cache.core>3.1.0.GA</version.org.jboss.cache.core>
<version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
<version.org.jboss.cl>2.0.6.GA</version.org.jboss.cl>
@@ -76,9 +81,8 @@
<version.org.jboss.integration>5.1.0.SP1</version.org.jboss.integration>
<version.org.jboss.jbossxb>2.0.1.GA</version.org.jboss.jbossxb>
<version.org.jboss.jpa>1.0.0</version.org.jboss.jpa>
- <version.org.jboss.logbridge>1.0.0.GA</version.org.jboss.logbridge>
<version.org.jboss.logging>2.1.0.GA</version.org.jboss.logging>
- <version.org.jboss.logmanager>1.0.0.GA</version.org.jboss.logmanager>
+ <version.org.jboss.logmanager>1.1.0.CR4</version.org.jboss.logmanager>
<version.org.jboss.man>2.1.1.CR1</version.org.jboss.man>
<version.org.jboss.mdr>2.0.2.GA</version.org.jboss.mdr>
<version.org.jboss.metadata>1.0.1.GA</version.org.jboss.metadata>
@@ -557,24 +561,30 @@
</dependency>
<dependency>
- <groupId>org.jboss.logbridge</groupId>
- <artifactId>jboss-logbridge</artifactId>
- <version>${version.org.jboss.logbridge}</version>
- <exclusions>
- <exclusion>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-logmanager</artifactId>
+ <version>1.0.0.CR2</version>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>logging-service-metadata</artifactId>
+ <version>1.0.0.CR1</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>${version.org.jboss.logmanager}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.logmanager</groupId>
+ <artifactId>jboss-logmanager-log4j</artifactId>
+ <version>1.0.0.CR2</version>
+ </dependency>
+
+ <dependency>
<groupId>jboss</groupId>
<artifactId>jboss-j2ee</artifactId>
<version>4.0.2</version>
@@ -1104,12 +1114,24 @@
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${version.org.slf4j}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logging</artifactId>
<version>${version.org.jboss.slf4j}</version>
</dependency>
-
+
<dependency>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ <version>1.0.0.CR1</version>
+ </dependency>
+
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${version.org.hibernate}</version>
@@ -1756,9 +1778,39 @@
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
- <version>${version.org.jboss.bootstrap}</version>
+ <artifactId>jboss-bootstrap-impl-as</artifactId>
+ <version>${version.org.jboss.bootstrap.impl.as}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-base</artifactId>
+ <version>${version.org.jboss.bootstrap.impl.base}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-mc</artifactId>
+ <version>${version.org.jboss.bootstrap.impl.mc}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi</artifactId>
+ <version>${version.org.jboss.bootstrap.spi}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
+ <version>${version.org.jboss.bootstrap.spi.as}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-mc</artifactId>
+ <version>${version.org.jboss.bootstrap.spi.mc}</version>
+ </dependency>
<dependency>
<groupId>org.jboss.javaee</groupId>
@@ -2216,6 +2268,7 @@
<!-- JBAS-6904: use org.hibernate:hibernate-core -->
<exclude>org.hibernate:hibernate</exclude>
<exclude>org.jboss.jbossas:jboss-as-bootstrap</exclude> <!-- org.jboss.bootstrap:jboss-bootstrap JBAS-6171 -->
+ <exclude>org.jboss.jbossas:jboss-bootstrap</exclude> <!-- org.jboss.bootstrap:jboss-bootstrap-impl-as JBAS-6856 -->
<exclude>wutka-dtdparser:dtdparser121</exclude>
</excludes>
</bannedDependencies>
Modified: trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -41,7 +41,7 @@
import javax.resource.spi.endpoint.MessageEndpointFactory;
import javax.resource.spi.work.WorkManager;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.config.ServerConfigUtil;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.resource.deployment.ActivationSpecFactory;
import org.jboss.resource.deployment.ResourceAdapterFactory;
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/console/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -180,7 +180,7 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
Modified: trunk/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java
===================================================================
--- trunk/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/console/src/main/org/jboss/console/manager/DeploymentFileRepository.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -29,7 +29,7 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.system.server.ServerConfigLocator;
@@ -131,8 +131,8 @@
{
// get server's home for relative paths, need this for setting
// attribute final values, so we need to do it here
- ServerConfig serverConfig = ServerConfigLocator.locate();
- serverHome = serverConfig.getServerHomeDir();
+ JBossASServerConfig serverConfig = ServerConfigLocator.locate();
+ serverHome = new File(serverConfig.getServerHomeLocation().toURI());
return super.preRegister(server, name);
}
Modified: trunk/hibernate-int/pom.xml
===================================================================
--- trunk/hibernate-int/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/hibernate-int/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -70,8 +70,8 @@
<dependencies>
<!-- Compile (global dependencies) -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
Modified: trunk/iiop/src/assembly/client.xml
===================================================================
--- trunk/iiop/src/assembly/client.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/iiop/src/assembly/client.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,7 +21,7 @@
<include>**/jboss/proxy/ejb/*ImplIIOP*.class</include>
<include>**/jboss/proxy/ejb/IIOPHomeFactory.class</include>
<include>**/jboss/tm/**</include>
- <include>**/jboss/util/Log4jLoggerFactory.class</include>
+ <include>**/jboss/util/JacorbLoggerFactory.class</include>
<include>org/omg/stub/javax/ejb/_EJBHome_Stub.class</include>
<include>org/omg/stub/javax/ejb/_EJBObject_Stub.class</include>
</includes>
Modified: trunk/iiop/src/main/org/jboss/iiop/CorbaORBService.java
===================================================================
--- trunk/iiop/src/main/org/jboss/iiop/CorbaORBService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/iiop/src/main/org/jboss/iiop/CorbaORBService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -33,13 +33,13 @@
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.iiop.naming.ORBInitialContextFactory;
import org.jboss.metadata.MetaData;
import org.jboss.proxy.ejb.handle.HandleDelegateImpl;
import org.jboss.security.SecurityDomain;
import org.jboss.system.Registry;
import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.config.ServerConfigUtil;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.IdAssignmentPolicy;
Deleted: trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java
===================================================================
--- trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.logger.Log4JLogger;
-import org.jacorb.config.LoggerFactory;
-import org.jboss.logging.log4j.Log4jLoggerPlugin;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * JacORB logger factory that creates named Avalon loggers with log4j
- * as the underlying log mechanism.
- *
- * @author <a href="mailto:reverbel at ime.usp.br">Francisco Reverbel</a>
- * @version $Revision$
- */
-public class Log4jLoggerFactory
- implements LoggerFactory
-{
- /** logging back-end mechanism used by all Log4jLoggerFactory instances */
- private final static String name = "log4j";
-
- /** cache of created loggers */
- private final Map namedLoggers = new HashMap();
-
- // Auxiliary static methods --------------------------------------
-
- /**
- * Gets a log4j logger by name.
- *
- * @param name the name of the logger
- * @return an <code>org.apache.log4j.Logger</code> instance
- */
- private static org.apache.log4j.Logger getLog4jLogger(String name)
- {
- org.jboss.logging.Logger l = org.jboss.logging.Logger.getLogger(name);
- org.jboss.logging.LoggerPlugin lp = l.getLoggerPlugin();
- if (lp instanceof Log4jLoggerPlugin)
- return ((Log4jLoggerPlugin)lp).getLogger();
- else
- {
- return null;
- }
- }
-
-
- // Implementation of org.apache.avalon.framework.configuration.Configuration
-
- public void configure(Configuration configuration)
- throws ConfigurationException
- {
- }
-
- // Implementation of org.jacorb.util.LoggerFactory ---------------
-
- /**
- * Gets the name of the logging back-end mechanism.
- *
- * @return the string <code>"log4j"</code>
- */
- public final String getLoggingBackendName()
- {
- return name;
- }
-
- /**
- * Gets an Avalon logger by name.
- *
- * @param name the name of the logger
- * @return an <code>org.apache.avalon.framework.logger.Logger</code>
- * instance
- */
- public Logger getNamedLogger(String name)
- {
- Object o = namedLoggers.get(name);
-
- if (o != null)
- return (Logger)o;
-
- org.apache.log4j.Logger log4jLogger = getLog4jLogger(name);
- Logger logger = new Log4JLogger(log4jLogger);
-
- namedLoggers.put(name, logger);
- return logger;
- }
-
- /**
- * Gets an Avalon root logger by name.
- *
- * @param name the name of the logger
- * @return an <code>org.apache.avalon.framework.logger.Logger</code>
- * instance
- */
- public Logger getNamedRootLogger(String name)
- {
- return getNamedLogger(name);
- }
-
- /**
- * Creates a named Avalon logger with given <code>logFileName</code>
- * and <code>maxLogSize</code> parameters. This is a dummy implementation
- * that always return null.
- *
- * @param name the name of the logger
- * @param logFileName the name of the file to log to
- * @param maxLogSize maximum size of the log file.
- *
- * @return the new logger (null in this implementation).
- */
- public Logger getNamedLogger(String name,
- String logFileName, long maxLogSize)
- throws java.io.IOException
- {
- return null;
- }
-
- /**
- * set the file name and max file size for logging to a file
- */
- public void setDefaultLogFile(String fileName, long maxLogSize)
- throws java.io.IOException
- {
- // not implemented
- }
-
-}
Copied: trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java (from rev 91251, branches/dml-log-service-integration/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java)
===================================================================
--- trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java (rev 0)
+++ trunk/iiop/src/main/org/jboss/util/Log4jLoggerFactory.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.util;
+
+import org.jacorb.config.LoggerFactory;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+
+import java.io.IOException;
+
+/**
+ * A stub logger factory which delegates to the JBoss common logging system. Despite its name it has nothing to
+ * do with log4j; it's so named due to external deps which will hopefully be changed some time soon (jacorb:resources).
+ */
+public final class Log4jLoggerFactory implements LoggerFactory
+{
+ public String getLoggingBackendName()
+ {
+ return "jboss";
+ }
+
+ public Logger getNamedLogger(String s)
+ {
+ return new AvalonLogger(s);
+ }
+
+ public Logger getNamedRootLogger(String s)
+ {
+ return getNamedLogger(s);
+ }
+
+ public Logger getNamedLogger(String s, String s1, long l) throws IOException
+ {
+ return null;
+ }
+
+ public void setDefaultLogFile(String s, long l) throws IOException
+ {
+ // ignore
+ }
+
+ public void configure(Configuration configuration) throws ConfigurationException
+ {
+ // ignore
+ }
+
+ /**
+ * A stub Avalon logger implementation which delegates to the JBoss logger system.
+ */
+ static final class AvalonLogger implements Logger
+ {
+ private static final String FQCN = AvalonLogger.class.getName();
+
+ private final org.jboss.logging.Logger logger;
+ private final String name;
+
+ public AvalonLogger(String name)
+ {
+ this.name = name;
+ logger = org.jboss.logging.Logger.getLogger(name);
+ }
+
+ public void debug(String s)
+ {
+ logger.debug(FQCN, s, null);
+ }
+
+ public void debug(String s, Throwable throwable)
+ {
+ logger.debug(FQCN, s, throwable);
+ }
+
+ @Deprecated
+ public boolean isDebugEnabled()
+ {
+ return logger.isDebugEnabled();
+ }
+
+ public void info(String s)
+ {
+ logger.info(FQCN, s, null);
+ }
+
+ public void info(String s, Throwable throwable)
+ {
+ logger.info(FQCN, s, throwable);
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return logger.isInfoEnabled();
+ }
+
+ public void warn(String s)
+ {
+ logger.warn(FQCN, s, null);
+ }
+
+ public void warn(String s, Throwable throwable)
+ {
+ logger.warn(FQCN, s, throwable);
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return true;
+ }
+
+ public void error(String s)
+ {
+ logger.error(FQCN, s, null);
+ }
+
+ public void error(String s, Throwable throwable)
+ {
+ logger.error(FQCN, s, throwable);
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return true;
+ }
+
+ public void fatalError(String s)
+ {
+ logger.fatal(FQCN, s, null);
+ }
+
+ public void fatalError(String s, Throwable throwable)
+ {
+ logger.fatal(FQCN, s, throwable);
+ }
+
+ public boolean isFatalErrorEnabled()
+ {
+ return true;
+ }
+
+ public Logger getChildLogger(String s)
+ {
+ final String name = this.name;
+ return new AvalonLogger(name == null || name.length() == 0 ? s : name + "." + s);
+ }
+ }
+}
Modified: trunk/main/build.xml
===================================================================
--- trunk/main/build.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/build.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -127,23 +127,6 @@
-->
<target name="module-jars" >
- <!--
- | Build log4j-boot.jar This is a minimal subset of the log4j
- | classes that allow the boot process to use log4j but avoids
- | loading log4j classes that depend on other features like
- | JMS, JDBC, JavaMail, etc.
- -->
-
- <jar jarfile="${build.lib}/log4j-boot.jar">
- <zipfileset src="${apache.log4j.lib}/log4j.jar">
- <include name="org/apache/log4j/*"/>
- <include name="org/apache/log4j/config/*"/>
- <include name="org/apache/log4j/helpers/*"/>
- <include name="org/apache/log4j/or/*"/>
- <include name="org/apache/log4j/spi/*"/>
- </zipfileset>
- </jar>
-
<!-- -->
<jar jarfile="${build.lib}/jboss-main.jar" manifest="${build.etc}/default.mf">
<fileset dir="${build.classes}"/>
Modified: trunk/main/pom.xml
===================================================================
--- trunk/main/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -30,7 +30,6 @@
<configuration>
<descriptors>
<descriptor>src/assembly/client.xml</descriptor>
- <descriptor>src/assembly/log4j-boot.xml</descriptor>
</descriptors>
</configuration>
</execution>
@@ -145,7 +144,7 @@
<!-- Compile (global dependencies) -->
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
<groupId>gnu-getopt</groupId>
@@ -155,10 +154,6 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.logbridge</groupId>
- <artifactId>jboss-logbridge</artifactId>
- </dependency>
</dependencies>
</project>
Modified: trunk/main/src/assembly/run.xml
===================================================================
--- trunk/main/src/assembly/run.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/src/assembly/run.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -28,18 +28,39 @@
<unpack>true</unpack>
<unpackOptions>
<includes>
- <include>org/jboss/bootstrap/spi/Server.class</include>
- <include>org/jboss/bootstrap/spi/ServerConfig.class</include>
- <include>org/jboss/bootstrap/spi/util/ServerConfigUtil.class</include>
+ <include>org/jboss/bootstrap/spi/**</include>
</includes>
</unpackOptions>
<includes>
- <include>org.jboss.bootstrap:jboss-bootstrap</include>
+ <include>org.jboss.bootstrap:jboss-bootstrap-spi</include>
</includes>
</dependencySet>
<dependencySet>
<unpack>true</unpack>
+ <unpackOptions>
+ <includes>
+ <include>org/jboss/bootstrap/spi/as/config/JBossASServerConfig.class</include>
+ <include>org/jboss/bootstrap/spi/as/config/JBossASConfigurationInitializer.class</include>
+ </includes>
+ </unpackOptions>
<includes>
+ <include>org.jboss.bootstrap:jboss-bootstrap-spi-as</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <includes>
+ <include>org/jboss/bootstrap/spi/mc/config/MCBasedServerConfig.class</include>
+ </includes>
+ </unpackOptions>
+ <includes>
+ <include>org.jboss.bootstrap:jboss-bootstrap-spi-mc</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <unpack>true</unpack>
+ <includes>
<include>gnu-getopt:getopt</include>
</includes>
</dependencySet>
Modified: trunk/main/src/main/org/jboss/Main.java
===================================================================
--- trunk/main/src/main/org/jboss/Main.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/src/main/org/jboss/Main.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,36 +21,37 @@
*/
package org.jboss;
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.Closeable;
import java.io.File;
import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
+import java.net.URLClassLoader;
import java.net.URLDecoder;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
+import java.util.Set;
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
-import org.jboss.system.server.ServerLoader;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.factory.ServerFactory;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.server.Server;
+
/**
* Provides a command line interface to start the JBoss server.
*
- * <p>
- * To enable debug or trace messages durring boot change the Log4j
- * configuration to use either <tt>log4j-debug.properties</tt>
- * <tt>log4j-trace.properties</tt> by setting the system property
- * <tt>log4j.configuration</tt>:
- *
- * <pre>
- * ./run.sh -Dlog4j.configuration=log4j-debug.properties
- * </pre>
- * TODO: Should jdk logging be the default
- *
* @author <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
* @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
* @author <a href="mailto:adrian.brock at happeningtimes.com">Adrian Brock</a>
@@ -60,46 +61,105 @@
*/
public class Main
{
- /** EDU.oswego.cs.dl.util.concurrent */
- private String concurrentLib = "concurrent.jar";
/** A URL for obtaining microkernel patches */
private URL bootURL;
-
+
/** Extra jars from the /lib location that are added to the start of the boot
- classpath. This can be used to override jboss /lib boot classes.
- */
- private List<String> bootLibraries = new LinkedList<String>();
+ classpath. This can be used to override jboss /lib boot classes.
+ */
+ private List<URL> bootLibraries = new LinkedList<URL>();
/** Extra libraries to load the server with .*/
- private List<String> extraLibraries = new LinkedList<String>();
+ private List<URL> extraLibraries = new LinkedList<URL>();
/** Extra classpath URLS to load the server with .*/
private List<URL> extraClasspath = new LinkedList<URL>();
+
+ /**
+ * The default list of boot libraries. Does not include
+ * the JAXP or JMX impl, users of this class should add the
+ * proper libraries.
+ * TODO: use vfs to list the root directory
+ * http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153175
+ *
+ * Copied from legacy bootstrap ServerLoader
+ * //TODO JBAS-6920
+ */
+ @Deprecated
+ public static final String[] DEFAULT_BOOT_LIBRARY_LIST =
+ {
+ // Concurrent
+ "concurrent.jar",
+ // Logging
+ "jboss-logging-spi.jar",
+ "jboss-logmanager.jar",
+ "jboss-logging-logmanager.jar",
+ // Common jars
+ "jboss-common-core.jar",
+ "jboss-xml-binding.jar",
+ // Bootstrap
+ "jboss-bootstrap-spi.jar", "jboss-bootstrap-spi-as.jar", "jboss-bootstrap-spi-mc.jar",
+ "jboss-bootstrap-impl-base.jar", "jboss-bootstrap-impl-as.jar",
+ "jboss-bootstrap-impl-mc.jar",
+ // Microcontainer
+ "javassist.jar", "jboss-reflect.jar", "jboss-mdr.jar", "jboss-dependency.jar", "jboss-kernel.jar",
+ "jboss-metatype.jar", "jboss-managed.jar",
+ // Fixme ClassLoading
+ "jboss-vfs.jar", "jboss-classloading-spi.jar", "jboss-classloader.jar", "jboss-classloading.jar",
+ "jboss-classloading-vfs.jar",
+ // Fixme aop
+ "jboss-aop.jar", "jboss-aop-mc-int.jar", "trove.jar",};
/**
* Server properties. This object holds all of the required
* information to get the server up and running. Use System
* properties for defaults.
*/
- private Properties props = new Properties(System.getProperties());
+ private Map<String, String> props = new HashMap<String, String>();
- /** The booted server instance */
- private Server server;
+ /**
+ * The booted server instance.
+ *
+ * We don't use JBossASServer directly here, because it has
+ * a reference to MC and the Kernel. This would put the bootstrap
+ * AS SPI upon the application classpath, with references to
+ * classes on child ClassLoaders, leading to NCDFE. So just use
+ * the minimal SPI set and load everything via reflection
+ * using the URLCLs we create which reference the boot libraries.
+ */
+ private Server<?, ?> server;
/**
+ * The FQN of the default server implementation class to create
+ */
+ private static final String DEFAULT_AS_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.server.JBossASServerImpl";
+
+ /**
+ * The name of the system property denoting where the boot.log will be placed
+ */
+ private static final String SYS_PROP_BOOT_LOG_DIR_NAME = "jboss.boot.server.log.dir";
+
+ /**
* Explicit constructor.
*/
public Main()
{
- super();
+ // Set default properties
+ final Properties sysProps = System.getProperties();
+ for (final Object propName : sysProps.keySet())
+ {
+ final String propNameString = (String) propName;
+ final String propValue = (String) sysProps.get(propNameString);
+ props.put(propNameString, propValue);
+ }
}
/**
* Access the booted server.
* @return the Server instance.
*/
- public Server getServer()
+ public Server<?, ?> getServer()
{
return server;
}
@@ -121,17 +181,29 @@
// First process the command line to pickup custom props/settings
processCommandLine(args);
- // Initialize the JDK logmanager
- String name = System.getProperty("java.util.logging.manager");
- if (name == null) {
- System.setProperty("java.util.logging.manager",
- "org.jboss.logmanager.LogManager");
+ // Get JBOSS_HOME appropriately
+ final String homeUrl = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
+ final String homeDir = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_DIR);
+ URL jbossHome = null;
+ // We've been given home URL
+ if (homeUrl != null)
+ {
+ jbossHome = new URL(homeUrl);
}
-
- // Auto set HOME_DIR to ../bin/run.jar if not set
- String homeDir = props.getProperty(ServerConfig.HOME_DIR);
- if (homeDir == null)
+ // We've been given home dir
+ else if (homeDir != null)
{
+ final File homeDirFile = new File(homeDir);
+ if (!homeDirFile.exists())
+ {
+ throw new IllegalArgumentException("Specified " + JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_DIR
+ + " does not point to a valid location: " + homeDirFile.toString());
+ }
+ jbossHome = homeDirFile.toURI().toURL();
+ }
+ // Nothing specified, so autoset relative to our location
+ else
+ {
String path = Main.class.getProtectionDomain().getCodeSource().getLocation().getFile();
/* The 1.4 JDK munges the code source file with URL encoding so run
* this path through the decoder so that is JBoss starts in a path with
@@ -140,22 +212,68 @@
path = URLDecoder.decode(path, "UTF-8");
File runJar = new File(path);
File homeFile = runJar.getParentFile().getParentFile();
- homeDir = homeFile.getCanonicalPath();
+ URL homeUrlFromDir = homeFile.toURI().toURL();
+ jbossHome = homeUrlFromDir;
}
- props.setProperty(ServerConfig.HOME_DIR, homeDir);
- // Setup HOME_URL too, ServerLoader needs this
- String homeURL = props.getProperty(ServerConfig.HOME_URL);
- if (homeURL == null)
+ // Get Library URL
+ String libUrlFromProp = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_BOOT_LIBRARY_URL);
+ URL libUrl = null;
+ if (libUrlFromProp != null)
{
- File file = new File(homeDir);
- homeURL = file.toURI().toURL().toString();
- props.setProperty(ServerConfig.HOME_URL, homeURL);
+ libUrl = new URL(libUrlFromProp);
}
+ else
+ {
+ libUrl = new URL(jbossHome, JBossASConfigurationInitializer.VALUE_LIBRARY_URL_SUFFIX_DEFAULT);
+ }
- // Load the server instance
- ServerLoader loader = new ServerLoader(props);
+ /*
+ * Set boot log directory
+ */
+ final String sysPropBootLogDir = SYS_PROP_BOOT_LOG_DIR_NAME;
+ final String sysPropLogDir = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_LOG_DIR;
+ String serverName = props.get(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_NAME);
+ if (serverName == null || serverName.length() == 0)
+ {
+ serverName = JBossASConfigurationInitializer.VALUE_SERVER_NAME_DEFAULT;
+ }
+ final String manualBootLogDir = props.get(sysPropBootLogDir);
+ final String manualLogDir = props.get(sysPropLogDir);
+ // If nothing's been explicitly specified
+ if (manualBootLogDir == null && manualLogDir == null)
+ {
+ // We default it
+ final URL serverLog = new URL(jbossHome, "server/" + serverName + "/log/");
+ final File serverLogFile = new File(serverLog.toURI());
+ final String serverLogString = serverLogFile.getAbsolutePath();
+ SecurityActions.setSystemProperty(sysPropBootLogDir, serverLogString);
+ }
+ // If we've got a manual log dir, use it
+ else if (manualLogDir != null)
+ {
+ SecurityActions.setSystemProperty(sysPropBootLogDir, manualLogDir);
+ }
+ // Initialize the JDK logmanager
+ String name = System.getProperty("java.util.logging.manager");
+ if (name == null) {
+ System.setProperty("java.util.logging.manager",
+ "org.jboss.logmanager.LogManager");
+ String pluginClass = System.getProperty("org.jboss.logging.Logger.pluginClass");
+ if (pluginClass == null) {
+ System.setProperty("org.jboss.logging.Logger.pluginClass", "org.jboss.logging.logmanager.LoggerPluginImpl");
+ // disable log4j configuration, in case any early modules trigger it
+ System.setProperty("log4j.defaultInitOverride", "true");
+ }
+ }
+
+ // Get TCCL
+ final ClassLoader tccl = SecurityActions.getThreadContextClassLoader();
+
+ // Define a Set URLs to have visible to the CL loading the Server
+ final Set<URL> urls = new HashSet<URL>();
+
/* If there is a patch dir specified make it the first element of the
loader bootstrap classpath. If its a file url pointing to a dir, then
add the dir and its contents.
@@ -168,63 +286,108 @@
if (dir.exists())
{
// Add the local file patch directory
- loader.addURL(dir.toURL());
+ urls.add(dir.toURI().toURL());
// Add the contents of the directory too
File[] jars = dir.listFiles(new JarFilter());
for (int j = 0; jars != null && j < jars.length; j++)
{
- loader.addURL(jars[j].getCanonicalFile().toURL());
+ urls.add(jars[j].getCanonicalFile().toURI().toURL());
}
}
}
else
{
- loader.addURL(bootURL);
+ urls.add(bootURL);
}
}
// Add any extra libraries
- for (int i = 0; i < bootLibraries.size(); i++)
+ for (URL bootLibrary : bootLibraries)
{
- loader.addLibrary(bootLibraries.get(i));
+ urls.add(bootLibrary);
}
- // Add the jars from the endorsed dir
- loader.addEndorsedJars();
+// // Add the jars from the endorsed dir
+// loader.addEndorsedJars();
- // jmx UnifiedLoaderRepository needs a concurrent class...
- loader.addLibrary(concurrentLib);
+// // jmx UnifiedLoaderRepository needs a concurrent class...
+// loader.addLibrary(concurrentLib);
// Add any extra libraries after the boot libs
- for (int i = 0; i < extraLibraries.size(); i++)
+ for (URL extraLibrary : extraLibraries)
{
- loader.addLibrary(extraLibraries.get(i));
+ urls.add(extraLibrary);
}
// Add any extra classapth URLs
- for (int i = 0; i < extraClasspath.size(); i++)
+ for (URL anExtraClasspath : extraClasspath)
{
- loader.addURL(extraClasspath.get(i));
+ urls.add(anExtraClasspath);
}
+
+ // Add all boot libs required from $JBOSS_HOME/lib
+ final File bootLibDir = new File(libUrl.toURI());
+ if (!bootLibDir.exists())
+ {
+ throw new IllegalArgumentException("Boot lib directory not found: " + bootLibDir.toString());
+ }
+ if (!bootLibDir.isDirectory())
+ {
+ throw new IllegalArgumentException("Boot lib directory is not a directory: " + bootLibDir.toString());
+ }
+ for (String filename : DEFAULT_BOOT_LIBRARY_LIST)
+ {
+ final File bootLibFile = new File(bootLibDir, filename);
+ if (!bootLibFile.exists())
+ {
+ System.out.println("WARNING: Could not find expected boot lib " + bootLibFile);
+ }
+ final URL bootLibUrl = bootLibFile.toURI().toURL();
+ urls.add(bootLibUrl);
+ }
+
+ // Make a ClassLoader to be used in loading the server
+ final URL[] urlArray = urls.toArray(new URL[urls.size()]);
+ final ClassLoader loadingCl = new URLClassLoader(urlArray, tccl);
// Load the server
- ClassLoader parentCL = Thread.currentThread().getContextClassLoader();
- server = loader.load(parentCL);
+ server = ServerFactory.createServer(DEFAULT_AS_SERVER_IMPL_CLASS_NAME, loadingCl);
- // Initialize the server
- server.init(props);
+ // Get out the default configuration
+ // This cast to object first is to workaround the JDK Bug: http://bugs.sun.com/view_bug.do?bug_id=6548436
+ final Object jdk6Bug6548436Hack = (Object) server.getConfiguration();
+ JBossASServerConfig config = (JBossASServerConfig) jdk6Bug6548436Hack;
- // Start 'er up mate!
- server.start();
+ // Set JBOSS_HOME and properties
+ config.properties(props).jbossHome(jbossHome);
+
+ // Make a shutdown hook
+ SecurityActions.addShutdownHook(new ShutdownHook(server, loadingCl));
+
+ try
+ {
+ // Set the CL
+ SecurityActions.setThreadContextClassLoader(loadingCl);
+
+ // Initialize the server
+ server.initialize();
+
+ // Start 'er up mate!
+ server.start();
+ }
+ finally
+ {
+ // Reset the CL
+ SecurityActions.setThreadContextClassLoader(tccl);
+ }
}
/**
* Shutdown the booted Server instance.
- *
*/
- public void shutdown()
+ public void shutdown() throws Exception
{
server.shutdown();
}
@@ -269,54 +432,52 @@
String programName = System.getProperty("program.name", "jboss");
String sopts = "-:hD:d:p:n:c:Vj::B:L:C:P:b:g:u:m:l:";
LongOpt[] lopts =
- {
- new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
- new LongOpt("bootdir", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
- new LongOpt("patchdir", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
- new LongOpt("netboot", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
- new LongOpt("configuration", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
- new LongOpt("version", LongOpt.NO_ARGUMENT, null, 'V'),
- new LongOpt("jaxp", LongOpt.REQUIRED_ARGUMENT, null, 'j'),
- new LongOpt("bootlib", LongOpt.REQUIRED_ARGUMENT, null, 'B'),
- new LongOpt("library", LongOpt.REQUIRED_ARGUMENT, null, 'L'),
- new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'C'),
- new LongOpt("properties", LongOpt.REQUIRED_ARGUMENT, null, 'P'),
- new LongOpt("host", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
- new LongOpt("partition", LongOpt.REQUIRED_ARGUMENT, null, 'g'),
- new LongOpt("udp", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
- new LongOpt("mcast_port", LongOpt.REQUIRED_ARGUMENT, null, 'm'),
- new LongOpt("log", LongOpt.REQUIRED_ARGUMENT, null, 'l'),
- };
+ {new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+ new LongOpt("bootdir", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
+ new LongOpt("patchdir", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
+ new LongOpt("netboot", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
+ new LongOpt("configuration", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+ new LongOpt("version", LongOpt.NO_ARGUMENT, null, 'V'),
+ new LongOpt("jaxp", LongOpt.REQUIRED_ARGUMENT, null, 'j'),
+ new LongOpt("bootlib", LongOpt.REQUIRED_ARGUMENT, null, 'B'),
+ new LongOpt("library", LongOpt.REQUIRED_ARGUMENT, null, 'L'),
+ new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'C'),
+ new LongOpt("properties", LongOpt.REQUIRED_ARGUMENT, null, 'P'),
+ new LongOpt("host", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
+ new LongOpt("partition", LongOpt.REQUIRED_ARGUMENT, null, 'g'),
+ new LongOpt("udp", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
+ new LongOpt("mcast_port", LongOpt.REQUIRED_ARGUMENT, null, 'm'),
+ new LongOpt("log", LongOpt.REQUIRED_ARGUMENT, null, 'l'),};
Getopt getopt = new Getopt(programName, args, sopts, lopts);
int code;
String arg;
- if (System.getProperty(ServerConfig.SERVER_BIND_ADDRESS) == null)
+ final String propKeyJBossasBindAddress = JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS;
+ if (props.get(propKeyJBossasBindAddress) == null)
{
- // ServerConfig.SERVER_BIND_ADDRESS could have been defined via
+ // JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS could have been defined via
// run.conf and so we don't wanna override that.
- props.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
- System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
+ final String defaultBindAddress = "127.0.0.1";
+ props.put(propKeyJBossasBindAddress, defaultBindAddress);
+ System.setProperty(propKeyJBossasBindAddress, defaultBindAddress);
}
while ((code = getopt.getopt()) != -1)
{
switch (code)
{
- case ':':
- case '?':
+ case ':' :
+ case '?' :
// for now both of these should exit with error status
System.exit(1);
break; // for completeness
- case 1:
+ case 1 :
// this will catch non-option arguments
// (which we don't currently care about)
- System.err.println(programName +
- ": unused non-option argument: " +
- getopt.getOptarg());
+ System.err.println(programName + ": unused non-option argument: " + getopt.getOptarg());
break; // for completeness
- case 'h':
+ case 'h' :
// show command line help
System.out.println("usage: " + programName + " [options]");
System.out.println();
@@ -325,7 +486,8 @@
System.out.println(" -V, --version Show version information");
System.out.println(" -- Stop processing options");
System.out.println(" -D<name>[=<value>] Set a system property");
- System.out.println(" -d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url");
+ System.out
+ .println(" -d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url");
System.out.println(" -p, --patchdir=<dir> Set the patch directory; Must be absolute or url");
System.out.println(" -n, --netboot=<url> Boot from net with the given url as base");
System.out.println(" -c, --configuration=<name> Set the server configuration name");
@@ -342,8 +504,7 @@
System.exit(0);
break; // for completeness
- case 'D':
- {
+ case 'D' : {
// set a system property
arg = getopt.getOptarg();
String name, value;
@@ -376,38 +537,38 @@
break;
}
- case 'd':
+ case 'd' :
// set the boot patch URL
bootURL = makeURL(getopt.getOptarg());
break;
- case 'p':
- {
+ case 'p' : {
// set the patch URL
URL patchURL = makeURL(getopt.getOptarg());
- props.put(ServerConfig.PATCH_URL, patchURL.toString());
+ //TODO
+ // props.put(ServerConfig.PATCH_URL, patchURL.toString());
break;
}
- case 'n':
+ case 'n' :
// set the net boot url
arg = getopt.getOptarg();
// make sure there is a trailing '/'
- if (!arg.endsWith("/")) arg += "/";
+ if (!arg.endsWith("/"))
+ arg += "/";
- props.put(ServerConfig.HOME_URL, new URL(arg).toString());
+ props.put(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL, new URL(arg).toString());
break;
- case 'c':
+ case 'c' :
// set the server name
arg = getopt.getOptarg();
- props.put(ServerConfig.SERVER_NAME, arg);
+ props.put(JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_NAME, arg);
break;
- case 'V':
- {
+ case 'V' : {
// Package information for org.jboss
Package jbossPackage = Package.getPackage("org.jboss");
@@ -421,41 +582,40 @@
break; // for completness
}
- case 'j':
+ case 'j' :
// Show an error and exit
System.err.println(programName + ": option '-j, --jaxp' no longer supported");
System.exit(1);
break; // for completness
- case 'B':
+ case 'B' :
arg = getopt.getOptarg();
- bootLibraries.add(arg);
+ bootLibraries.add(new File(arg).toURI().toURL());
break;
- case 'L':
+ case 'L' :
arg = getopt.getOptarg();
- extraLibraries.add(arg);
+ extraLibraries.add(new File(arg).toURI().toURL());
break;
- case 'C':
- {
+ case 'C' : {
URL url = makeURL(getopt.getOptarg());
extraClasspath.add(url);
break;
}
- case 'P':
- {
+ case 'P' : {
// Set system properties from url/file
URL url = makeURL(getopt.getOptarg());
Properties props = System.getProperties();
props.load(url.openConnection().getInputStream());
break;
}
- case 'b':
+ case 'b' :
arg = getopt.getOptarg();
- props.put(ServerConfig.SERVER_BIND_ADDRESS, arg);
- System.setProperty(ServerConfig.SERVER_BIND_ADDRESS, arg);
+ final String bindAddressPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS;
+ props.put(bindAddressPropName, arg);
+ System.setProperty(bindAddressPropName, arg);
// used by JGroups; only set if not set via -D so users
// can use a different interface for cluster communication
// There are 2 versions of this property, deprecated bind.address
@@ -474,49 +634,51 @@
bindAddress = ServerConfigUtil.fixRemoteAddress(arg);
System.setProperty("jgroups.bind_addr", bindAddress);
}
-
+
// Set the java.rmi.server.hostname if not set
String rmiHost = System.getProperty("java.rmi.server.hostname");
- if( rmiHost == null )
+ if (rmiHost == null)
{
rmiHost = ServerConfigUtil.fixRemoteAddress(arg);
System.setProperty("java.rmi.server.hostname", rmiHost);
}
break;
-
- case 'g':
+
+ case 'g' :
arg = getopt.getOptarg();
- props.put(ServerConfig.PARTITION_NAME_PROPERTY, arg);
- System.setProperty(ServerConfig.PARTITION_NAME_PROPERTY, arg);
+ final String partitionNamePropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_NAME;
+ props.put(partitionNamePropName, arg);
+ System.setProperty(partitionNamePropName, arg);
break;
-
- case 'u':
+
+ case 'u' :
arg = getopt.getOptarg();
- props.put(ServerConfig.PARTITION_UDP_PROPERTY, arg);
- System.setProperty(ServerConfig.PARTITION_UDP_PROPERTY, arg);
+ final String udpGroupPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_UDP_GROUP;
+ props.put(udpGroupPropName, arg);
+ System.setProperty(udpGroupPropName, arg);
// the new jgroups property name
System.setProperty("jgroups.udp.mcast_addr", arg);
break;
-
- case 'm':
+
+ case 'm' :
arg = getopt.getOptarg();
- props.put(ServerConfig.PARTITION_UDP_PORT_PROPERTY, arg);
- System.setProperty(ServerConfig.PARTITION_UDP_PORT_PROPERTY, arg);
+ final String udpPortPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_UDP_PORT;
+ props.put(udpPortPropName, arg);
+ System.setProperty(udpPortPropName, arg);
break;
-
- case 'l':
- {
+
+ case 'l' : {
arg = getopt.getOptarg();
String logPlugin = arg;
- if( arg.equalsIgnoreCase("log4j") )
+ if (arg.equalsIgnoreCase("log4j"))
logPlugin = "org.jboss.logging.Log4jLoggerPlugin";
- else if( arg.equalsIgnoreCase("jdk") )
+ else if (arg.equalsIgnoreCase("jdk"))
logPlugin = "org.jboss.logging.jdk.JDK14LoggerPlugin";
System.setProperty("org.jboss.logging.Logger.pluginClass", logPlugin);
break;
}
-
- default:
+
+ default :
// this should not happen,
// if it does throw an error so we know about it
throw new Error("unhandled option code: " + code);
@@ -524,12 +686,12 @@
}
// Fix up other bind addresses
- String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
+ String bindAddress = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
if (System.getProperty("java.rmi.server.hostname") == null)
System.setProperty("java.rmi.server.hostname", bindAddress);
if (System.getProperty("jgroups.bind_addr") == null)
System.setProperty("jgroups.bind_addr", bindAddress);
-
+
// Enable jboss.vfs.forceCopy by default, if unspecified
if (System.getProperty("jboss.vfs.forceCopy") == null)
System.setProperty("jboss.vfs.forceCopy", "true");
@@ -586,4 +748,236 @@
return name.endsWith(".jar");
}
}
+
+ /**
+ * ServerConfigUtil
+ *
+ * Utilities for accessing server configuration
+ *
+ * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintained only
+ * @version $Revision$
+ * @deprecated Moved from jboss-bootstrap Legacy as a transition class;
+ * will be removed once we move entirely to a new Main
+ */
+ @Deprecated
+ private static class ServerConfigUtil
+ {
+
+ private ServerConfigUtil()
+ {
+ }
+
+ /**
+ * Retrieve the default bind address for the server
+ *
+ * @return the default bind adress
+ */
+ public static String getDefaultBindAddress()
+ {
+ return System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+ }
+
+ /**
+ * Fix the remote inet address.
+ *
+ * If we pass the address to the client we don't want to
+ * tell it to connect to 0.0.0.0, use our host name instead
+ * @param address the passed address
+ * @return the fixed address
+ */
+ public static InetAddress fixRemoteAddress(InetAddress address)
+ {
+ try
+ {
+ if (address == null
+ || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
+ return InetAddress.getLocalHost();
+ }
+ catch (UnknownHostException ignored)
+ {
+ }
+ return address;
+ }
+
+ /**
+ * Fix the remote address.
+ *
+ * If we pass the address to the client we don't want to
+ * tell it to connect to 0.0.0.0, use our host name instead
+ * @param address the passed address
+ * @return the fixed address
+ */
+ public static String fixRemoteAddress(String address)
+ {
+ try
+ {
+ if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
+ return InetAddress.getLocalHost().getHostName();
+ }
+ catch (UnknownHostException ignored)
+ {
+ }
+ return address;
+ }
+
+ /**
+ * Get the default partition name
+ *
+ * @return the default partition name
+ */
+ public static String getDefaultPartitionName()
+ {
+ return System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_PARTITION_NAME,
+ JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT);
+ }
+
+ }
+
+ /**
+ * ShutdownHook
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision$
+ */
+ private static class ShutdownHook extends Thread
+ {
+
+ /**
+ * Underlying server instance
+ */
+ private Server<?, ?> server;
+
+ /**
+ * ClassLoader used to start/init the server
+ */
+ private ClassLoader serverCl;
+
+ /**
+ * Constructor
+ *
+ * @param server
+ * @param serverCl The ClassLoader to be optionally closed upon shutdown
+ * @throws IllegalArgumentException If any argument is not supplied (null)
+ */
+ ShutdownHook(final Server<?, ?> server, final ClassLoader serverCl) throws IllegalArgumentException
+ {
+ // Precondition checks
+ if (server == null)
+ {
+ throw new IllegalArgumentException("server must be specified");
+ }
+ if (serverCl == null)
+ {
+ throw new IllegalArgumentException("server ClassLoader must be specified");
+ }
+
+ // Set properties
+ this.server = server;
+ this.serverCl = serverCl;
+ }
+
+ /**
+ * Shuts down the server if running
+ */
+ @Override
+ public void run()
+ {
+ // If we have a server
+ if (server != null)
+ {
+ // Log out
+ System.out.println("Posting Shutdown Request to the server...");
+
+
+ // start in new thread to give positive
+ // feedback to requesting client of success.
+ final Thread shutdownThread = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ // Flag if we've got a clean shutdown (ie. server had completely started)
+ boolean cleanShutdown = false;
+
+ /*
+ * This bit is a hack.
+ *
+ * It's in place because AS does not presently respond to Thread
+ * interruption. If it did, then the start lifecycle would
+ * attempt to cleanly finish in expedient fashion such that the shutdown
+ * lifecycle could take over.
+ *
+ * Until the server is able to have start() get interrupted, we'd be
+ * blocking on a complete startup before shutdown could continue.
+ * We don't want to wait for full startup, so this hack only triggers
+ * shutdown if fully started. If still starting, we prematurely
+ * halt the VM.
+ *
+ * JBBOOT-75
+ * JBAS-6974
+ */
+ // Shutdown if started only
+ if (server.getState().equals(LifecycleState.STARTED))
+ {
+ cleanShutdown = true;
+ server.shutdown();
+ }
+
+ /*
+ * Close the Loading CL, if URLCL and JDK7+
+ * JBBOOT-23
+ */
+ if (serverCl != null && serverCl instanceof Closeable)
+ {
+ try
+ {
+ ((Closeable) serverCl).close();
+ }
+ catch (IOException ioe)
+ {
+ // Swallow
+ }
+ }
+
+ /*
+ * Part of the halt hack as explained above
+ *
+ * JBBOOT-75
+ * JBAS-6974
+ */
+ // If the server's not fully started, we're not going to block on it
+ // before calling shutdown, so just kill the VM
+ if (!cleanShutdown)
+ {
+ System.out.println("Server startup has not completed, so halting the process");
+ Runtime.getRuntime().halt(-1);
+ }
+
+ }
+ // In case of any Exception thrown up the chain, let us know
+ catch (final Exception e)
+ {
+ throw new RuntimeException("Exception encountered in shutting down the server", e);
+ }
+ }
+ };
+
+ // Run
+ shutdownThread.start();
+
+ // Block until done
+ try
+ {
+ shutdownThread.join();
+ }
+ catch (final InterruptedException ie)
+ {
+ // Clear the flag
+ Thread.interrupted();
+ }
+ }
+ }
+ }
}
Copied: trunk/main/src/main/org/jboss/SecurityActions.java (from rev 91251, branches/dml-log-service-integration/main/src/main/org/jboss/SecurityActions.java)
===================================================================
--- trunk/main/src/main/org/jboss/SecurityActions.java (rev 0)
+++ trunk/main/src/main/org/jboss/SecurityActions.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ *
+ * Collection of tasks to be run under a security manager,
+ * package-private so we don't leak out.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+ //-------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * No external instanciation
+ */
+ private SecurityActions()
+ {
+
+ }
+
+ //-------------------------------------------------------------------------------||
+ // Utility Methods --------------------------------------------------------------||
+ //-------------------------------------------------------------------------------||
+
+ /**
+ * Sets the specified property with key and value
+ */
+ static void setSystemProperty(final String key, final String value)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+ public Void run()
+ {
+ System.setProperty(key, value);
+ return null;
+ }
+ });
+ }
+
+ /**
+ * Obtains the system property with the specified key
+ *
+ * @param key
+ * @return
+ * @throws IllegalArgumentException If the key is null
+ */
+ static String getSystemProperty(final String key) throws IllegalArgumentException
+ {
+ // Precondition check
+ if (key == null)
+ {
+ throw new IllegalArgumentException("key was null");
+ }
+
+ // Get sysprop
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(key);
+ }
+ });
+ }
+
+ /**
+ * Obtains the Thread Context ClassLoader
+ */
+ static ClassLoader getThreadContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+
+ /**
+ * Sets the specified CL upon the current Thread's Context
+ *
+ * @param cl
+ * @throws IllegalArgumentException If the CL was null
+ */
+ static void setThreadContextClassLoader(final ClassLoader cl) throws IllegalArgumentException
+ {
+ if (cl == null)
+ {
+ throw new IllegalArgumentException("ClassLoader was null");
+ }
+
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+ public Void run()
+ {
+ Thread.currentThread().setContextClassLoader(cl);
+ return null;
+ };
+ });
+ }
+
+ /**
+ * Adds the specified shutdown hook
+ *
+ * @param shutdownHook
+ */
+ static void addShutdownHook(final Thread shutdownHook)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
+ public Void run()
+ {
+ Runtime.getRuntime().addShutdownHook(shutdownHook);
+ return null;
+ }
+ });
+
+ }
+}
Deleted: trunk/main/src/resources/log4j-debug.properties
===================================================================
--- trunk/main/src/resources/log4j-debug.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/src/resources/log4j-debug.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,22 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration (DEBUG) ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=DEBUG, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
Deleted: trunk/main/src/resources/log4j-trace.properties
===================================================================
--- trunk/main/src/resources/log4j-trace.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/src/resources/log4j-trace.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,22 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration (TRACE) ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=TRACE#org.jboss.logging.XLevel, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
Deleted: trunk/main/src/resources/log4j.properties
===================================================================
--- trunk/main/src/resources/log4j.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/main/src/resources/log4j.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,24 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=DEBUG, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=INFO
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
-#log4j.category.org.jboss.deployers=TRACE#org.jboss.logging.XLevel
Copied: trunk/main/src/resources/logging.properties (from rev 91251, branches/dml-log-service-integration/main/src/resources/logging.properties)
===================================================================
--- trunk/main/src/resources/logging.properties (rev 0)
+++ trunk/main/src/resources/logging.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,51 @@
+#
+# JBoss, Home of Professional Open Source.
+# Copyright 2009, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. See the copyright.txt file in the
+# distribution for a full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+
+### $Id: $ ###
+
+# Additional logger names to configure (root logger is always configured)
+#loggers=org.jboss.whatever
+
+# Root logger level
+logger.level=${jboss.boot.server.log.level:DEBUG}
+# Root logger handlers
+logger.handlers=CONSOLE, FILE
+
+# Console handler configuration
+handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
+handler.CONSOLE.properties=autoFlush
+handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO}
+handler.CONSOLE.autoFlush=true
+handler.CONSOLE.formatter=PATTERN
+
+# Boot log file handler configuration
+handler.FILE=org.jboss.logmanager.handlers.FileHandler
+handler.FILE.level=${jboss.boot.server.log.file.level:DEBUG}
+handler.FILE.properties=autoFlush,fileName
+handler.FILE.autoFlush=true
+handler.FILE.fileName=${jboss.boot.server.log.dir}/boot.log
+handler.FILE.formatter=PATTERN
+
+# Formatter pattern configuration
+formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
+formatter.PATTERN.properties=pattern
+formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n
Modified: trunk/management/pom.xml
===================================================================
--- trunk/management/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/management/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -133,7 +133,7 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
<groupId>oswego-concurrent</groupId>
Modified: trunk/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java
===================================================================
--- trunk/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/management/src/main/org/jboss/management/j2ee/cluster/HAManagementService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -45,7 +45,7 @@
import javax.management.QueryExp;
import javax.management.ReflectionException;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.management.j2ee.J2EEDomain;
import org.jboss.mx.util.ObjectNameFactory;
@@ -79,7 +79,7 @@
private ObjectName mHAManagementName;
private ObjectName mClusterPartitionName;
- private String mBackgroundPartition = ServerConfigUtil.getDefaultPartitionName();
+ private String mBackgroundPartition = JBossASConfigurationInitializer.VALUE_PARTITION_NAME_DEFAULT;
private HAPartition mPartition;
// Static --------------------------------------------------------
Modified: trunk/profileservice/src/resources/hdscanner-jboss-beans.xml
===================================================================
--- trunk/profileservice/src/resources/hdscanner-jboss-beans.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/profileservice/src/resources/hdscanner-jboss-beans.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -19,7 +19,7 @@
<constructor>
<parameter><inject bean="ProfileServiceDeploymentRepositoryAdapter"/></parameter>
</constructor>
- <property name="serverConfig"><inject bean="JBossServer" property="config"/></property>
+ <property name="serverConfig"><inject bean="JBossServer" property="configuration"/></property>
</bean>
<bean name="ProfileServiceDeploymentRepositoryAdapter" class="org.jboss.system.tools.ProfileServiceDeploymentRepositoryAdapter">
Modified: trunk/server/pom.xml
===================================================================
--- trunk/server/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -302,7 +302,7 @@
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
Deleted: trunk/server/src/etc/conf/all/bootstrap/logging.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/logging.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/bootstrap/logging.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- The Logging Subsystem
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="LogBridgeHandler" class="org.jboss.logbridge.LogBridgeHandler"/>
-
-</deployment>
\ No newline at end of file
Modified: trunk/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/profile.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/bootstrap/profile.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -151,7 +151,7 @@
<!-- Here we use the constructor version that takes the Server impl and
uses it to find the data dir. You could alternatively use a version
that takes a URI or a File. -->
- <parameter class="org.jboss.bootstrap.spi.Server"><inject bean="JBossServer"/></parameter>
+ <parameter class="org.jboss.bootstrap.spi.as.server.JBossASServer"><inject bean="JBossServer"/></parameter>
</constructor>
</bean>
Modified: trunk/server/src/etc/conf/all/bootstrap.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/bootstrap.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -5,7 +5,6 @@
-->
<bootstrap xmlns="urn:jboss:bootstrap:1.0">
- <url>bootstrap/logging.xml</url>
<url>bootstrap/vfs.xml</url>
<url>bootstrap/classloader.xml</url>
<url>bootstrap/asynch.xml</url>
Deleted: trunk/server/src/etc/conf/all/jboss-log4j.xml
===================================================================
--- trunk/server/src/etc/conf/all/jboss-log4j.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/jboss-log4j.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,612 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
- | For more configuration information and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="${jboss.server.log.dir}/server.log"/>
- <param name="Append" value="true"/>
- <!-- In AS 5.0.x the server log threshold was set by a system
- property. In 5.1 and later we are instead using the system
- property to set the priority on the root logger (see <root/> below)
- <param name="Threshold" value="${jboss.server.log.threshold}"/>
- -->
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd"/>
-
- <!-- Rollover at the top of each hour
- <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
- -->
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] (Thread) Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
-
- <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
- <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- A size based file rolling appender
- <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="${jboss.server.log.dir}/server.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <!-- ====================== -->
- <!-- More Appender examples -->
- <!-- ====================== -->
-
- <!-- Buffer events and log them asynchronously
- <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <appender-ref ref="FILE"/>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="SMTP"/>
- </appender>
- -->
-
- <!-- EMail events to an administrator
- <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Threshold" value="ERROR"/>
- <param name="To" value="admin at myhost.domain.com"/>
- <param name="From" value="nobody at myhost.domain.com"/>
- <param name="Subject" value="JBoss Sever Errors"/>
- <param name="SMTPHost" value="localhost"/>
- <param name="BufferSize" value="10"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Syslog events
- <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Facility" value="LOCAL7"/>
- <param name="FacilityPrinting" value="true"/>
- <param name="SyslogHost" value="localhost"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Log events to JMS (requires a topic to be created)
- <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Threshold" value="ERROR"/>
- <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
- <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
- </appender>
- -->
-
- <!-- Log events through SNMP
- <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
- <param name="ManagementHost" value="127.0.0.1"/>
- <param name="ManagementHostTrapListenPort" value="162"/>
- <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
- <param name="LocalIPAddress" value="127.0.0.1"/>
- <param name="LocalTrapSendPort" value="161"/>
- <param name="GenericTrapType" value="6"/>
- <param name="SpecificTrapType" value="12345678"/>
- <param name="CommunityString" value="public"/>
- <param name="ForwardStackTraceWithTrap" value="true"/>
- <param name="Threshold" value="DEBUG"/>
- <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Emit events as JMX notifications
- <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-
- <param name="Threshold" value="WARN"/>
- <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
- </layout>
- </appender>
- -->
-
- <!-- Security AUDIT Appender
- <appender name="AUDIT" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="${jboss.server.log.dir}/audit.log"/>
- <param name="Append" value="true"/>
- <param name="DatePattern" value="'.'yyyy-MM-dd"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c] (%t:%x) %m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- =============================================== -->
- <!-- Limit categories -->
- <!-- if enabling "trace" at root logger level, -->
- <!-- use limit category settings to disable trace -->
- <!-- for packages that you don't want to trace -->
- <!-- =============================================== -->
-
- <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
- <category name="org.apache">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the jacorb category to WARN as its INFO is verbose -->
- <category name="jacorb">
- <priority value="WARN"/>
- </category>
-
- <!-- Set the logging level of the JSF implementation that uses
- | java.util.logging. The jdk logging levels can be controlled
- | through the org.jboss.logging.log4j.JDKLevel class that
- | in addition to the standard log4j levels it adds support for
- | SEVERE, WARNING, CONFIG, FINE, FINER, FINEST
- -->
- <category name="javax.enterprise.resource.webcontainer.jsf">
- <priority value="INFO" class="org.jboss.logging.log4j.JDKLevel"/>
- </category>
-
- <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
- <category name="org.jgroups">
- <priority value="WARN"/>
- </category>
-
- <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
- <category name="org.quartz">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the com.sun category to INFO as its FINE is verbose -->
- <category name="com.sun">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the sun category to INFO as its FINE is verbose -->
- <category name="sun">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
- <category name="javax.xml.bind">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit JBoss categories
- <category name="org.jboss">
- <priority value="INFO"/>
- </category>
- -->
-
- <!-- Or limit individual JBoss categories
- <category name="org.jboss.web">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.tm">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.jdbc">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.on">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.services">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.bootstrap">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.kernel">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.beans">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.injection">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.annotation">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.system">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.mx">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.jmx">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.invocation">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.classloader">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.classloading">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.deployment">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.deployers">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.dependency">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.metadata">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.detailed">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.logging">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.logbridge">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.aop">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.joinpoint">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.util">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.ha">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.resource">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.varia">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.net">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.security">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.console">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.wsf">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.ejb">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.ejb3">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.jpa">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.virtual">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.xb">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.naming">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.wsf">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.ws">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.mail">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.monitor">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.remoting">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.profileservice">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.cache">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.proxy">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.jms">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.messaging">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.webbeans">
- <priority value="INFO" />
- </category>
-
- <category name="org.jboss.managed">
- <priority value="INFO" />
- </category>
- -->
-
- <!-- Limit Arjuna transaction manager
- <category name="com.arjuna">
- <priority value="INFO" />
- </category>
- -->
-
- <!-- Limit Hibernate
- <category name="org.hibernate">
- <priority value="INFO" />
- </category>
- -->
-
- <!-- Limit Ajax4jsf
- <category name="org.ajax4jsf">
- <priority value="INFO" />
- </category>
- -->
-
- <!-- Limit JNP
- <category name="org.jnp">
- <priority value="INFO" />
- </category>
- -->
-
-
- <!-- Limit the JSR77 categories -->
- <category name="org.jboss.management">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the verbose facelets compiler
- <category name="facelets.compiler">
- <priority value="WARN"/>
- </category>
- -->
-
- <!-- Limit the verbose ajax4jsf cache initialization
- <category name="org.ajax4jsf.cache">
- <priority value="WARN"/>
- </category>
- -->
- <!-- Limit the verbose embedded jopr categories
- <category name="org.rhq">
- <priority value="WARN"/>
- </category>
- -->
- <!-- Limit the verbose seam categories
- <category name="org.jboss.seam">
- <priority value="WARN"/>
- </category>
- -->
-
- <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
- <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!-- Category specifically for Security Audit Provider
- <category name="org.jboss.security.audit.providers.LogAuditProvider" additivity="false">
- <priority value="TRACE"/>
- <appender-ref ref="AUDIT"/>
- </category>
- -->
-
- <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
- <category name="org.jboss.serial">
- <priority value="INFO"/>
- </category>
-
- <!-- Decrease the priority threshold for the org.jboss.varia category
- <category name="org.jboss.varia">
- <priority value="DEBUG"/>
- </category>
- -->
-
- <!-- Enable JBossWS message tracing
- <category name="org.jboss.ws.core.MessageTrace">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!--
- | An example of enabling the custom TRACE level priority that is used
- | by the JBoss internals to diagnose low level details. This example
- | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
- | subpackages. This will produce A LOT of logging output.
- |
- | Note: since jboss AS 4.2.x, the trace level is supported natively by
- | log4j, so although the custom org.jboss.logging.XLevel priority will
- | still work, there is no need to use it. The two examples that follow
- | will both enable trace logging.
- <category name="org.jboss.system">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
- </category>
- <category name="org.jboss.ejb.plugins">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!--
- | Logs these events to SNMP:
- - server starts/stops
- - cluster evolution (node death/startup)
- - When an EJB archive is deployed (and associated verified messages)
- - When an EAR archive is deployed
-
- <category name="org.jboss.system.server.Server">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.deployment.MainDeployer">
- <priority value="ERROR" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.ejb.EJBDeployer">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.deployment.EARDeployer">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
- -->
-
- <!-- Clustering logging -->
- <!-- Uncomment the following to redirect the org.jgroups and
- org.jboss.ha categories to a cluster.log file.
-
- <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
- </layout>
- </appender>
- <category name="org.jgroups">
- <priority value="DEBUG" />
- <appender-ref ref="CLUSTER"/>
- </category>
- <category name="org.jboss.ha">
- <priority value="DEBUG" />
- <appender-ref ref="CLUSTER"/>
- </category>
- -->
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <!--
- Set the root logger priority via a system property. Note this is parsed by log4j,
- so the full JBoss system property format is not supported; e.g.
- setting a default via ${jboss.server.log.threshold:WARN} will not work.
- -->
- <priority value="${jboss.server.log.threshold}"/>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
Modified: trunk/server/src/etc/conf/all/jboss-service.xml
===================================================================
--- trunk/server/src/etc/conf/all/jboss-service.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/jboss-service.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -45,30 +45,6 @@
</mbean>
<!-- ==================================================================== -->
- <!-- Log4j Initialization -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.logging.Log4jService"
- name="jboss.system:type=Log4jService,service=Logging"
- xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
- <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
- <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
- this needs to be set to avoid a possible deadlock on exception at the
- appender level. See bug#696819.
- -->
- <attribute name="Log4jQuietMode">true</attribute>
- <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
- <attribute name="RefreshPeriod">60</attribute>
-
- <!-- The value to assign to system property jboss.server.log.threshold
- if it is not already set. This system property in turn controls
- the logging threshold for the server.log file.
- If the system property is already set when this service is created,
- this value is ignored. -->
- <attribute name="DefaultJBossServerLogThreshold">INFO</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
<!-- Active Alarm Table -->
<!-- ==================================================================== -->
Deleted: trunk/server/src/etc/conf/all/xmdesc/Log4jService-xmbean.xml
===================================================================
--- trunk/server/src/etc/conf/all/xmdesc/Log4jService-xmbean.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/xmdesc/Log4jService-xmbean.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mbean PUBLIC "-//JBoss//DTD JBOSS XMBEAN 1.1//EN"
- "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd" [
- <!ATTLIST interceptor
- proxyName CDATA #IMPLIED
->
-]>
-<!-- The Log4JService service XMBean
-$Id$
--->
-<mbean>
- <description>
- This MBean allows to get and set Log4j specific options.
-See also resource:log4j.xml
- </description>
- <class>org.jboss.logging.Log4jService</class>
- <constructor>
- <description>The default constructor</description>
- <name>Log4jService</name>
- </constructor>
-
- &defaultAttributes;
-
- <attribute access="read-write" getMethod="getConfigurationURL" setMethod="setConfigurationURL">
- <description>The URL of the log4j.xml config file.</description>
- <name>ConfigurationURL</name>
- <type>java.net.URL</type>
- </attribute>
- <attribute access="read-write" getMethod="getCatchSystemErr" setMethod="setCatchSystemErr">
- <description>Should data writen to standard error be caught and integrated into the log output.</description>
- <name>CatchSystemErr</name>
- <type>boolean</type>
- </attribute>
- <attribute access="read-write" getMethod="getCatchSystemOut" setMethod="setCatchSystemOut">
- <description>Should data writen to standard output be caught and integrated into the log output.</description>
- <name>CatchSystemOut</name>
- <type>boolean</type>
- </attribute>
- <attribute access="read-write" getMethod="getLog4jQuietMode" setMethod="setLog4jQuietMode">
- <description>Sets the log4j quite mode. For log4j 1.2.8 this must stay on true.</description>
- <name>Log4jQuietMode</name>
- <type>boolean</type>
- </attribute>
- <attribute access="read-write" getMethod="getRefreshPeriod" setMethod="setRefreshPeriod">
- <description>The time in seconds between checking for new config.</description>
- <name>RefreshPeriod</name>
- <type>int</type>
- </attribute>
- <attribute access="read-write" getMethod="getDefaultJBossServerLogThreshold" setMethod="setDefaultJBossServerLogThreshold">
- <description>The value to assign to system property jboss.server.log.threshold
- if it is not already set. This system property in turn controls
- the logging threshold for the server.log file.</description>
- <name>DefaultJBossServerLogThreshold</name>
- <type>java.lang.String</type>
- </attribute>
- <!-- Operations -->
- <operation>
- <description>Displays the log level of a given logger.</description>
- <name>getLoggerLevel</name>
- <parameter>
- <description>The name of the logger to display.</description>
- <name>logger</name>
- <type>java.lang.String</type>
- </parameter>
- <return-type>java.lang.String</return-type>
- </operation>
- <operation>
- <description>Sets the log level for a given logger.</description>
- <name>setLoggerLevel</name>
- <parameter>
- <description>The name of the logger to set.</description>
- <name>logger</name>
- <type>java.lang.String</type>
- </parameter>
- <parameter>
- <description>The log level to set.</description>
- <name>level</name>
- <type>java.lang.String</type>
- </parameter>
- <return-type>void</return-type>
- </operation>
- <operation>
- <description>Sets the levels of each logger specified by the given comma
- seperated list of logger names.</description>
- <name>setLoggerLevels</name>
- <parameter>
- <description>The list of loggers</description>
- <name>loggers</name>
- <type>java.lang.String</type>
- </parameter>
- <parameter>
- <description>The log level to set</description>
- <name>level</name>
- <type>java.lang.String</type>
- </parameter>
- <return-type>void</return-type>
- </operation>
- <operation>
- <description>Force the logging system to reconfigure.</description>
- <name>reconfigure</name>
- <return-type>void</return-type>
- </operation>
- <operation>
- <description>Force the logging system to reconfigure with the given URL.</description>
- <name>reconfigure</name>
- <parameter>
- <description>The url for the new configuration.</description>
- <name>url</name>
- <type>java.lang.String</type>
- </parameter>
- <return-type>void</return-type>
- </operation>
-
-
- &defaultOperations;
-
-</mbean>
\ No newline at end of file
Modified: trunk/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml
===================================================================
--- trunk/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/all/xmdesc/NamingProviderURLWriter-xmbean.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -31,7 +31,7 @@
<attribute access="write-only" setMethod="setServer">
<description>Server object from which the OutputDirURL can be obtained if not directly configured</description>
<name>Server</name>
- <type>org.jboss.bootstrap.spi.Server</type>
+ <type>org.jboss.bootstrap.spi.as.server.JBossASServer</type>
</attribute>
<attribute access="read-write" getMethod="getBootstrapURL" setMethod="setBootstrapURL">
Modified: trunk/server/src/etc/conf/minimal/jboss-service.xml
===================================================================
--- trunk/server/src/etc/conf/minimal/jboss-service.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/minimal/jboss-service.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -15,21 +15,6 @@
<classpath codebase="${jboss.server.lib.url}" archives="*"/>
<!-- ==================================================================== -->
- <!-- Log4j Initialization -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.logging.Log4jService"
- name="jboss.system:type=Log4jService,service=Logging"
- xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
- <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
- <!-- The value to assign to system property jboss.server.log.threshold
- if it is not already set. This system property in turn controls
- the logging threshold for the server.log file.
- If the system property is already set when this service is created,
- this value is ignored. -->
- <attribute name="DefaultJBossServerLogThreshold">INFO</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
<!-- JNDI -->
<!-- ==================================================================== -->
Modified: trunk/server/src/etc/conf/standard/jboss-service.xml
===================================================================
--- trunk/server/src/etc/conf/standard/jboss-service.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/standard/jboss-service.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -45,30 +45,6 @@
</mbean>
<!-- ==================================================================== -->
- <!-- Log4j Initialization -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.logging.Log4jService"
- name="jboss.system:type=Log4jService,service=Logging"
- xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
- <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
- <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
- this needs to be set to avoid a possible deadlock on exception at the
- appender level. See bug#696819.
- -->
- <attribute name="Log4jQuietMode">true</attribute>
- <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
- <attribute name="RefreshPeriod">60</attribute>
-
- <!-- The value to assign to system property jboss.server.log.threshold
- if it is not already set. This system property in turn controls
- the logging threshold for the server.log file.
- If the system property is already set when this service is created,
- this value is ignored. -->
- <attribute name="DefaultJBossServerLogThreshold">INFO</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
<!-- Active Alarm Table -->
<!-- ==================================================================== -->
Modified: trunk/server/src/etc/conf/web/jboss-service.xml
===================================================================
--- trunk/server/src/etc/conf/web/jboss-service.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/conf/web/jboss-service.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -45,30 +45,6 @@
</mbean>
<!-- ==================================================================== -->
- <!-- Log4j Initialization -->
- <!-- ==================================================================== -->
-
- <mbean code="org.jboss.logging.Log4jService"
- name="jboss.system:type=Log4jService,service=Logging"
- xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
- <attribute name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
- <!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
- this needs to be set to avoid a possible deadlock on exception at the
- appender level. See bug#696819.
- -->
- <attribute name="Log4jQuietMode">true</attribute>
- <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
- <attribute name="RefreshPeriod">60</attribute>
-
- <!-- The value to assign to system property jboss.server.log.threshold
- if it is not already set. This system property in turn controls
- the logging threshold for the server.log file.
- If the system property is already set when this service is created,
- this value is ignored. -->
- <attribute name="DefaultJBossServerLogThreshold">INFO</attribute>
- </mbean>
-
- <!-- ==================================================================== -->
<!-- Active Alarm Table -->
<!-- ==================================================================== -->
Copied: trunk/server/src/etc/deploy/jboss-logging.xml (from rev 91251, branches/dml-log-service-integration/server/src/etc/deploy/jboss-logging.xml)
===================================================================
--- trunk/server/src/etc/deploy/jboss-logging.xml (rev 0)
+++ trunk/server/src/etc/deploy/jboss-logging.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,657 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Logging System Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling handler -->
+
+ <periodic-rotating-file-handler
+ file-name="${jboss.server.log.dir}/server.log"
+ name="FILE"
+ autoflush="true"
+ append="true"
+ suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
+
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
+ </formatter>
+ </periodic-rotating-file-handler>
+
+ <!-- A size based file rolling appender
+
+ <size-rotating-file-handler
+ file-name="${jboss.server.log.dir}/server.log"
+ name="FILE"
+ autoflush="true"
+ append="true"
+ rotate-size="500k"
+ max-backup-index="5">
+
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
+ </formatter>
+ </size-rotating-file-handler>
+ -->
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <console-handler name="CONSOLE" autoflush="true" target="System.out">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="INFO"/>
+
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>
+ </formatter>
+ </console-handler>
+
+ <!-- ====================== -->
+ <!-- More Appender examples -->
+ <!-- ====================== -->
+
+ <!-- Buffer events and log them asynchronously
+
+ <async-handler name="ASYNC">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <sub-handlers>
+ <handler-ref name="FILE"/>
+ <handler-ref name="CONSOLE"/>
+ <handler-ref name="SMTP"/>
+ </sub-handlers>
+ </async-handler>
+ -->
+
+ <!-- EMail events to an administrator
+
+ <log4j-appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="ERROR"/>
+
+ <properties>
+ <property name="to">admin at myhost.domain.com</property>
+ <property name="from">nobody at myhost.domain.com</property>
+ <property name="subject">JBoss Sever Errors</property>
+ <property name="sMTPHost">localhost</property>
+ <property name="bufferSize">10</property>
+ </properties>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
+ </formatter>
+ </log4j-appender>
+ -->
+
+ <!-- Syslog events
+
+ <log4j-appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <properties>
+ <property name="facility">LOCAL7</property>
+ <property name="facilityPrinting">true</property>
+ <property name="syslogHost">localhost</property>
+ </properties>
+
+ <formatter>
+ <pattern-formatter pattern="[%d,%c{1}] %m%n"/>
+ </formatter>
+ </log4j-appender>
+ -->
+
+ <!-- Log events to JMS (requires a topic to be created)
+
+ <log4j-appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="ERROR"/>
+
+ <properties>
+ <property name="topicConnectionFactoryBindingName">
+ --><!-- Use injection so that an implicit dependency is formed - TODO: get the correct property name --><!--
+ <b:inject bean="myTopicBiding" property="name"/>
+ </property>
+ <property name="topicBindingName">topic/MyErrorsTopic</property>
+ </properties>
+ </log4j-appender>
+ -->
+
+ <!-- Log events through SNMP
+
+ <log4j-appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="DEBUG"/>
+
+ <properties>
+ <property name="implementationClassName">org.apache.log4j.ext.JoeSNMPTrapSender</property>
+ <property name="managementHost">127.0.0.1</property>
+ <property name="managementHostTrapListenPort">162</property>
+ <property name="enterpriseOID">1.3.6.1.4.1.24.0</property>
+ <property name="localIPAddress">127.0.0.1</property>
+ <property name="localTrapSendPort">161</property>
+ <property name="genericTrapType">6</property>
+ <property name="specificTrapType">12345678</property>
+ <property name="communityString">public</property>
+ <property name="forwardStackTraceWithTrap">true</property>
+ <property name="applicationTrapOID">1.3.6.1.4.1.24.12.10.22.64</property>
+ </properties>
+ <formatter>
+ <pattern-formatter pattern="%d,%p,[%t],[%c],%m%n"/>
+ </formatter>
+ </log4j-appender>
+ -->
+
+ <!-- Emit events as JMX notifications
+
+ <log4j-appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="WARN"/>
+
+ <properties>
+ <property name="objectName">jboss.system:service=Logging,type=JMXNotificationAppender</property>
+ </properties>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] %m"/>
+ </formatter>
+ </log4j-appender>
+ -->
+
+ <!-- Security AUDIT Appender
+
+ <periodic-rotating-file-handler
+ name="AUDIT"
+ autoflush="true"
+ file-name="${jboss.server.log.dir}/audit.log"
+ suffix=".yyyy-MM-dd"
+ append="true">
+
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] (%t:%x) %m%n"/>
+ </formatter>
+ </periodic-rotating-file-handler>
+ -->
+
+ <!-- =============================================== -->
+ <!-- Limit categories -->
+ <!-- if enabling "trace" at root logger level, -->
+ <!-- use limit category settings to disable trace -->
+ <!-- for packages that you don't want to trace -->
+ <!-- =============================================== -->
+
+ <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+ <logger category="org.apache">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <logger category="jacorb">
+ <level name="WARN"/>
+ </logger>
+
+ <!-- Limit JSF to INFO as its FINE is verbose -->
+ <logger category="javax.enterprise.resource.webcontainer.jsf">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+ <logger category="org.jgroups">
+ <level name="WARN"/>
+ </logger>
+
+ <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
+ <logger category="org.quartz">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the com.sun category to INFO as its FINE is verbose -->
+ <logger category="com.sun">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the sun category to INFO as its FINE is verbose -->
+ <logger category="sun">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
+ <logger category="javax.xml.bind">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit JBoss categories
+ <logger category="org.jboss">
+ <level name="INFO"/>
+ </logger>
+ -->
+
+ <!-- Or limit individual JBoss categories
+ <logger category="org.jboss.web">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.tm">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.jdbc">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.on">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.services">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.bootstrap">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.kernel">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.beans">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.injection">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.annotation">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.system">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.mx">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.jmx">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.invocation">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.classloader">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.classloading">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.deployment">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.deployers">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.dependency">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.metadata">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.detailed">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.logging">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.logbridge">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.aop">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.joinpoint">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.util">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.ha">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.resource">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.varia">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.net">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.security">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.console">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.wsf">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.ejb">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.ejb3">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.jpa">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.virtual">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.xb">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.naming">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.wsf">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.ws">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.mail">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.monitor">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.remoting">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.profileservice">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.cache">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.proxy">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.jms">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.messaging">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.webbeans">
+ <level name="INFO" />
+ </logger>
+
+ <logger category="org.jboss.managed">
+ <level name="INFO" />
+ </logger>
+ -->
+
+ <!-- Limit Arjuna transaction manager
+ <logger category="com.arjuna">
+ <level name="INFO" />
+ </logger>
+ -->
+
+ <!-- Limit Hibernate
+ <logger category="org.hibernate">
+ <level name="INFO" />
+ </logger>
+ -->
+
+ <!-- Limit Ajax4jsf
+ <logger category="org.ajax4jsf">
+ <level name="INFO" />
+ </logger>
+ -->
+
+ <!-- Limit JNP
+ <logger category="org.jnp">
+ <level name="INFO" />
+ </logger>
+ -->
+
+
+ <!-- Limit the JSR77 categories -->
+ <logger category="org.jboss.management">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Limit the verbose facelets compiler
+ <logger category="facelets.compiler">
+ <level name="WARN"/>
+ </logger>
+ -->
+
+ <!-- Limit the verbose ajax4jsf cache initialization
+ <logger category="org.ajax4jsf.cache">
+ <level name="WARN"/>
+ </logger>
+ -->
+ <!-- Limit the verbose embedded jopr categories
+ <logger category="org.rhq">
+ <level name="WARN"/>
+ </logger>
+ -->
+ <!-- Limit the verbose seam categories
+ <logger category="org.jboss.seam">
+ <level name="WARN"/>
+ </logger>
+ -->
+
+ <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
+ <logger category="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
+ <level name="TRACE"/>
+ </logger>
+ -->
+
+ <!-- Category specifically for Security Audit Provider
+ <logger category="org.jboss.security.audit.providers.LogAuditProvider" additivity="false">
+ <level name="TRACE"/>
+ <appender-ref ref="AUDIT"/>
+ </logger>
+ -->
+
+ <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+ <logger category="org.jboss.serial">
+ <level name="INFO"/>
+ </logger>
+
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <logger category="org.jboss.varia">
+ <level name="DEBUG"/>
+ </logger>
+ -->
+
+ <!-- Enable JBossWS message tracing
+ <logger category="org.jboss.ws.core.MessageTrace">
+ <level name="TRACE"/>
+ </logger>
+ -->
+
+ <!-- Enable System log message tracing
+ <logger category="org.jboss.system">
+ <level name="TRACE"/>
+ </logger>
+ <logger category="org.jboss.ejb.plugins">
+ <level name="TRACE"/>
+ </logger>
+ -->
+
+ <!--
+ | Logs these events to SNMP:
+ - server starts/stops
+ - cluster evolution (node death/startup)
+ - When an EJB archive is deployed (and associated verified messages)
+ - When an EAR archive is deployed
+
+ <logger category="org.jboss.system.server.Server">
+ <level name="INFO"/>
+ <handlers>
+ <handler-ref name="TRAP_LOG"/>
+ </handlers>
+ </logger>
+
+ <logger category="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
+ <level name="INFO"/>
+ <handlers>
+ <handler-ref name="TRAP_LOG"/>
+ </handlers>
+ </logger>
+
+ <logger category="org.jboss.deployment.MainDeployer">
+ <level name="ERROR"/>
+ <handlers>
+ <handler-ref name="TRAP_LOG"/>
+ </handlers>
+ </logger>
+
+ <logger category="org.jboss.ejb.EJBDeployer">
+ <level name="INFO"/>
+ <handlers>
+ <handler-ref name="TRAP_LOG"/>
+ </handlers>
+ </logger>
+
+ <logger category="org.jboss.deployment.EARDeployer">
+ <level name="INFO"/>
+ <handlers>
+ <handler-ref name="TRAP_LOG"/>
+ </handlers>
+ </logger>
+ -->
+
+ <!-- Clustering logging -->
+ <!-- Uncomment the following to redirect the org.jgroups and
+ org.jboss.ha categories to a cluster.log file.
+
+ <size-rotating-file-handler
+ file-name="${jboss.server.log.dir}/cluster.log"
+ name="CLUSTER"
+ append="false"
+ rotate-size="500k"
+ max-backup-index="5"
+ autoflush="true">
+
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <formatter>
+ <pattern-formatter pattern="%d %-5p [%c] %m%n"/>
+ </formatter>
+ </size-rotating-file-handler>
+
+ <logger category="org.jgroups">
+ <level name="DEBUG" />
+ <handlers>
+ <handler-ref name="CLUSTER"/>
+ </handlers>
+ </logger>
+
+ <logger category="org.jboss.ha">
+ <level name="DEBUG" />
+ <handlers>
+ <handler-ref name="CLUSTER"/>
+ </handlers>
+ </logger>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root-logger>
+ <!-- Set the root logger priority via a system property, with a default value. -->
+ <level name="${jboss.server.log.threshold:DEBUG}"/>
+ <handlers>
+ <handler-ref name="CONSOLE"/>
+ <handler-ref name="FILE"/>
+ </handlers>
+ </root-logger>
+
+</logging>
\ No newline at end of file
Deleted: trunk/server/src/etc/deployers/logbridge-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/logbridge-jboss-beans.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/etc/deployers/logbridge-jboss-beans.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Log Bridge support beans
--->
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- JMX notifier to trigger a resync with JDK log levels when the log4j config changes-->
-
- <bean name="LogBridgeNotifier" class="org.jboss.logbridge.LogNotificationListener">
- <property name="logBridgeHandler"><inject bean="LogBridgeHandler"/></property>
- <property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
- <property name="loggingMBeanName">jboss.system:service=Logging,type=Log4jService</property>
- <depends>jboss.system:service=Logging,type=Log4jService</depends>
- </bean>
-</deployment>
Modified: trunk/server/src/main/org/jboss/Shutdown.java
===================================================================
--- trunk/server/src/main/org/jboss/Shutdown.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/Shutdown.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -38,8 +38,7 @@
import gnu.getopt.Getopt;
import gnu.getopt.LongOpt;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerProcess;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
import org.jboss.naming.HttpNamingContextFactory;
import org.jboss.system.server.ServerImplMBean;
import org.jboss.security.SecurityAssociation;
@@ -225,22 +224,11 @@
MBeanServerConnection adaptor = (MBeanServerConnection) obj;
ServerProxyHandler handler = new ServerProxyHandler(adaptor, serverJMXName);
- Class<?>[] ifaces = {ServerProcess.class};
+ Class<?>[] ifaces = {JBossASServer.class};
ClassLoader tcl = Thread.currentThread().getContextClassLoader();
- ServerProcess server = (ServerProcess) Proxy.newProxyInstance(tcl, ifaces, handler);
-
- if (exit)
- {
- server.exit(exitcode);
- }
- else if (halt)
- {
- server.halt(exitcode);
- }
- else
- {
- server.shutdown();
- }
+ JBossASServer server = (JBossASServer) Proxy.newProxyInstance(tcl, ifaces, handler);
+ server.shutdown();
+
System.out.println("Shutdown message has been posted to the server.");
System.out.println("Server shutdown may take a while - check logfiles for completion");
}
Copied: trunk/server/src/main/org/jboss/config (from rev 91251, branches/dml-log-service-integration/server/src/main/org/jboss/config)
Deleted: trunk/server/src/main/org/jboss/config/ServerConfigUtil.java
===================================================================
--- branches/dml-log-service-integration/server/src/main/org/jboss/config/ServerConfigUtil.java 2009-07-14 20:32:13 UTC (rev 91251)
+++ trunk/server/src/main/org/jboss/config/ServerConfigUtil.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.config;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-
-/**
- * ServerConfigUtil
- *
- * Utilities for accessing server configuration. Moved from
- * legacy bootstrap implementation and preserved to protect
- * legacy, working code from being disturbed.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintain only
- * @version $Revision: $
- */
-public final class ServerConfigUtil
-{
- /**
- * Private constructor
- */
- private ServerConfigUtil()
- {
- // No external instances
- }
-
- /**
- * Retrieve the default bind address, but only if it is specific
- *
- * @return the specific bind address
- */
- public static String getSpecificBindAddress()
- {
- String address = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
- if (address == null || address.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
- return null;
- return address;
- }
-
- /**
- * Fix the remote inet address.
- *
- * If we pass the address to the client we don't want to
- * tell it to connect to 0.0.0.0, use our host name instead
- * @param address the passed address
- * @return the fixed address
- */
- public static InetAddress fixRemoteAddress(InetAddress address)
- {
- try
- {
- if (address == null
- || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
- return InetAddress.getLocalHost();
- }
- catch (UnknownHostException ignored)
- {
- }
- return address;
- }
-
- /**
- * Fix the remote address.
- *
- * If we pass the address to the client we don't want to
- * tell it to connect to 0.0.0.0, use our host name instead
- * @param address the passed address
- * @return the fixed address
- */
- public static String fixRemoteAddress(String address)
- {
- try
- {
- if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
- return InetAddress.getLocalHost().getHostName();
- }
- catch (UnknownHostException ignored)
- {
- }
- return address;
- }
-
- /**
- * Utility to get a shortened url relative to the server home if possible
- *
- * @param longUrl
- * @return the short url
- */
- public static String shortUrlFromServerHome(String longUrl)
- {
- String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
-
- if (longUrl == null || serverHomeUrl == null)
- return longUrl;
-
- if (longUrl.startsWith(serverHomeUrl))
- return ".../" + longUrl.substring(serverHomeUrl.length());
- else
- {
- String jarServerHomeUrl = "jar:" + serverHomeUrl;
- if (longUrl.startsWith(jarServerHomeUrl))
- return ".../" + longUrl.substring(jarServerHomeUrl.length());
- else
- return longUrl;
- }
- }
-}
Copied: trunk/server/src/main/org/jboss/config/ServerConfigUtil.java (from rev 91251, branches/dml-log-service-integration/server/src/main/org/jboss/config/ServerConfigUtil.java)
===================================================================
--- trunk/server/src/main/org/jboss/config/ServerConfigUtil.java (rev 0)
+++ trunk/server/src/main/org/jboss/config/ServerConfigUtil.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.config;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.jboss.bootstrap.spi.as.config.JBossASConfigurationInitializer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+
+/**
+ * ServerConfigUtil
+ *
+ * Utilities for accessing server configuration. Moved from
+ * legacy bootstrap implementation and preserved to protect
+ * legacy, working code from being disturbed.
+ *
+ * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> Maintain only
+ * @version $Revision: $
+ */
+public final class ServerConfigUtil
+{
+ /**
+ * Private constructor
+ */
+ private ServerConfigUtil()
+ {
+ // No external instances
+ }
+
+ /**
+ * Retrieve the default bind address, but only if it is specific
+ *
+ * @return the specific bind address
+ */
+ public static String getSpecificBindAddress()
+ {
+ String address = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
+ if (address == null || address.equals(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY))
+ return null;
+ return address;
+ }
+
+ /**
+ * Fix the remote inet address.
+ *
+ * If we pass the address to the client we don't want to
+ * tell it to connect to 0.0.0.0, use our host name instead
+ * @param address the passed address
+ * @return the fixed address
+ */
+ public static InetAddress fixRemoteAddress(InetAddress address)
+ {
+ try
+ {
+ if (address == null
+ || InetAddress.getByName(JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY).equals(address))
+ return InetAddress.getLocalHost();
+ }
+ catch (UnknownHostException ignored)
+ {
+ }
+ return address;
+ }
+
+ /**
+ * Fix the remote address.
+ *
+ * If we pass the address to the client we don't want to
+ * tell it to connect to 0.0.0.0, use our host name instead
+ * @param address the passed address
+ * @return the fixed address
+ */
+ public static String fixRemoteAddress(String address)
+ {
+ try
+ {
+ if (address == null || JBossASConfigurationInitializer.VALUE_BIND_ADDRESS_ANY.equals(address))
+ return InetAddress.getLocalHost().getHostName();
+ }
+ catch (UnknownHostException ignored)
+ {
+ }
+ return address;
+ }
+
+ /**
+ * Utility to get a shortened url relative to the server home if possible
+ *
+ * @param longUrl
+ * @return the short url
+ */
+ public static String shortUrlFromServerHome(String longUrl)
+ {
+ String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
+
+ if (longUrl == null || serverHomeUrl == null)
+ return longUrl;
+
+ if (longUrl.startsWith(serverHomeUrl))
+ return ".../" + longUrl.substring(serverHomeUrl.length());
+ else
+ {
+ String jarServerHomeUrl = "jar:" + serverHomeUrl;
+ if (longUrl.startsWith(jarServerHomeUrl))
+ return ".../" + longUrl.substring(jarServerHomeUrl.length());
+ else
+ return longUrl;
+ }
+ }
+}
Modified: trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/deployment/JBossEjbParsingDeployer.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -23,7 +23,6 @@
import java.net.URL;
-import org.jboss.bootstrap.spi.ServerConfig;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
@@ -32,6 +31,7 @@
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
/**
* An ObjectModelFactoryDeployer for translating jboss.xml descriptors into
@@ -121,11 +121,12 @@
if(standardJBossXmlPath == null)
{
// Use default server conf/standardjboss.xml location
- String configPath = System.getProperty(ServerConfig.SERVER_CONFIG_URL);
+ final String configPropName = JBossASServerConfig.PROP_KEY_JBOSSAS_SERVER_CONF_URL;
+ String configPath = System.getProperty(configPropName);
if(configPath == null )
{
if(ignoreMissingStandardJBossXml == false)
- throw new DeploymentException("standardjboss.xml not specified and "+ServerConfig.SERVER_CONFIG_URL+" does not exist");
+ throw new DeploymentException("standardjboss.xml not specified and "+configPropName+" does not exist");
return null;
}
URL configUrl = new URL(configPath);
Modified: trunk/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -195,7 +195,7 @@
String ejbName = con.getBeanMetaData().getEjbName();
// Get the system data directory
- File dir = ServerConfigLocator.locate().getServerDataDir();
+ File dir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
//
// jason: may have to use a generated token from container config
Modified: trunk/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -192,7 +192,7 @@
String ejbName = con.getBeanMetaData().getEjbName();
// Get the system data directory
- File dir = ServerConfigLocator.locate().getServerTempDir();
+ File dir = new File(ServerConfigLocator.locate().getServerTempLocation().toURI());
// Setup the reference to the session data store directory
dir = new File(dir, storeDirName);
Modified: trunk/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java
===================================================================
--- trunk/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/invocation/http/server/HttpInvoker.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -31,7 +31,6 @@
import javax.naming.NamingException;
import javax.transaction.Transaction;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.invocation.Invocation;
import org.jboss.invocation.Invoker;
import org.jboss.invocation.MarshalledInvocation;
@@ -39,6 +38,7 @@
import org.jboss.system.Registry;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.StringPropertyReplacer;
+import org.jboss.config.ServerConfigUtil;
/**
* The HttpInvoker ... into the JMX base.
Modified: trunk/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -28,7 +28,6 @@
import javax.management.ObjectName;
import javax.naming.InitialContext;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.invocation.Invoker;
import org.jboss.invocation.InvokerInterceptor;
import org.jboss.invocation.http.interfaces.HttpInvokerProxy;
@@ -39,6 +38,7 @@
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.StringPropertyReplacer;
import org.jboss.metadata.MetaData;
+import org.jboss.config.ServerConfigUtil;
import org.w3c.dom.Element;
/** Create an interface proxy that uses HTTP to communicate with the server
Modified: trunk/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java
===================================================================
--- trunk/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/invocation/pooled/server/PooledInvoker.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -38,7 +38,6 @@
import javax.net.SocketFactory;
import javax.net.ServerSocketFactory;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.invocation.Invocation;
import org.jboss.invocation.pooled.interfaces.PooledInvokerProxy;
import org.jboss.invocation.pooled.interfaces.ServerAddress;
@@ -52,6 +51,7 @@
import org.jboss.tm.TransactionPropagationContextUtil;
import org.jboss.security.SecurityDomain;
import org.jboss.net.sockets.DefaultSocketFactory;
+import org.jboss.config.ServerConfigUtil;
/**
* This invoker pools Threads and client connections to one server socket.
Deleted: trunk/server/src/main/org/jboss/logging/Log4jService.java
===================================================================
--- trunk/server/src/main/org/jboss/logging/Log4jService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/logging/Log4jService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,719 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.logging;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.StringTokenizer;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.ObjectName;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jboss.logging.log4j.JDKLevel;
-import org.jboss.logging.util.LoggerStream;
-import org.jboss.logging.util.OnlyOnceErrorHandler;
-import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.util.Strings;
-import org.jboss.util.ThrowableHandler;
-import org.jboss.util.ThrowableListener;
-import org.jboss.util.stream.Streams;
-
-/**
- * Initializes the Log4j logging framework. Supports XML and standard
- * configuration file formats. Defaults to using 'log4j.xml' read
- * from a system resource.
- *
- * <p>Sets up a {@link ThrowableListener} to adapt unhandled
- * throwables to a logger.
- *
- * <p>Installs {@link LoggerStream} adapters for <tt>System.out</tt> and
- * <tt>System.err</tt> to catch and redirect calls to Log4j.
- *
- * @jmx:mbean name="jboss.system:type=Log4jService,service=Logging"
- * extends="org.jboss.system.ServiceMBean"
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:phox at galactica.it">Fulco Muriglio</a>
- * @author <a href="mailto:Scott_Stark at displayscape.com">Scott Stark</a>
- * @author <a href="mailto:davidjencks at earthlink.net">David Jencks</a>
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- */
-public class Log4jService
- extends ServiceMBeanSupport
- implements Log4jServiceMBean
-{
- /**
- * The default url for the configuration file. Reads the value
- * from the system property <tt>org.jboss.logging.Log4jService.configURL</tt>
- * or if that is not set defaults to <tt>resource:log4j.xml</tt>.
- */
- public static final String DEFAULT_URL =
- System.getProperty(Log4jService.class.getName() + ".configURL", "resource:log4j.xml");
-
- /**
- * Default flag to enable/disable cacthing System.out. Reads the value
- * from the system property <tt>org.jboss.logging.Log4jService.catchSystemOut</tt>
- * or if not set defaults to <tt>true</tt>.
- */
- public static final boolean CATCH_SYSTEM_OUT =
- getBoolean(Log4jService.class.getName() + ".catchSystemOut", true);
-
- /**
- * Default flag to enable/disable cacthing System.err. Reads the value
- * from the system property <tt>org.jboss.logging.Log4jService.catchSystemErr</tt>
- * or if not set defaults to <tt>true</tt>.
- */
- public static final boolean CATCH_SYSTEM_ERR =
- getBoolean(Log4jService.class.getName() + ".catchSystemErr", true);
-
- /**
- * Default value for system property {@link #JBOSS_SERVER_LOG_THRESHOLD_PROPERTY}
- * if it is not otherwise configured.
- */
- public static final String DEFAULT_JBOSS_SERVER_LOG_THRESHOLD = "DEBUG";
-
- /** Helper to get boolean value from system property or use default if not set. */
- private static boolean getBoolean(String name, boolean defaultValue)
- {
- String value = System.getProperty(name, null);
- if (value == null)
- return defaultValue;
- return new Boolean(value).booleanValue();
- }
-
- /** The URL to the configuration file. */
- private URL configURL;
-
- /** The time in seconds between checking for new config. */
- private int refreshPeriod;
-
- private ThrowableListenerLoggingAdapter throwableAdapter;
-
- /** The previous value of System.out. */
- private PrintStream out;
-
- /** The previous value of System.err. */
- private PrintStream err;
-
- /**
- * Flag to enable/disable adapting <tt>System.out</tt> to the
- * <tt>STDOUT</tt> logger.
- */
- private boolean catchSystemOut = CATCH_SYSTEM_OUT;
-
- /**
- * Flag to enable/disable adapting <tt>System.out</tt> to the
- * <tt>STDERR</tt> logger.
- */
- private boolean catchSystemErr = CATCH_SYSTEM_ERR;
-
- /** The org.apache.log4j.helpers.LogLog.setQuietMode flag setting */
- private boolean log4jQuietMode = true;
-
- private String defaultJBossServerLogLevel = DEFAULT_JBOSS_SERVER_LOG_THRESHOLD;
-
- /** The URL watch timer (in daemon mode). */
- private Timer timer;
-
- /** The specialized timer task to watch our config file. */
- private URLWatchTimerTask timerTask;
-
- /**
- * A flag to enable start/stop to work as expected,
- * but still use create to init early.
- */
- private boolean initialized;
-
- /**
- * Uses defaults.
- *
- * @jmx:managed-constructor
- *
- * @throws MalformedURLException Could not create URL from default (propbably
- * a problem with overridden properties).
- */
- public Log4jService() throws MalformedURLException
- {
- this(DEFAULT_URL, 60);
- }
-
- /**
- * @jmx:managed-constructor
- *
- * @param url The configuration URL.
- */
- public Log4jService(final URL url)
- {
- this(url, 60);
- }
-
- /**
- * @jmx:managed-constructor
- *
- * @param url The configuration URL.
- */
- public Log4jService(final String url) throws MalformedURLException
- {
- this(Strings.toURL(url), 60);
- }
-
- /**
- * @jmx:managed-constructor
- *
- * @param url The configuration URL.
- * @param refreshPeriod The refreshPeriod in seconds to wait between each check.
- */
- public Log4jService(final String url, final int refreshPeriod)
- throws MalformedURLException
- {
- this(Strings.toURL(url), refreshPeriod);
- }
-
- /**
- * @jmx:managed-constructor
- *
- * @param url The configuration URL.
- * @param refreshPeriod The refreshPeriod in seconds to wait between each check.
- */
- public Log4jService(final URL url, final int refreshPeriod)
- {
- this.configURL = url;
- this.refreshPeriod = refreshPeriod;
- }
-
- /**
- * Set the catch <tt>System.out</tt> flag.
- *
- * @jmx:managed-attribute
- *
- * @param flag True to enable, false to disable.
- */
- public void setCatchSystemOut(final boolean flag)
- {
- this.catchSystemOut = flag;
- }
-
- /**
- * Get the catch <tt>System.out</tt> flag.
- *
- * @jmx:managed-attribute
- *
- * @return True if enabled, false if disabled.
- */
- public boolean getCatchSystemOut()
- {
- return catchSystemOut;
- }
-
- /**
- * Set the catch <tt>System.err</tt> flag.
- *
- * @jmx:managed-attribute
- *
- * @param flag True to enable, false to disable.
- */
- public void setCatchSystemErr(final boolean flag)
- {
- this.catchSystemErr = flag;
- }
-
- /**
- * Get the catch <tt>System.err</tt> flag.
- *
- * @jmx:managed-attribute
- *
- * @return True if enabled, false if disabled.
- */
- public boolean getCatchSystemErr()
- {
- return catchSystemErr;
- }
-
- /**
- * Get the org.apache.log4j.helpers.LogLog.setQuietMode flag
- *
- * @jmx:managed-attribute
- *
- * @return True if enabled, false if disabled.
- */
- public boolean getLog4jQuietMode()
- {
- return log4jQuietMode;
- }
- /**
- * Set the org.apache.log4j.helpers.LogLog.setQuietMode flag
- *
- * @jmx:managed-attribute
- *
- * @return True if enabled, false if disabled.
- */
- public void setLog4jQuietMode(boolean flag)
- {
- this.log4jQuietMode = flag;
- }
-
- /**
- * Get the refresh period.
- *
- * @jmx:managed-attribute
- */
- public int getRefreshPeriod()
- {
- return refreshPeriod;
- }
-
- /**
- * Set the refresh period.
- *
- * @jmx:managed-attribute
- */
- public void setRefreshPeriod(final int refreshPeriod)
- {
- this.refreshPeriod = refreshPeriod;
- }
-
- /**
- * Get the Log4j configuration URL.
- *
- * @jmx:managed-attribute
- */
- public URL getConfigurationURL()
- {
- return configURL;
- }
-
- /**
- * Set the Log4j configuration URL.
- *
- * @jmx:managed-attribute
- */
- public void setConfigurationURL(final URL url)
- {
- this.configURL = url;
- }
-
- /**
- * {@inheritDoc}
- *
- * @jmx:managed-attribute
- */
- public String getDefaultJBossServerLogThreshold()
- {
- return defaultJBossServerLogLevel;
- }
-
- /**
- * {@inheritDoc}
- *
- * @jmx:managed-attribute
- */
- public void setDefaultJBossServerLogThreshold(String level)
- {
- this.defaultJBossServerLogLevel = level;
- }
-
- /**
- * Sets the level for a logger of the give name.
- *
- * <p>Values are trimmed before used.
- *
- * @jmx:managed-operation
- *
- * @param name The name of the logger to change level
- * @param levelName The name of the level to change the logger to.
- */
- public void setLoggerLevel(final String name, final String levelName)
- {
- org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(name.trim());
- Level level = JDKLevel.toLevel(levelName.trim());
-
- logger.setLevel(level);
- log.info("Level set to " + level + " for " + name);
- }
-
- /**
- * Sets the levels of each logger specified by the given comma
- * seperated list of logger names.
- *
- * @jmx:managed-operation
- *
- * @see #setLoggerLevel
- *
- * @param list A comma seperated list of logger names.
- * @param levelName The name of the level to change the logger to.
- */
- public void setLoggerLevels(final String list, final String levelName)
- {
- StringTokenizer stok = new StringTokenizer(list, ",");
-
- while (stok.hasMoreTokens()) {
- String name = stok.nextToken();
- setLoggerLevel(name, levelName);
- }
- }
-
- /**
- * Gets the level of the logger of the give name.
- *
- * @jmx:managed-operation
- *
- * @param name The name of the logger to inspect.
- */
- public String getLoggerLevel(final String name)
- {
- org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(name);
- Level level = logger.getLevel();
-
- if (level != null)
- return level.toString();
-
- return null;
- }
-
- /**
- * Force the logging system to reconfigure.
- *
- * @jmx:managed-operation
- */
- public void reconfigure() throws IOException
- {
- if (timerTask == null)
- throw new IllegalStateException("Service stopped or not started");
-
- timerTask.reconfigure();
- }
-
- /**
- * Hack to reconfigure and change the URL. This is needed until we
- * have a JMX HTML Adapter that can use PropertyEditor to coerce.
- *
- * @jmx:managed-operation
- *
- * @param url The new configuration url
- */
- public void reconfigure(final String url) throws IOException, MalformedURLException
- {
- setConfigurationURL(Strings.toURL(url));
- reconfigure();
- }
-
- private void installSystemAdapters()
- {
- org.apache.log4j.Logger logger;
-
- // Install catchers
- if (catchSystemOut)
- {
- logger = org.apache.log4j.Logger.getLogger("STDOUT");
- out = System.out;
- System.setOut(new LoggerStream(logger, Level.INFO, out));
- log.debug("Installed System.out adapter");
- }
-
- if (catchSystemErr)
- {
- logger = org.apache.log4j.Logger.getLogger("STDERR");
- err = System.err;
- OnlyOnceErrorHandler.setOutput(err);
- System.setErr(new LoggerStream(logger, Level.ERROR, err));
- log.debug("Installed System.err adapter");
- }
- }
-
- private void uninstallSystemAdapters()
- {
- // Remove System adapters
- if (out != null)
- {
- System.out.flush();
- System.setOut(out);
- log.debug("Removed System.out adapter");
- out = null;
- }
-
- if (err != null)
- {
- System.err.flush();
- System.setErr(err);
- log.debug("Removed System.err adapter");
- err = null;
- }
- }
-
-
- ///////////////////////////////////////////////////////////////////////////
- // Concrete Service Overrides //
- ///////////////////////////////////////////////////////////////////////////
-
- protected ObjectName getObjectName(MBeanServer server, ObjectName name)
- throws MalformedObjectNameException
- {
- return name == null ? OBJECT_NAME : name;
- }
-
- private void setup() throws Exception
- {
- if (initialized) return;
-
- establishDefaultLoggingLevelSystemProperty();
-
- timerTask = new URLWatchTimerTask();
- timerTask.run();
- timer = new Timer("Timer-" + getName(), true);
- timer.schedule(timerTask, 1000 * refreshPeriod, 1000 * refreshPeriod);
-
- // Make sure the root Logger has loaded
- org.apache.log4j.Logger.getRootLogger();
-
- // Install listener for unhandled throwables to turn them into log messages
- throwableAdapter = new ThrowableListenerLoggingAdapter();
- ThrowableHandler.addThrowableListener(throwableAdapter);
- log.debug("Added ThrowableListener: " + throwableAdapter);
-
- initialized = true;
- }
-
- private void establishDefaultLoggingLevelSystemProperty()
- {
- try
- {
- if (defaultJBossServerLogLevel != null
- && SysPropertyActions.getProperty(JBOSS_SERVER_LOG_THRESHOLD_PROPERTY, null) == null)
- {
- SysPropertyActions.setProperty(JBOSS_SERVER_LOG_THRESHOLD_PROPERTY,
- defaultJBossServerLogLevel);
- }
- }
- catch (SecurityException e)
- {
- log.warn("Cannot configure system property " + JBOSS_SERVER_LOG_THRESHOLD_PROPERTY +
- " -- " + e.getLocalizedMessage());
- }
-
- }
-
- protected void createService() throws Exception
- {
- setup();
- }
-
- protected void startService() throws Exception
- {
- setup();
- }
-
- protected void stopService() throws Exception
- {
- timer.cancel();
- timer = null;
- timerTask.cancel();
- timerTask = null;
-
- // Remove throwable adapter
- ThrowableHandler.removeThrowableListener(throwableAdapter);
- throwableAdapter = null;
-
- uninstallSystemAdapters();
-
- // allow start to re-initalize
- initialized = false;
- }
-
- protected void emitReconfigureNotification()
- {
- // emit a reconfigure notification with the configURL
- Notification n = new Notification(RECONFIGURE_NOTIFICATION_TYPE,
- this, getNextNotificationSequenceNumber(), "Log4j subsystem reconfigured");
- n.setUserData(configURL);
-
- super.sendNotification(n);
- }
-
- ///////////////////////////////////////////////////////////////////////////
- // ThrowableListener Adapter //
- ///////////////////////////////////////////////////////////////////////////
-
- /**
- * Adapts ThrowableHandler to the Loggger interface. Using nested
- * class instead of anoynmous class for better logger naming.
- */
- private static class ThrowableListenerLoggingAdapter
- implements ThrowableListener
- {
- private Logger log = Logger.getLogger(ThrowableListenerLoggingAdapter.class);
-
- public void onThrowable(int type, Throwable t)
- {
- switch (type)
- {
- default:
- // if type is not valid then make it any error
-
- case ThrowableHandler.Type.ERROR:
- log.error("Unhandled Throwable", t);
- break;
-
- case ThrowableHandler.Type.WARNING:
- log.warn("Unhandled Throwable", t);
- break;
-
- case ThrowableHandler.Type.UNKNOWN:
- // these could be red-herrings, so log them as trace
- log.trace("Ynhandled Throwable; status is unknown", t);
- break;
- }
- }
- }
-
-
- ///////////////////////////////////////////////////////////////////////////
- // URL Watching Timer Task //
- ///////////////////////////////////////////////////////////////////////////
-
- /**
- * A timer task to check when a URL changes (based on
- * last modified time) and reconfigure Log4j.
- */
- private class URLWatchTimerTask
- extends TimerTask
- {
- private Logger log = Logger.getLogger(URLWatchTimerTask.class);
-
- private long lastConfigured = -1;
-
- public void run()
- {
- log.trace("Checking if configuration changed");
-
- boolean trace = log.isTraceEnabled();
-
- try
- {
- URLConnection conn = configURL.openConnection();
- if (trace)
- log.trace("connection: " + conn);
-
- long lastModified = conn.getLastModified();
- if (trace)
- {
- log.trace("last configured: " + lastConfigured);
- log.trace("last modified: " + lastModified);
- }
-
- if (lastConfigured < lastModified)
- {
- reconfigure(conn);
- }
- }
- catch (Exception e)
- {
- log.warn("Failed to check URL: " + configURL, e);
- }
- }
-
- public void reconfigure() throws IOException
- {
- URLConnection conn = configURL.openConnection();
- reconfigure(conn);
- }
-
- private void reconfigure(final URLConnection conn)
- {
- log.info("Configuring from URL: " + configURL);
-
- boolean xml = false;
- boolean trace = log.isTraceEnabled();
-
- // check if the url is xml
- String contentType = conn.getContentType();
- if (trace)
- log.trace("content type: " + contentType);
-
- if (contentType == null)
- {
- String filename = configURL.getFile().toLowerCase();
- if (trace) log.trace("filename: " + filename);
-
- xml = filename.endsWith(".xml");
- }
- else
- {
- xml = contentType.equalsIgnoreCase("text/xml");
- xml |= contentType.equalsIgnoreCase("application/xml");
- }
- if (trace)
- log.trace("reconfiguring; xml=" + xml);
-
- // Dump our config if trace is enabled
- if (trace)
- {
- try
- {
- java.io.InputStream is = conn.getInputStream();
- Streams.copy(is, System.out);
- }
- catch (Exception e)
- {
- log.error("Failed to dump config", e);
- }
- }
-
- // need to uninstall adapters to avoid problems
- uninstallSystemAdapters();
-
- if (xml)
- {
- DOMConfigurator.configure(configURL);
- }
- else
- {
- PropertyConfigurator.configure(configURL);
- }
-
- /* Set the LogLog.QuietMode. As of log4j1.2.8 this needs to be set to
- avoid deadlock on exception at the appender level. See bug#696819.
- */
- LogLog.setQuietMode(log4jQuietMode);
-
- // but make sure they get reinstalled again
- installSystemAdapters();
-
- // and then remember when we were last changed
- lastConfigured = System.currentTimeMillis();
-
- // notify other mbeans that might be interested
- emitReconfigureNotification();
- }
- }
-}
Deleted: trunk/server/src/main/org/jboss/logging/Log4jServiceMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/logging/Log4jServiceMBean.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/logging/Log4jServiceMBean.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.logging;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.system.ServiceMBean;
-
-/**
- * MBean interface.
- */
-public interface Log4jServiceMBean extends ServiceMBean
-{
- /** The default object name */
- ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=Log4jService,service=Logging");
-
- /** Notification type used to indicate a log4j reconfiguration */
- String RECONFIGURE_NOTIFICATION_TYPE = "jboss.logging.log4j.reconfigure";
-
- /** Name of system property used to control the logging threshold for the server.log file */
- String JBOSS_SERVER_LOG_THRESHOLD_PROPERTY = "jboss.server.log.threshold";
-
- // Attributes ----------------------------------------------------
-
- /**
- * The catch <tt>System.out</tt> flag.
- * @param flag True to enable, false to disable.
- */
- void setCatchSystemOut(boolean flag);
- boolean getCatchSystemOut();
-
- /**
- * The catch <tt>System.err</tt> flag.
- * @param flag True to enable, false to disable.
- */
- void setCatchSystemErr(boolean flag);
- boolean getCatchSystemErr();
-
- /**
- * The org.apache.log4j.helpers.LogLog.setQuietMode flag
- * @return True if enabled, false if disabled.
- */
- void setLog4jQuietMode(boolean flag);
- boolean getLog4jQuietMode();
-
- /**
- * The refresh period.
- */
- void setRefreshPeriod(int refreshPeriod);
- int getRefreshPeriod();
-
- /**
- * The Log4j configuration URL.
- */
- void setConfigurationURL(URL url);
- URL getConfigurationURL();
-
- /**
- * The value to assign to system property {@link #JBOSS_SERVER_LOG_THRESHOLD_PROPERTY}
- * if it is not already set. This system property in turn controls
- * the logging threshold for the server.log file.
- * <p>
- * If the system property is already set when this service is created,
- * this value is ignored.
- * </p>
- */
- void setDefaultJBossServerLogThreshold(String level);
- String getDefaultJBossServerLogThreshold();
-
- // Operations ----------------------------------------------------
-
- /**
- * Sets the level for a logger of the give name.
- * <p>Values are trimmed before used.
- *
- * @param name The name of the logger to change level
- * @param levelName The name of the level to change the logger to.
- */
- void setLoggerLevel(String name, String levelName);
-
- /**
- * Sets the levels of each logger specified by the given comma seperated list of logger names.
- * @see #setLoggerLevel
- *
- * @param list A comma seperated list of logger names.
- * @param levelName The name of the level to change the logger to.
- */
- void setLoggerLevels(String list, String levelName);
-
- /**
- * Gets the level of the logger of the give name.
- *
- * @param name The name of the logger to inspect.
- */
- String getLoggerLevel(String name);
-
- /**
- * Force the logging system to reconfigure.
- */
- void reconfigure() throws IOException;
-
- /**
- * Hack to reconfigure and change the URL. This is needed until
- * we have a JMX HTML Adapter that can use PropertyEditor to coerce.
- *
- * @param url The new configuration url
- */
- void reconfigure(String url) throws IOException, MalformedURLException;
-
-}
Modified: trunk/server/src/main/org/jboss/naming/NamingProviderURLWriter.java
===================================================================
--- trunk/server/src/main/org/jboss/naming/NamingProviderURLWriter.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/naming/NamingProviderURLWriter.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -26,8 +26,8 @@
import java.io.PrintWriter;
import java.net.URI;
-import org.jboss.bootstrap.spi.Server;
import org.jboss.logging.Logger;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
/**
*
@@ -43,7 +43,7 @@
private static final Logger log = Logger.getLogger(NamingProviderURLWriter.class);
private String bootstrapUrl;
- private Server server;
+ private JBossASServer server;
private URI outputDir;
private String filename = DEFAULT_PERSIST_FILE_NAME;
private File outputFile;
@@ -68,7 +68,7 @@
this.filename = name;
}
- public void setServer(Server server)
+ public void setServer(JBossASServer server)
{
this.server = server;
}
@@ -92,7 +92,7 @@
{
if (server != null)
{
- base = server.getConfig().getServerDataDir();
+ base = new File(server.getConfiguration().getServerDataLocation().toURI());
outputDir = base.toURI();
}
}
Modified: trunk/server/src/main/org/jboss/web/WebService.java
===================================================================
--- trunk/server/src/main/org/jboss/web/WebService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/web/WebService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -27,9 +27,9 @@
import java.util.Enumeration;
import java.util.Properties;
import java.util.concurrent.Executor;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.config.ServerConfigUtil;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -292,7 +292,7 @@
// if no override has been specified, default to the jboss bind address
if (getBindAddress() == null)
- setBindAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+ setBindAddress(System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
// if no host specified, default to the java.rmi.server.hostname property value
if (getHost() == null)
Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -71,6 +71,7 @@
import org.jboss.web.WebApplication;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.virtual.VFSUtils;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.omg.CORBA.ORB;
/**
@@ -168,7 +169,7 @@
*/
public static String shortWarUrlFromServerHome(String warUrl)
{
- String serverHomeUrl = System.getProperty(org.jboss.bootstrap.spi.ServerConfig.SERVER_HOME_URL);
+ String serverHomeUrl = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_HOME_URL);
if (warUrl == null || serverHomeUrl == null)
return warUrl;
Modified: trunk/system/pom.xml
===================================================================
--- trunk/system/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -114,7 +114,7 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -25,7 +25,6 @@
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -36,11 +35,14 @@
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.bootstrap.spi.Bootstrap;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.microcontainer.MCServer;
+import org.jboss.bootstrap.spi.as.JBossASBootstrap;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.config.ServerConfig;
+import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
+import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
+import org.jboss.bootstrap.spi.mc.server.MCServer;
+import org.jboss.bootstrap.spi.server.Server;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.client.spi.IncompleteDeploymentException;
@@ -67,7 +69,6 @@
import org.jboss.managed.api.ManagedProperty;
import org.jboss.managed.api.MutableManagedObject;
import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementConstants;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.managed.api.factory.ManagedObjectFactory;
@@ -76,22 +77,17 @@
import org.jboss.managed.plugins.ManagedObjectImpl;
import org.jboss.managed.plugins.ManagedOperationImpl;
import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
import org.jboss.metatype.api.types.ArrayMetaType;
-import org.jboss.metatype.api.types.CollectionMetaType;
import org.jboss.metatype.api.types.MetaType;
import org.jboss.metatype.api.types.SimpleMetaType;
import org.jboss.metatype.api.values.ArrayValueSupport;
-import org.jboss.metatype.api.values.CollectionValueSupport;
import org.jboss.metatype.api.values.EnumValue;
import org.jboss.metatype.api.values.EnumValueSupport;
-import org.jboss.metatype.api.values.GenericValue;
import org.jboss.profileservice.spi.MutableProfile;
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.Profile;
import org.jboss.profileservice.spi.ProfileKey;
import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.profileservice.spi.metadata.ProfileMetaData;
import org.jboss.profileservice.spi.types.ControllerStateMetaType;
import org.jboss.system.server.profileservice.repository.AbstractBootstrapProfileFactory;
@@ -103,7 +99,7 @@
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-public class ProfileServiceBootstrap implements Bootstrap, KernelRegistryPlugin
+public class ProfileServiceBootstrap implements JBossASBootstrap, KernelRegistryPlugin
{
/** The log */
private static final Logger log = Logger.getLogger(ProfileServiceBootstrap.class);
@@ -231,7 +227,7 @@
/**
*
*/
- public void start(Server server)
+ public void start(JBossASServer server)
throws Exception
{
shutdown.set(false);
@@ -251,7 +247,7 @@
// Load the profiles
if(this.profileKey == null)
- this.profileKey = new ProfileKey(server.getConfig().getServerName());
+ this.profileKey = new ProfileKey(server.getConfiguration().getServerName());
// TODO check if there is a predetermined ProfileMetaData attachment
// Map<String, Object> metaData = server.getMetaData();
@@ -299,14 +295,14 @@
}
}
- public void prepareShutdown(Server server)
+ public void prepareShutdown(JBossASServer server)
{
shutdown.set(true);
if (mainDeployer != null)
mainDeployer.prepareShutdown();
}
- public void shutdown(Server server)
+ public void shutdown(JBossASServer server)
{
// Disable modification checks on all mutable profiles
for(ProfileKey key : profileService.getActiveProfileKeys())
@@ -418,10 +414,10 @@
}
Map<String, KernelDeployment> serverDeployments = null;
- if(server instanceof MCServer)
+ if(server instanceof JBossASServer)
{
// Build ManagedDeployments for the KernelDeployments
- MCServer mcserver = MCServer.class.cast(server);
+ JBossASServer mcserver = JBossASServer.class.cast(server);
Kernel kernel = mcserver.getKernel();
serverDeployments = mcserver.getDeployments();
ManagedDeployment firstDeployment = null;
@@ -563,7 +559,7 @@
}
// ServerConfig
type = new ComponentType("MCBean", "ServerConfig");
- ServerConfig config = mcserver.getConfig();
+ JBossASServerConfig config = mcserver.getConfiguration();
ManagedObject mo = mof.initManagedObject(config, null);
ManagedComponentImpl configComp = new ManagedComponentImpl(type, firstDeployment, mo);
firstDeployment.addComponent("ServerConfig", configComp);
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/JAXBRepositoryContentMetadataPersister.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -24,11 +24,12 @@
import java.io.File;
import java.net.URI;
+import java.net.URISyntaxException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
import org.jboss.logging.Logger;
import org.jboss.system.server.profileservice.repository.clustered.metadata.RepositoryContentMetadata;
import org.jboss.xb.binding.Unmarshaller;
@@ -56,9 +57,14 @@
resolver.addClassBindingForLocation("repository-content", RepositoryContentMetadata.class);
}
- public JAXBRepositoryContentMetadataPersister(Server server)
+ /**
+ * Constructor
+ * @param server
+ * @throws URISyntaxException If the server's configuration data location could not be represented as a URI
+ */
+ public JAXBRepositoryContentMetadataPersister(final JBossASServer server) throws URISyntaxException
{
- this(server.getConfig().getServerDataDir());
+ this(server.getConfiguration().getServerDataLocation().toURI());
}
public JAXBRepositoryContentMetadataPersister(URI uri)
Modified: trunk/system/src/main/org/jboss/system/tools/DeploymentScanner.java
===================================================================
--- trunk/system/src/main/org/jboss/system/tools/DeploymentScanner.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/main/org/jboss/system/tools/DeploymentScanner.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -28,7 +28,7 @@
import org.jboss.aop.microcontainer.aspects.jmx.JMX;
import org.jboss.beans.metadata.api.annotations.Start;
import org.jboss.beans.metadata.api.annotations.Stop;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.util.StringPropertyReplacer;
/**
@@ -39,7 +39,7 @@
@JMX(name = "jboss.deployment:flavor=URL,type=DeploymentScanner", exposedInterface = DeploymentScannerMBean.class, registerDirectly = true)
public class DeploymentScanner implements DeploymentScannerMBean
{
- private ServerConfig serverConfig;
+ private JBossASServerConfig serverConfig;
private URL serverHomeURL;
private DeploymentRepositoryAdapter adapter;
@@ -60,7 +60,7 @@
if (serverConfig == null)
throw new IllegalArgumentException("Null server config.");
- serverHomeURL = serverConfig.getServerHomeURL();
+ serverHomeURL = serverConfig.getServerHomeLocation();
}
@Start(ignored = true)
@@ -147,7 +147,7 @@
*
* @param serverConfig the server config
*/
- public void setServerConfig(ServerConfig serverConfig)
+ public void setServerConfig(JBossASServerConfig serverConfig)
{
this.serverConfig = serverConfig;
}
Deleted: trunk/system/src/resources/jdklogger.xml
===================================================================
--- trunk/system/src/resources/jdklogger.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/resources/jdklogger.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jdk:configuration PUBLIC "urn:jboss:jdklogger.dtd" "jdklogger.dtd">
-
-<jdk:configuration debug="false">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.jboss.logging.jdk.handlers.FileHandler">
- <param name="File" value="${jboss.server.log.dir}/boot.log"/>
- <param name="Append" value="false"/>
-
- <layout class="org.jboss.logging.jdk.format.PatternFormatter">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
- </layout>
- </appender>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE" class="java.util.logging.ConsoleHandler">
- <param name="Level" value="INFO"/>
-
- <layout class="org.jboss.logging.jdk.format.PatternFormatter">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
-</jdk:configuration>
\ No newline at end of file
Deleted: trunk/system/src/resources/log4j-debug.properties
===================================================================
--- trunk/system/src/resources/log4j-debug.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/resources/log4j-debug.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,22 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration (DEBUG) ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=DEBUG, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
Deleted: trunk/system/src/resources/log4j-trace.properties
===================================================================
--- trunk/system/src/resources/log4j-trace.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/resources/log4j-trace.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,22 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration (TRACE) ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=TRACE#org.jboss.logging.XLevel, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
Deleted: trunk/system/src/resources/log4j.properties
===================================================================
--- trunk/system/src/resources/log4j.properties 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system/src/resources/log4j.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,24 +0,0 @@
-### ====================================================================== ###
-## ##
-## JBoss Bootstrap Log4j Configuration ##
-## ##
-### ====================================================================== ###
-
-### $Id$ ###
-
-log4j.rootCategory=DEBUG, FILE, CONSOLE
-
-### A bootstrap file appender
-log4j.appender.FILE=org.jboss.logging.appender.FileAppender
-log4j.appender.FILE.File=${jboss.server.log.dir}/boot.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-log4j.appender.FILE.Append=false
-
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=INFO
-log4j.appender.CONSOLE.Target=System.out
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
-
-#log4j.category.org.jboss.deployers=TRACE#org.jboss.logging.XLevel
Copied: trunk/system/src/resources/logging.properties (from rev 91251, branches/dml-log-service-integration/system/src/resources/logging.properties)
===================================================================
--- trunk/system/src/resources/logging.properties (rev 0)
+++ trunk/system/src/resources/logging.properties 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,51 @@
+#
+# JBoss, Home of Professional Open Source.
+# Copyright 2009, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. See the copyright.txt file in the
+# distribution for a full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+
+### $Id: $ ###
+
+# Additional logger names to configure (root logger is always configured)
+#loggers=org.jboss.whatever
+
+# Root logger level
+logger.level=${jboss.boot.server.log.level:DEBUG}
+# Root logger handlers
+logger.handlers=CONSOLE, FILE
+
+# Console handler configuration
+handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
+handler.CONSOLE.properties=autoFlush
+handler.CONSOLE.level=${jboss.boot.server.log.console.level:INFO}
+handler.CONSOLE.autoFlush=true
+handler.CONSOLE.formatter=PATTERN
+
+# Boot log file handler configuration
+handler.FILE=org.jboss.logmanager.handlers.FileHandler
+handler.FILE.level=${jboss.boot.server.log.file.level:DEBUG}
+handler.FILE.properties=autoFlush,fileName
+handler.FILE.autoFlush=true
+handler.FILE.fileName=${jboss.boot.server.log.dir}/boot.log
+handler.FILE.formatter=PATTERN
+
+# Formatter pattern configuration
+formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
+formatter.PATTERN.properties=pattern
+formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n
Modified: trunk/system-jmx/pom.xml
===================================================================
--- trunk/system-jmx/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -88,7 +88,7 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
Modified: trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -33,11 +33,12 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.structure.spi.DeploymentContext;
@@ -207,9 +208,9 @@
*/
protected void createService() throws Exception
{
- ServerConfig config = ServerConfigLocator.locate();
+ JBossASServerConfig config = ServerConfigLocator.locate();
// Get the temp directory location
- File basedir = config.getServerTempDir();
+ File basedir = new File(config.getServerTempLocation().toURI());
// Set the local copy temp dir to tmp/deploy
tempDir = new File(basedir, "deploy");
// Delete any existing content
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/SARDeployer.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -25,7 +25,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
@@ -97,7 +97,7 @@
log.debug("Service deployment has no services: " + parsed.getName());
return parsed;
}
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
String docStr = DOMWriter.printNode(config, true);
int index = docStr.toLowerCase().indexOf("password");
@@ -105,7 +105,7 @@
{
docStr = maskPasswords(docStr, index);
}
- log.debug(docStr);
+ log.trace(docStr);
}
ServiceMetaDataParser SMDparser = new ServiceMetaDataParser(config);
services = SMDparser.parse();
@@ -135,8 +135,8 @@
VirtualFile codebaseFile = unit.getRoot();
if (".".equals(codebase) == false)
{
- ServerConfig config = ServerConfigLocator.locate();
- URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
+ JBossASServerConfig config = ServerConfigLocator.locate();
+ URL codeBaseURL = new URL(config.getServerHomeLocation(), codebase);
codebaseFile = VFS.getRoot(codeBaseURL);
}
Modified: trunk/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/pm/XMLAttributePersistenceManager.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -644,7 +644,7 @@
catch(Exception e) {
// Otherwise, try to make it inside the jboss directory hierarchy
- File homeDir = ServerConfigLocator.locate().getServerHomeDir();
+ final File homeDir = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
dir = new File(homeDir, baseDir);
Modified: trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,10 +21,11 @@
*/
package org.jboss.system.server;
-import java.io.File;
import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
/**
* An mbean wrapper for the BaseServerConfig that exposes the config as the
@@ -35,7 +36,7 @@
*/
public class ServerConfigImpl implements ServerConfigImplMBean
{
- private ServerConfig config;
+ private JBossASServerConfig config;
/**
* Construct a ServerConfigImpl with the ServerConfig pojo which will be used
@@ -43,12 +44,12 @@
*
* @param config - the ServerConfig pojo to expose as a ServerConfigImplMBean
*/
- public ServerConfigImpl(ServerConfig config)
+ public ServerConfigImpl(JBossASServerConfig config)
{
this.config = config;
}
- public ServerConfig getConfig()
+ public JBossASServerConfig getConfig()
{
return config;
}
@@ -57,149 +58,374 @@
{
return config.equals(obj);
}
+
+ /*
+ * All methods below this marker delegate to the underlying config
+ */
- public boolean getBlockingShutdown()
+ public JBossASServerConfig bindAddress(String arg0)
{
- return config.getBlockingShutdown();
+ config.bindAddress(arg0);
+ return this;
}
- public boolean getExitOnShutdown()
+ public JBossASServerConfig bootLibraryLocation(String arg0) throws IllegalArgumentException
{
- return config.getExitOnShutdown();
+ config.bootLibraryLocation(arg0);
+ return this;
}
- public File getHomeDir()
+ public JBossASServerConfig bootLibraryLocation(URL arg0)
{
- return config.getHomeDir();
+ config.bootLibraryLocation(arg0);
+ return this;
}
- public URL getHomeURL()
+ public JBossASServerConfig commonBaseLocation(String arg0) throws IllegalArgumentException
{
- return config.getHomeURL();
+ config.commonBaseLocation(arg0);
+ return this;
}
- public URL getLibraryURL()
+ public JBossASServerConfig commonBaseLocation(URL arg0)
{
- return config.getLibraryURL();
+ config.commonBaseLocation(arg0);
+ return this;
}
- public URL getPatchURL()
+ public JBossASServerConfig commonLibLocation(String arg0) throws IllegalArgumentException
{
- return config.getPatchURL();
+ config.commonLibLocation(arg0);
+ return this;
}
- public boolean getPlatformMBeanServer()
+ public JBossASServerConfig commonLibLocation(URL arg0)
{
- return config.getPlatformMBeanServer();
+ config.commonLibLocation(arg0);
+ return this;
}
- public boolean getRequireJBossURLStreamHandlerFactory()
+ public String getBindAddress()
{
- return config.getRequireJBossURLStreamHandlerFactory();
+ return config.getBindAddress();
}
- public String getRootDeploymentFilename()
+ public URL getBootLibraryLocation()
{
- return config.getRootDeploymentFilename();
+ return config.getBootLibraryLocation();
}
- public File getServerBaseDir()
+ public URL getCommonBaseLocation()
{
- return config.getServerBaseDir();
+ return config.getCommonBaseLocation();
}
- public URL getServerBaseURL()
+ public URL getCommonLibLocation()
{
- return config.getServerBaseURL();
+ return config.getCommonLibLocation();
}
- public URL getServerConfigURL()
+ public URL getJBossHome()
{
- return config.getServerConfigURL();
+ return config.getJBossHome();
}
- public File getServerDataDir()
+ public URL getNativeLibraryLocation()
{
- return config.getServerDataDir();
+ return config.getNativeLibraryLocation();
}
- public File getServerHomeDir()
+ public String getPartitionName()
{
- return config.getServerHomeDir();
+ return config.getPartitionName();
}
- public URL getServerHomeURL()
+ public URL getServerBaseLocation()
{
- return config.getServerHomeURL();
+ return config.getServerBaseLocation();
}
- public URL getServerLibraryURL()
+ public URL getServerConfLocation()
{
- return config.getServerLibraryURL();
+ return config.getServerConfLocation();
}
- public URL getCommonBaseURL()
+ public URL getServerDataLocation()
{
- return config.getCommonBaseURL();
+ return config.getServerDataLocation();
}
-
- public URL getCommonLibraryURL()
+
+ public URL getServerHomeLocation()
{
- return config.getCommonLibraryURL();
+ return config.getServerHomeLocation();
}
-
- public File getServerLogDir()
+
+ public URL getServerLibLocation()
{
- return config.getServerLogDir();
+ return config.getServerLibLocation();
}
+ public URL getServerLogLocation()
+ {
+ return config.getServerLibLocation();
+ }
+
public String getServerName()
{
return config.getServerName();
}
- public File getServerNativeDir()
+ public URL getServerTempLocation()
{
- return config.getServerNativeDir();
+ return config.getServerTempLocation();
}
- public File getServerTempDeployDir()
+ public String getUdpGroup()
{
- return config.getServerTempDeployDir();
+ return config.getUdpGroup();
}
- public File getServerTempDir()
+ public Integer getUdpPort()
{
- return config.getServerTempDir();
+ return config.getUdpPort();
}
- public int hashCode()
+ public Boolean isLoadNative()
{
- return config.hashCode();
+ return config.isLoadNative();
}
- public void setBlockingShutdown(boolean flag)
+ public JBossASServerConfig jbossHome(String arg0) throws IllegalArgumentException
{
- config.setBlockingShutdown(flag);
+ config.jbossHome(arg0);
+ return this;
}
- public void setExitOnShutdown(boolean flag)
+ public JBossASServerConfig jbossHome(URL arg0)
{
- config.setExitOnShutdown(flag);
+ config.jbossHome(arg0);
+ return this;
}
- public void setRequireJBossURLStreamHandlerFactory(boolean flag)
+ public JBossASServerConfig loadNative(Boolean arg0)
{
- config.setRequireJBossURLStreamHandlerFactory(flag);
+ config.loadNative(arg0);
+ return this;
}
- public void setRootDeploymentFilename(String filename)
+ public JBossASServerConfig nativeLibraryLocation(String arg0) throws IllegalArgumentException
{
- config.setRootDeploymentFilename(filename);
+ config.nativeLibraryLocation(arg0);
+ return this;
}
- public String getSpecificationVersion()
+ public JBossASServerConfig nativeLibraryLocation(URL arg0)
{
- return config.getSpecificationVersion();
+ config.nativeLibraryLocation(arg0);
+ return this;
}
+
+ public JBossASServerConfig partitionName(String arg0)
+ {
+ config.partitionName(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverBaseLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverBaseLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverBaseLocation(URL arg0)
+ {
+ config.serverBaseLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverConfLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverConfLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverConfLocation(URL arg0)
+ {
+ config.serverConfLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverDataLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverDataLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverDataLocation(URL arg0)
+ {
+ config.serverDataLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverHomeLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverHomeLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverHomeLocation(URL arg0)
+ {
+ config.serverHomeLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverLibLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverLibLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverLibLocation(URL arg0)
+ {
+ config.serverLibLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverLogLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverLogLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverLogLocation(URL arg0)
+ {
+ config.serverLogLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverName(String arg0)
+ {
+ config.serverName(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverTempLocation(String arg0) throws IllegalArgumentException
+ {
+ config.serverTempLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig serverTempLocation(URL arg0)
+ {
+ config.serverTempLocation(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig udpGroup(String arg0)
+ {
+ config.udpGroup(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig udpPort(Integer arg0)
+ {
+ config.udpPort(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig bootstrapHome(String arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.bootstrapHome(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig bootstrapHome(URL arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.bootstrapHome(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig bootstrapName(String arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.bootstrapName(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig bootstrapUrl(String arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.bootstrapUrl(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig bootstrapUrl(URL arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.bootstrapUrl(arg0);
+ return this;
+ }
+
+ public void freeze() throws IllegalStateException
+ {
+ config.freeze();
+
+ }
+
+ public URL getBootstrapHome()
+ {
+ return config.getBootstrapHome();
+ }
+
+ public String getBootstrapName()
+ {
+ return config.getBootstrapName();
+ }
+
+ public URL getBootstrapUrl()
+ {
+ return config.getBootstrapUrl();
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return config.getProperties();
+ }
+
+ public boolean isFrozen()
+ {
+ return config.isFrozen();
+ }
+
+ public JBossASServerConfig property(String arg0, String arg1) throws IllegalArgumentException, IllegalStateException
+ {
+ config.property(arg0, arg1);
+ return this;
+ }
+
+ public Boolean isUsePlatformMBeanServer()
+ {
+ return config.isUsePlatformMBeanServer();
+ }
+
+ public JBossASServerConfig usePlatformMBeanServer(Boolean arg0)
+ {
+ config.usePlatformMBeanServer(arg0);
+ return this;
+ }
+
+ public String getProperty(String arg0) throws IllegalArgumentException
+ {
+ return config.getProperty(arg0);
+ }
+
+ public JBossASServerConfig properties(Map<String, String> arg0) throws IllegalArgumentException,
+ IllegalStateException
+ {
+ config.properties(arg0);
+ return this;
+ }
+
+ public JBossASServerConfig properties(Properties arg0) throws IllegalArgumentException, IllegalStateException
+ {
+ config.properties(arg0);
+ return this;
+ }
}
Modified: trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigImplMBean.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,186 +21,16 @@
*/
package org.jboss.system.server;
-import java.io.File;
-import java.net.URL;
-
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.mx.util.ObjectNameFactory;
/**
* MBean interface.
*/
-public interface ServerConfigImplMBean
+public interface ServerConfigImplMBean extends JBossASServerConfig
{
/** Default ObjectName */
ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=ServerConfig");
-
- /**
- * Get the server Specification-Version
- */
- String getSpecificationVersion();
-
- /**
- * Get the local home directory which the server is running from.
- */
- File getHomeDir();
-
- /**
- * Get the home URL which the server is running from.
- */
- URL getHomeURL();
-
- /**
- * Get the home URL which the server is running from.
- */
- URL getLibraryURL();
-
- /**
- * Get the patch URL for the server.
- */
- URL getPatchURL();
-
- /**
- * Get the name of the server.
- */
- String getServerName();
-
- /**
- * Get the base directory for calculating server home directories.
- */
- File getServerBaseDir();
-
- /**
- * Get the server home directory.
- */
- File getServerHomeDir();
-
- /**
- * Get the directory where log files will be stored.
- * @return the writable log directory
- */
- java.io.File getServerLogDir();
-
- /**
- * Get the directory where temporary files will be stored.
- */
- File getServerTempDir();
-
- /**
- * Get the directory where local data will be stored.
- */
- File getServerDataDir();
-
- /**
- * Get the base directory for calculating server home URLs.
- */
- URL getServerBaseURL();
-
- /**
- * Get the server home URL.
- */
- URL getServerHomeURL();
-
- /**
- * Get the server library URL.
- */
- URL getServerLibraryURL();
-
- /**
- * Get the server configuration URL.
- */
- URL getServerConfigURL();
-
- /**
- * Get the common base URL.
- */
- URL getCommonBaseURL();
-
- /**
- * Get the common library URL.
- */
- URL getCommonLibraryURL();
-
- /**
- * Get the current value of the flag that indicates if we are
- * using the platform MBeanServer as the main jboss server.
- * Both the {@link ServerConfig.PLATFORM_MBEANSERVER}
- * property must be set, and the jvm must be jdk1.5+
- */
- boolean getPlatformMBeanServer();
-
- /**
- * Enable or disable exiting the JVM when {@link Server#shutdown}
- * is called. If enabled, then shutdown calls {@link Server#exit}.
- * If disabled, then only the shutdown hook will be run.
- * @param flag True to enable calling exit on shutdown.
- */
- void setExitOnShutdown(boolean flag);
-
- /**
- * Get the current value of the exit on shutdown flag.
- * @return The current value of the exit on shutdown flag.
- */
- boolean getExitOnShutdown();
-
- /**
- * Enable or disable blocking when {@link Server#shutdown} is called.
- * If enabled, then shutdown will be called in the current thread.
- * If disabled, then the shutdown hook will be run ansynchronously
- * in a separate thread.
- * @param flag True to enable blocking shutdown.
- */
- void setBlockingShutdown(boolean flag);
-
- /**
- * Get the current value of the blocking shutdown flag.
- * @return The current value of the blocking shutdown flag.
- */
- boolean getBlockingShutdown();
-
- /**
- * Set the RequireJBossURLStreamHandlerFactory flag. if false,
- * exceptions when setting the URLStreamHandlerFactory will
- * be logged and ignored.
- * @param flag True to enable blocking shutdown.
- */
- void setRequireJBossURLStreamHandlerFactory(boolean flag);
-
- /**
- * Get the current value of the requireJBossURLStreamHandlerFactory flag.
- * @return The current value of the requireJBossURLStreamHandlerFactory flag.
- */
- boolean getRequireJBossURLStreamHandlerFactory();
-
- /**
- * Set the filename of the root deployable that will be used to
- * finalize the bootstrap process.
- * @param filename The filename of the root deployable.
- */
- void setRootDeploymentFilename(String filename);
-
- /**
- * Get the filename of the root deployable that will be used to
- * finalize the bootstrap process.
- * @return The filename of the root deployable.
- */
- String getRootDeploymentFilename();
-
- /**
- * Get the native dir for unpacking
- *
- * @return the directory
- */
- File getServerNativeDir() ;
-
- /**
- * Get the temporary deployment dir for unpacking
- *
- * @return the directory
- */
- File getServerTempDeployDir() ;
-
}
Modified: trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/server/ServerConfigLocator.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,7 +21,8 @@
*/
package org.jboss.system.server;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.config.ServerConfig;
import org.jboss.mx.util.MBeanProxyExt;
/**
@@ -33,13 +34,13 @@
*/
public class ServerConfigLocator
{
- private static volatile ServerConfig instance = null;
+ private static volatile JBossASServerConfig instance = null;
- public static ServerConfig locate()
+ public static JBossASServerConfig locate()
{
if (instance == null) {
- instance = (ServerConfig)
- MBeanProxyExt.create(ServerConfig.class,
+ instance = (JBossASServerConfig)
+ MBeanProxyExt.create(JBossASServerConfig.class,
ServerConfigImplMBean.OBJECT_NAME);
}
Copied: trunk/system-jmx/src/main/org/jboss/system/server/ServerConstants.java (from rev 91251, branches/dml-log-service-integration/system-jmx/src/main/org/jboss/system/server/ServerConstants.java)
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/ServerConstants.java (rev 0)
+++ trunk/system-jmx/src/main/org/jboss/system/server/ServerConstants.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.system.server;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+
+/**
+ * ServerConstants
+ *
+ * Holds constants used for the Server MBean. This
+ * class is primarily in place such that we may access
+ * properties without leaking JBossASServer and MC Kernel
+ * references like {@link ServerImplMBean} does.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServerConstants
+{
+ /** The default object name */
+ ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=Server");
+}
Modified: trunk/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/server/ServerImplMBean.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,21 +21,15 @@
*/
package org.jboss.system.server;
-import javax.management.ObjectName;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
-import org.jboss.bootstrap.spi.Server;
-import org.jboss.mx.util.ObjectNameFactory;
-
/**
* MBean interface.
*/
-public interface ServerImplMBean extends Server
+public interface ServerImplMBean extends JBossASServer, ServerConstants
{
- /** The default object name */
- ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.system:type=Server");
-
// Attributes ----------------------------------------------------
-
+
/**
* Hint to the JVM to run the garbage collector.
*/
Modified: trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
+import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -38,16 +39,25 @@
import javax.management.NotificationEmitter;
import javax.management.NotificationFilter;
import javax.management.NotificationListener;
-import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.ServerConfig;
-import org.jboss.bootstrap.spi.ServerProcess;
+import org.jboss.bootstrap.spi.Bootstrap;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
+import org.jboss.bootstrap.spi.config.ConfigurationValidator;
+import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.spi.server.ServerInitializer;
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloading.spi.RealClassLoader;
import org.jboss.classloading.spi.metadata.ExportAll;
import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.logging.Logger;
import org.jboss.mx.loading.RepositoryClassLoader;
import org.jboss.mx.server.ServerConstants;
import org.jboss.mx.util.JMXExceptionDecoder;
@@ -63,7 +73,6 @@
import org.jboss.util.file.FileSuffixFilter;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
-import org.jboss.logging.Logger;
/**
* A pojo that creates a legacy jmx kernel ala the jboss-4.x server bootstrap.
@@ -82,9 +91,9 @@
/** The JMX MBeanServer which will serve as our communication bus. */
private MBeanServer mbeanServer;
- private ServerProcess serverImpl;
+ private JBossASServer serverImpl;
private ServiceController controller;
- private ServerConfig serverConfig;
+ private JBossASServerConfig serverConfig;
private ServerConfigImplMBean serverConfigMBean;
private ServerInfoMBean serverInfo;
/** The kernel */
@@ -103,11 +112,11 @@
super(log);
}
- public ServerProcess getServerImpl()
+ public JBossASServer getServerImpl()
{
return serverImpl;
}
- public void setServerImpl(ServerProcess serverImpl)
+ public void setServerImpl(JBossASServer serverImpl)
{
this.serverImpl = serverImpl;
this.notificationEmitter = (NotificationEmitter) serverImpl;
@@ -159,15 +168,15 @@
ServerConstants.DEFAULT_MBEAN_SERVER_BUILDER_CLASS);
System.setProperty(ServerConstants.MBEAN_SERVER_BUILDER_CLASS_PROPERTY, builder);
- serverConfig = serverImpl.getConfig();
+ serverConfig = serverImpl.getConfiguration();
serverConfigMBean = new ServerConfigImpl(serverConfig);
// Check if we'll use the platform MBeanServer or instantiate our own
- if (serverConfig.getPlatformMBeanServer() == true)
+ if (serverConfig.isUsePlatformMBeanServer() == true)
{
// jdk1.5+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class clazz = cl.loadClass("java.lang.management.ManagementFactory");
- Class[] sig = null;
+ Class<?> clazz = cl.loadClass("java.lang.management.ManagementFactory");
+ Class<?>[] sig = null;
Method method = clazz.getMethod("getPlatformMBeanServer", sig);
Object[] args = null;
mbeanServer = (MBeanServer) method.invoke(null, args);
@@ -268,25 +277,22 @@
// ServerImplMBean delegation
public void init(Properties props) throws Exception
{
- serverImpl.init(props);
+ serverImpl.initialize();
}
- public void init(Properties props, Map<String, Object> metadata) throws Exception
- {
- serverImpl.init(props);
- }
- public void exit()
- {
- serverImpl.exit();
- }
+ // AS isn't always going to be a standalone process
+// public void exit()
+// {
+// serverImpl.exit();
+// }
+//
+// public void exit(int exitcode)
+// {
+// serverImpl.exit(exitcode);
+// }
- public void exit(int exitcode)
+ public JBossASServerConfig getConfig()
{
- serverImpl.exit(exitcode);
- }
-
- public ServerConfig getConfig()
- {
return serverConfig;
}
/**
@@ -342,24 +348,25 @@
return serverImpl.getVersionNumber();
}
- public void halt()
- {
- serverImpl.halt();
- }
+ // AS isn't always going to be a standalone process
+// public void halt()
+// {
+// serverImpl.halt();
+// }
+//
+// public void halt(int exitcode)
+// {
+// serverImpl.halt(exitcode);
+// }
- public void halt(int exitcode)
- {
- serverImpl.halt(exitcode);
- }
-
public boolean isInShutdown()
{
- return serverImpl.isInShutdown();
+ return serverImpl.getState().equals(LifecycleState.STOPPING);
}
public boolean isStarted()
{
- return serverImpl.isStarted();
+ return serverImpl.getState().equals(LifecycleState.STARTED);
}
public void runFinalization()
@@ -384,9 +391,30 @@
public void shutdown()
{
- if (log.isTraceEnabled())
- log.trace("Shutdown caller:", new Throwable("Here"));
- serverImpl.shutdown();
+ // JBAS-6916
+ // We'll shut down the server via the Main shutdown hook...
+// if (log.isTraceEnabled())
+// log.trace("Shutdown caller:", new Throwable("Here"));
+// try{
+// serverImpl.shutdown();
+// }
+// catch(Throwable t)
+// {
+// throw new RuntimeException("Error in shutdown of server: " + serverImpl,t);
+// }
+
+ // JBAS-6916:
+ //TODO This must be removed, VM exit is not a feature of server shutdown.
+ // Now exit the Runtime, because AS has non-daemon Threads still
+ // chugging away.
+ new Thread()
+ {
+ public void run()
+ {
+ log.info("Server exit called, exiting the JVM now!");
+ Runtime.getRuntime().exit(1);
+ }
+ }.start();
}
/**
@@ -434,7 +462,7 @@
try
{
MBeanServer registeredServer = mbeanServer;
- if (serverConfig.getPlatformMBeanServer() == true)
+ if (serverConfig.isUsePlatformMBeanServer() == true)
registeredServer = LazyMBeanServer.getRegisteredMBeanServer(mbeanServer);
MBeanServerFactory.releaseMBeanServer(registeredServer);
}
@@ -459,7 +487,7 @@
// Add the patch URL. If the url protocol is file, then
// add the contents of the directory it points to
- URL patchURL = serverConfig.getPatchURL();
+ URL patchURL = null; //serverConfig.getPatchURL(); //TODO Supply a patchURL?
if (patchURL != null)
{
if (patchURL.getProtocol().equals("file"))
@@ -468,14 +496,14 @@
if (dir.exists())
{
// Add the local file patch directory
- list.add(dir.toURL());
+ list.add(dir.toURI().toURL());
// Add the contents of the directory too
File[] jars = dir.listFiles(new FileSuffixFilter(new String[] { ".jar", ".zip" }, true));
for (int j = 0; jars != null && j < jars.length; j++)
{
- list.add(jars[j].getCanonicalFile().toURL());
+ list.add(jars[j].getCanonicalFile().toURI().toURL());
}
}
}
@@ -486,7 +514,7 @@
}
// Add the mbeanServer configuration directory to be able to load serverConfig files as resources
- list.add(serverConfig.getServerConfigURL());
+ list.add(serverConfig.getServerConfLocation());
log.debug("Boot url list: " + list);
return list;
@@ -546,45 +574,118 @@
bootstrapUCLName = ((RealClassLoader) classLoader).getObjectName();
return classLoader;
}
+
+ /*
+ * Below this line are delegate methods only to
+ * fulfill the contract of JBossASServer
+ */
- /**
- * Instantiate and register a service for the given classname into the MBean mbeanServer.
- *
- * @param classname the mbean class name
- * @param name the obejct name
- * @return the object name
- * @throws Exception for any error
- */
- private ObjectName createMBean(final String classname, String name)
- throws Exception
+ public Map<String, KernelDeployment> getDeployments()
{
- ObjectName mbeanName = null;
- if( name != null )
- mbeanName = new ObjectName(name);
- try
- {
- // See if there is an xmbean descriptor for the bootstrap mbean
- URL xmbeanDD = new URL("resource:xmdesc/"+classname+"-xmbean.xml");
- Object resource = mbeanServer.instantiate(classname);
- // Create the XMBean
- Object[] args = {resource, xmbeanDD};
- String[] sig = {Object.class.getName(), URL.class.getName()};
- ObjectInstance instance = mbeanServer.createMBean("org.jboss.mx.modelmbean.XMBean",
- mbeanName,
- bootstrapUCLName,
- args,
- sig);
- mbeanName = instance.getObjectName();
- log.debug("Created system XMBean: "+mbeanName);
- }
- catch(Exception e)
- {
- log.debug("Failed to create xmbean for: "+classname);
- mbeanName = mbeanServer.createMBean(classname, mbeanName).getObjectName();
- log.debug("Created system MBean: " + mbeanName);
- }
+ return serverImpl.getDeployments();
+ }
- return mbeanName;
+ public Kernel getKernel()
+ {
+ return serverImpl.getKernel();
}
+
+ public void addBootstrap(final Bootstrap<JBossASServer, JBossASServerConfig> arg0) throws IllegalArgumentException
+ {
+ serverImpl.addBootstrap(arg0);
+ }
+
+ public ConfigurationInitializer<JBossASServerConfig> getConfigInitializer()
+ {
+ return serverImpl.getConfigInitializer();
+ }
+
+ public JBossASServerConfig getConfiguration()
+ {
+ return serverImpl.getConfiguration();
+ }
+
+ public ServerInitializer<JBossASServer, JBossASServerConfig> getServerInitializer()
+ {
+ return serverImpl.getServerInitializer();
+ }
+
+ public LifecycleState getState()
+ {
+ return serverImpl.getState();
+ }
+
+ public ConfigurationValidator<JBossASServerConfig> getValidator()
+ {
+ return serverImpl.getValidator();
+ }
+
+ public void initialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException
+ {
+ serverImpl.initialize();
+ }
+
+ public void registerEventHandler(final LifecycleEventHandler arg0, final EnumSet<LifecycleState> arg1)
+ throws IllegalArgumentException
+ {
+ serverImpl.registerEventHandler(arg0, arg1);
+ }
+
+ public void registerEventHandler(final LifecycleEventHandler arg0, final LifecycleState... arg1)
+ throws IllegalArgumentException
+ {
+ serverImpl.registerEventHandler(arg0, arg1);
+
+ }
+
+ public void registerEventHandler(final LifecycleState arg0, final LifecycleEventHandler arg1)
+ throws IllegalArgumentException
+ {
+ serverImpl.registerEventHandler(arg0, arg1);
+ }
+
+ public void registerEventHandlers(final LifecycleState arg0, final LifecycleEventHandler... arg1)
+ throws IllegalArgumentException
+ {
+ serverImpl.registerEventHandlers(arg0, arg1);
+ }
+
+ public void removeBootstrap(final Bootstrap<JBossASServer, JBossASServerConfig> arg0)
+ throws IllegalArgumentException
+ {
+ serverImpl.removeBootstrap(arg0);
+
+ }
+
+ public void setConfigInitializer(final ConfigurationInitializer<JBossASServerConfig> arg0)
+ throws IllegalStateException
+ {
+ serverImpl.setConfigInitializer(arg0);
+
+ }
+
+ public void setConfiguration(final JBossASServerConfig arg0)
+ {
+ serverImpl.setConfiguration(arg0);
+ }
+
+ public void setServerInitializer(final ServerInitializer<JBossASServer, JBossASServerConfig> arg0)
+ throws IllegalStateException
+ {
+ serverImpl.setServerInitializer(arg0);
+
+ }
+
+ public void setValidator(final ConfigurationValidator<JBossASServerConfig> arg0) throws IllegalStateException
+ {
+ serverImpl.setValidator(arg0);
+
+ }
+
+ public boolean unregisterEventHandler(final LifecycleEventHandler arg0, final LifecycleState arg1)
+ throws IllegalArgumentException
+ {
+ return serverImpl.unregisterEventHandler(arg0, arg1);
+ }
}
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/testsuite/build.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -245,7 +245,12 @@
<path refid="jboss.security.int.classpath"/>
<path refid="jboss.server.classpath"/>
<path refid="jboss.main.classpath"/>
- <path refid="jboss.jboss.bootstrap.classpath"/>
+ <path refid="jboss.jboss.bootstrap.spi.classpath"/>
+ <path refid="jboss.jboss.bootstrap.spi.as.classpath"/>
+ <path refid="jboss.jboss.bootstrap.spi.mc.classpath"/>
+ <path refid="jboss.jboss.bootstrap.impl.base.classpath"/>
+ <path refid="jboss.jboss.bootstrap.impl.as.classpath"/>
+ <path refid="jboss.jboss.bootstrap.impl.mc.classpath"/>
<path refid="jboss.system.classpath"/>
<path refid="jboss.systemjmx.classpath"/>
<path refid="jboss.test.classpath"/>
Modified: trunk/testsuite/imports/sections/classloader.xml
===================================================================
--- trunk/testsuite/imports/sections/classloader.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/testsuite/imports/sections/classloader.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -223,8 +223,11 @@
</webinf>
<!-- Need to include log4j.jar to allow the singleton config to be
reinitialized in the context of the war to find the war log4j.xml.
+ Also, commons-logging.jar is needed as well (since it doesn't exist in the AS
+ and is only emulated)
-->
<lib refid="log4j:log4j:jar"/>
+ <lib refid="commons-logging:commons-logging:jar"/>
<classes dir="${build.classes}">
<include
name="org/jboss/test/classloader/scoping/override/web/comlog/*"/>
Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/testsuite/imports/server-config.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -114,6 +114,9 @@
<jvmarg value="-Djava.security.policy==${build.resources}/securitymgr/server.policy"/>
<sysproperty key="java.protocol.handler.pkgs" value="org.jboss.handlers.stub"/>
<jvmarg value="-Djava.security.debug=failure"/>
+ <!-- jvmarg value="-Djboss.boot.server.log.level=TRACE"/ -->
+ <!-- jvmarg value="-Djboss.boot.server.log.file.level=TRACE"/ -->
+ <jvmarg value="-Djava.security.debug=failure"/>
<!-- Replace for security manager debug verbose info
<jvmarg value="-Djava.security.debug=access,failure,policy"/>
Modified: trunk/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/mbean/TestDeployer.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -55,7 +55,7 @@
{
public String getBaseDir() throws Exception
{
- File file = ServerConfigLocator.locate().getServerHomeDir();
+ File file = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
return file.getCanonicalPath();
}
Modified: trunk/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/xmbean/XMLAttributePersistenceManagerTestService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -55,7 +55,7 @@
protected void startService()
throws Exception
{
- File tmpDir = ServerConfigLocator.locate().getServerTempDir();
+ File tmpDir = new File(ServerConfigLocator.locate().getServerTempLocation().toURI());
boolean result;
// Get a temporary file in the server tmp dir, with a space in its name
Modified: trunk/thirdparty/pom.xml
===================================================================
--- trunk/thirdparty/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/thirdparty/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -614,12 +614,47 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-impl-as</artifactId>
<mapping>
- <componentId>jboss.jboss-bootstrap</componentId>
+ <componentId>jboss.jboss-bootstrap-impl-as</componentId>
</mapping>
</dependency>
<dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-base</artifactId>
+ <mapping>
+ <componentId>jboss.jboss-bootstrap-impl-base</componentId>
+ </mapping>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-mc</artifactId>
+ <mapping>
+ <componentId>jboss.jboss-bootstrap-impl-mc</componentId>
+ </mapping>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi</artifactId>
+ <mapping>
+ <componentId>jboss.jboss-bootstrap-spi</componentId>
+ </mapping>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
+ <mapping>
+ <componentId>jboss.jboss-bootstrap-spi-as</componentId>
+ </mapping>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-mc</artifactId>
+ <mapping>
+ <componentId>jboss.jboss-bootstrap-spi-mc</componentId>
+ </mapping>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jpa</groupId>
<artifactId>jboss-jpa-deployers</artifactId>
<mapping>
@@ -1231,10 +1266,18 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logging</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
@@ -1390,14 +1433,22 @@
<artifactId>jboss-logging-spi</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.logbridge</groupId>
- <artifactId>jboss-logbridge</artifactId>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-logmanager</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>logging-service-metadata</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.logmanager</groupId>
+ <artifactId>jboss-logmanager-log4j</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-classloading-spi</artifactId>
</dependency>
@@ -1465,9 +1516,29 @@
</dependency>
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-impl-as</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-impl-mc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-spi-mc</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.cluster</groupId>
<artifactId>jboss-ha-client</artifactId>
</dependency>
Modified: trunk/tomcat/pom.xml
===================================================================
--- trunk/tomcat/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/tomcat/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -161,10 +161,6 @@
<dependencies>
<!-- Compile (global dependencies) -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
<groupId>apache-xerces</groupId>
<artifactId>xml-apis</artifactId>
</dependency>
@@ -375,6 +371,10 @@
<artifactId>ejb3-persistence</artifactId>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ <dependency>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
</dependency>
Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -46,7 +46,8 @@
import org.apache.catalina.startup.CatalinaProperties;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.modeler.Registry;
-import org.jboss.bootstrap.spi.Server;
+import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
@@ -448,8 +449,9 @@
throw new IllegalStateException("Must set TomcatDeployer before stopping");
// Hot undeploy
- Boolean inShutdown = (Boolean) server.getAttribute(ServerImplMBean.OBJECT_NAME, "InShutdown");
- if (inShutdown.booleanValue() == false)
+ final LifecycleState currentState = (LifecycleState) server.getAttribute(ServerImplMBean.OBJECT_NAME, "State");
+ boolean inShutdown = currentState.equals(LifecycleState.STOPPING);
+ if (inShutdown == false)
{
log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' already started, stopping connectors now");
@@ -656,7 +658,7 @@
public void handleNotification(Notification msg, Object handback)
{
String type = msg.getType();
- if (type.equals(Server.START_NOTIFICATION_TYPE))
+ if (type.equals(JBossASServer.START_NOTIFICATION_TYPE))
{
log.debug("Saw " + type + " notification, starting connectors");
try
@@ -668,7 +670,7 @@
log.warn("Failed to startConnectors", e);
}
}
- if (type.equals(Server.STOP_NOTIFICATION_TYPE))
+ if (type.equals(JBossASServer.STOP_NOTIFICATION_TYPE))
{
log.debug("Saw " + type + " notification, stopping connectors");
try
Modified: trunk/varia/pom.xml
===================================================================
--- trunk/varia/pom.xml 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/pom.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -166,7 +166,7 @@
<!-- Compile (global dependencies) -->
<dependency>
<groupId>org.jboss.bootstrap</groupId>
- <artifactId>jboss-bootstrap</artifactId>
+ <artifactId>jboss-bootstrap-spi-as</artifactId>
</dependency>
<dependency>
Modified: trunk/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java
===================================================================
--- trunk/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/jdbc/HypersonicDatabase.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -35,7 +35,7 @@
/**
* Integration with <a href="http://sourceforge.net/projects/hsqldb">HSQLDB</a>
*
- * @author <a href="mailto:rickard.oberg at telkel.com">Rickard Öberg</a>
+ * @author <a href="mailto:rickard.oberg at telkel.com">Rickard �berg</a>
* @author <a href="mailto:Scott_Stark at displayscape.com">Scott Stark</a>.
* @author <a href="mailto:pf at iprobot.com">Peter Fagerlund</a>
* @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
@@ -601,7 +601,7 @@
// Get the server data directory
File dataDir = null;
- if (dbDataDir == null) dataDir = ServerConfigLocator.locate().getServerDataDir();
+ if (dbDataDir == null) dataDir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
else dataDir = new File(dbDataDir);
// Get DB directory
@@ -643,7 +643,7 @@
{
// Get the server data directory
File dataDir = null;
- if (dbDataDir == null) dataDir = ServerConfigLocator.locate().getServerDataDir();
+ if (dbDataDir == null) dataDir = new File(ServerConfigLocator.locate().getServerDataLocation().toURI());
else dataDir = new File(dbDataDir);
// Get DB directory
Modified: trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java
===================================================================
--- trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/SnmpAgentService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -25,7 +25,7 @@
import javax.management.Notification;
import javax.management.ObjectName;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.system.ListenerServiceMBeanSupport;
import org.opennms.protocols.snmp.SnmpAgentSession;
import org.opennms.protocols.snmp.SnmpPeer;
@@ -568,7 +568,7 @@
{
// cater for possible global -b option, if no override has been specified
InetAddress address = this.bindAddress != null ? this.bindAddress :
- toInetAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+ toInetAddress(System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
// the listening address
SnmpPeer peer = new SnmpPeer(address, this.port);
Modified: trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java
===================================================================
--- trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/agent/TrapEmitter.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -30,7 +30,7 @@
import javax.management.Notification;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.jmx.adaptor.snmp.config.manager.Manager;
import org.jboss.logging.Logger;
import org.jboss.xb.binding.MappingObjectModelFactory;
@@ -299,7 +299,7 @@
{
if (host == null || host.length() == 0) {
- String defaultBindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
+ String defaultBindAddress = System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS);
if (defaultBindAddress != null && !defaultBindAddress.equals("0.0.0.0"))
return InetAddress.getByName(defaultBindAddress);
else
Modified: trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java
===================================================================
--- trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/jmx/adaptor/snmp/trapd/TrapdService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -22,7 +22,7 @@
import java.net.InetAddress;
import java.net.UnknownHostException;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.system.ServiceMBeanSupport;
import org.opennms.protocols.snmp.SnmpTrapSession;
@@ -126,7 +126,7 @@
try {
// cater for possible global -b option, if no override has been specified
InetAddress address = this.bindAddress != null ? this.bindAddress :
- toInetAddress(System.getProperty(ServerConfig.SERVER_BIND_ADDRESS));
+ toInetAddress(System.getProperty(JBossASServerConfig.PROP_KEY_JBOSSAS_BIND_ADDRESS));
this.trapSession =
new SnmpTrapSession(new TrapReceiver(this.log), this.port, address);
Modified: trunk/varia/src/main/org/jboss/services/deployment/DeploymentManager.java
===================================================================
--- trunk/varia/src/main/org/jboss/services/deployment/DeploymentManager.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/services/deployment/DeploymentManager.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -546,7 +546,7 @@
catch(Exception e) {
// Otherwise, try to see inside the jboss directory hierarchy
- File homeDir = ServerConfigLocator.locate().getServerHomeDir();
+ File homeDir = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI());
dir = new File(homeDir, targetDir);
Modified: trunk/varia/src/main/org/jboss/services/deployment/LibraryManager.java
===================================================================
--- trunk/varia/src/main/org/jboss/services/deployment/LibraryManager.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/services/deployment/LibraryManager.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -24,8 +24,9 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.net.URISyntaxException;
-import org.jboss.bootstrap.spi.ServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
import org.jboss.logging.Logger;
import org.jboss.system.server.ServerConfigLocator;
import org.jboss.util.file.Files;
@@ -65,13 +66,21 @@
private LibraryManager()
{
// discover if there is a local server library dir
- ServerConfig config = ServerConfigLocator.locate();
- URL serverLibURL = config.getServerLibraryURL();
+ JBossASServerConfig config = ServerConfigLocator.locate();
+ URL serverLibURL = config.getServerLibLocation();
if (serverLibURL != null && serverLibURL.getProtocol().startsWith("file"))
{
this.serverLibDir = new File(serverLibURL.getFile());
- this.serverTmpDir = config.getServerTempDir();
+ try
+ {
+ this.serverTmpDir = new File(config.getServerTempLocation().toURI());
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new RuntimeException("Error in initialization", urise);
+ }
+
log.debug("Using serverLibDir: " + this.serverLibDir);
log.debug("Using serverTmpDir: " + this.serverTmpDir);
}
Modified: trunk/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java
===================================================================
--- trunk/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java 2009-07-14 21:00:25 UTC (rev 91253)
+++ trunk/varia/src/main/org/jboss/varia/property/SystemPropertiesService.java 2009-07-14 21:17:44 UTC (rev 91254)
@@ -21,6 +21,7 @@
*/
package org.jboss.varia.property;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -34,6 +35,7 @@
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
+
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -394,7 +396,7 @@
throws Exception
{
// get server's home for relative paths, need this for making urls
- serverHome = ServerConfigLocator.locate().getServerHomeDir().getPath();
+ serverHome = new File(ServerConfigLocator.locate().getServerHomeLocation().toURI()).getPath();
return super.preRegister(server, name);
}
Copied: trunk/varia/src/resources/logging (from rev 91251, branches/dml-log-service-integration/varia/src/resources/logging)
Deleted: trunk/varia/src/resources/logging/logmanager-jboss-beans.xml
===================================================================
--- branches/dml-log-service-integration/varia/src/resources/logging/logmanager-jboss-beans.xml 2009-07-14 20:32:13 UTC (rev 91251)
+++ trunk/varia/src/resources/logging/logmanager-jboss-beans.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2009, Red Hat Middleware LLC, and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This is free software; you can redistribute it and/or modify it
- ~ under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ This software is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public
- ~ License along with this software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- These two beans are to create the deployer for logging config files. -->
- <bean name="JBossLoggingMetaDataFactoryDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer">
- <constructor>
- <parameter>org.jboss.logging.metadata.LoggingMetaData</parameter>
- </constructor>
- </bean>
-
- <bean name="JBossLoggingMetaDataSchemaResolverDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
- <constructor>
- <parameter>org.jboss.logging.metadata.LoggingMetaData</parameter>
- </constructor>
- <property name="name">jboss-logging.xml</property>
- <property name="registerWithJBossXB">true</property>
- </bean>
-
- <!--
- ~ This is the system logging context, which is the default log context. It is "started" on demand so that it
- ~ the dependency (JBossLogService, below) isn't started until a jboss-logging.xml is deployed; in reality
- ~ the backing object is present from the moment the log system is initialized in bootstrap.
- -->
- <bean name="Logging:CONTEXT:system" class="org.jboss.logmanager.LogContext" mode="On Demand">
- <constructor factoryClass="org.jboss.logmanager.LogContext" factoryMethod="getSystemLogContext"/>
- <depends>JBossLogService</depends>
- </bean>
-
- <!--
- ~ This is the log service, which removes the bootstrap logging configuration when a logging configuration
- ~ is deployed (but only for the system log context; a deployment to another context will not cause this service
- ~ to start).
- -->
- <bean name="JBossLogService" class="org.jboss.logmanager.LogService" mode="On Demand"/>
-
- <!-- This is the repository selector for log4j which causes it to bridge to the logmanager. -->
- <bean name="JBossLog4jRepostiorySelector" class="org.jboss.logmanager.log4j.BridgeRepositorySelector"/>
-
- <!--
- ~ These two beans define the per-classloader log context selector which allows per-deployment logging. Since
- ~ enabling this feature may have a performance impact in certain cases, it's started up lazily (on demand)
- ~ when a separate log context is defined in a user deployment.
- -->
- <bean name="JBossLogManagerClassLoaderContextSelector" class="org.jboss.logmanager.ClassLoaderLogContextSelector"/>
-
- <bean name="JBossLogManagerContextSelectorService" class="org.jboss.logmanager.LogContextSelectorService" mode="On Demand">
- <property name="selector">
- <inject bean="JBossLogManagerClassLoaderContextSelector"/>
- </property>
- </bean>
-</deployment>
Copied: trunk/varia/src/resources/logging/logmanager-jboss-beans.xml (from rev 91251, branches/dml-log-service-integration/varia/src/resources/logging/logmanager-jboss-beans.xml)
===================================================================
--- trunk/varia/src/resources/logging/logmanager-jboss-beans.xml (rev 0)
+++ trunk/varia/src/resources/logging/logmanager-jboss-beans.xml 2009-07-14 21:17:44 UTC (rev 91254)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- These two beans are to create the deployer for logging config files. -->
+ <bean name="JBossLoggingMetaDataFactoryDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer">
+ <constructor>
+ <parameter>org.jboss.logging.metadata.LoggingMetaData</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="JBossLoggingMetaDataSchemaResolverDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+ <constructor>
+ <parameter>org.jboss.logging.metadata.LoggingMetaData</parameter>
+ </constructor>
+ <property name="name">jboss-logging.xml</property>
+ <property name="registerWithJBossXB">true</property>
+ </bean>
+
+ <!--
+ ~ This is the system logging context, which is the default log context. It is "started" on demand so that it
+ ~ the dependency (JBossLogService, below) isn't started until a jboss-logging.xml is deployed; in reality
+ ~ the backing object is present from the moment the log system is initialized in bootstrap.
+ -->
+ <bean name="Logging:CONTEXT:system" class="org.jboss.logmanager.LogContext" mode="On Demand">
+ <constructor factoryClass="org.jboss.logmanager.LogContext" factoryMethod="getSystemLogContext"/>
+ <depends>JBossLogService</depends>
+ </bean>
+
+ <!--
+ ~ This is the log service, which removes the bootstrap logging configuration when a logging configuration
+ ~ is deployed (but only for the system log context; a deployment to another context will not cause this service
+ ~ to start).
+ -->
+ <bean name="JBossLogService" class="org.jboss.logmanager.LogService" mode="On Demand"/>
+
+ <!-- This is the repository selector for log4j which causes it to bridge to the logmanager. -->
+ <bean name="JBossLog4jRepostiorySelector" class="org.jboss.logmanager.log4j.BridgeRepositorySelector"/>
+
+ <!--
+ ~ These two beans define the per-classloader log context selector which allows per-deployment logging. Since
+ ~ enabling this feature may have a performance impact in certain cases, it's started up lazily (on demand)
+ ~ when a separate log context is defined in a user deployment.
+ -->
+ <bean name="JBossLogManagerClassLoaderContextSelector" class="org.jboss.logmanager.ClassLoaderLogContextSelector"/>
+
+ <bean name="JBossLogManagerContextSelectorService" class="org.jboss.logmanager.LogContextSelectorService" mode="On Demand">
+ <property name="selector">
+ <inject bean="JBossLogManagerClassLoaderContextSelector"/>
+ </property>
+ </bean>
+</deployment>
More information about the jboss-cvs-commits
mailing list