[jboss-cvs] JBossAS SVN: r110165 - in trunk: component-matrix and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 22 12:31:57 EST 2010
Author: alesj
Date: 2010-12-22 12:31:56 -0500 (Wed, 22 Dec 2010)
New Revision: 110165
Removed:
trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ManagementObjectClass.java
trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/SecurityActions.java
trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ServiceMetaDataICF.java
Modified:
trunk/aspects/pom.xml
trunk/component-matrix/pom.xml
trunk/connector/pom.xml
trunk/ejb3/pom.xml
trunk/system-jmx/pom.xml
trunk/system/pom.xml
trunk/system/src/main/java/org/jboss/system/deployers/LegacyDeploymentContextComparator.java
trunk/testsuite/pom.xml
trunk/tomcat/pom.xml
trunk/webservices/pom.xml
trunk/weld-int/deployer-mc-int/pom.xml
Log:
[JBAS-8686, JBAS-8756]; update MC libs, remove AS deployers-jmx.
Add -jms.xml to legacy ordering -- before archives.
Modified: trunk/aspects/pom.xml
===================================================================
--- trunk/aspects/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/aspects/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -194,6 +194,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/component-matrix/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -77,8 +77,8 @@
<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>2.1.0-alpha-5</version.org.jboss.bootstrap>
- <version.org.jboss.cl>2.2.0.Alpha9</version.org.jboss.cl>
- <version.org.jboss.classpool>1.0.0.Alpha6</version.org.jboss.classpool>
+ <version.org.jboss.cl>2.2.0.GA</version.org.jboss.cl>
+ <version.org.jboss.classpool>1.0.0.GA</version.org.jboss.classpool>
<version.org.jboss.cluster.client>1.1.2.Final</version.org.jboss.cluster.client>
<version.org.jboss.cluster.server.api>2.0.0.Final</version.org.jboss.cluster.server.api>
<version.org.jboss.cluster.server.core>1.0.0.Final</version.org.jboss.cluster.server.core>
@@ -86,7 +86,7 @@
<version.org.jboss.cluster.cache.spi>3.0.0.Final</version.org.jboss.cluster.cache.spi>
<version.org.jboss.cluster.cache.ispn>1.0.0.Final</version.org.jboss.cluster.cache.ispn>
<version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
- <version.org.jboss.deployers>2.2.0.Alpha8</version.org.jboss.deployers>
+ <version.org.jboss.deployers>2.2.0.GA</version.org.jboss.deployers>
<version.org.jboss.ejb3.depchain>1.0.0-alpha-41</version.org.jboss.ejb3.depchain>
<!-- This to move into the EJB3 BOM -->
<version.org.jboss.ejb3.embedded>1.0.0-alpha-4</version.org.jboss.ejb3.embedded>
@@ -103,15 +103,15 @@
<version.org.jboss.jpa.impl>2.0.0</version.org.jboss.jpa.impl>
<version.org.jboss.jpa.mcint>1.0.0-alpha-2</version.org.jboss.jpa.mcint>
<version.org.jboss.jpa.spi>1.0.0</version.org.jboss.jpa.spi>
- <version.org.jboss.kernel>2.2.0.Alpha10</version.org.jboss.kernel>
+ <version.org.jboss.kernel>2.2.0.GA</version.org.jboss.kernel>
<version.org.jboss.logging>3.0.0.Beta4</version.org.jboss.logging>
<version.org.jboss.logging-service-metadata>1.0.0.CR9</version.org.jboss.logging-service-metadata>
<version.org.jboss.logmanager>1.2.0.CR8</version.org.jboss.logmanager>
<version.org.jboss.man>2.1.1.SP2</version.org.jboss.man>
<version.managed.beans.depchain>1.0.0-alpha-6</version.managed.beans.depchain>
<version.org.jboss.marshalling>1.3.0.CR3</version.org.jboss.marshalling>
- <version.org.jboss.mc-int>2.2.0.Alpha3</version.org.jboss.mc-int>
- <version.org.jboss.mdr>2.2.0.Alpha3</version.org.jboss.mdr>
+ <version.org.jboss.mc-int>2.2.0.GA</version.org.jboss.mc-int>
+ <version.org.jboss.mdr>2.2.0.GA</version.org.jboss.mdr>
<version.org.jboss.metadata.client>2.0.0.Alpha2</version.org.jboss.metadata.client>
<version.org.jboss.metadata.common>2.0.0.Alpha23</version.org.jboss.metadata.common>
<version.org.jboss.metadata.ear>2.0.0.Alpha4</version.org.jboss.metadata.ear>
@@ -119,16 +119,16 @@
<version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
<version.org.jboss.metadata.war>2.0.0.CR1</version.org.jboss.metadata.war>
<version.org.jboss.mod_cluster>1.1.0.Final</version.org.jboss.mod_cluster>
- <version.org.jboss.mx>6.0.0.Beta5</version.org.jboss.mx>
+ <version.org.jboss.mx>6.0.0.GA</version.org.jboss.mx>
<version.org.jboss.naming>5.0.5.Final</version.org.jboss.naming>
<version.org.jboss.profileservice>0.2.2</version.org.jboss.profileservice>
- <version.org.jboss.reflect>2.2.0.Alpha9</version.org.jboss.reflect>
+ <version.org.jboss.reflect>2.2.0.GA</version.org.jboss.reflect>
<version.org.jboss.reloaded.naming>0.3.0</version.org.jboss.reloaded.naming>
<version.org.jboss.resteasy>2.1.0.GA</version.org.jboss.resteasy>
<version.org.jboss.remoting>2.5.3</version.org.jboss.remoting>
<version.org.jboss.remoting3>3.1.0.Beta2</version.org.jboss.remoting3>
<version.org.jboss.remoting3.metadata>1.0.0.Beta2</version.org.jboss.remoting3.metadata>
- <version.org.jboss.scanning>1.0.0.Alpha7</version.org.jboss.scanning>
+ <version.org.jboss.scanning>1.0.0.GA</version.org.jboss.scanning>
<version.org.picketbox>3.0.0.CR2</version.org.picketbox>
<version.org.jboss.security.negotiation>2.0.3.SP1</version.org.jboss.security.negotiation>
<version.org.jboss.service.binding>1.2.0.Final</version.org.jboss.service.binding>
@@ -138,7 +138,7 @@
<version.org.jboss.switchboard.depchain>1.0.0-alpha-15</version.org.jboss.switchboard.depchain>
<version.org.jboss.threads>2.0.0.CR7</version.org.jboss.threads>
<version.org.jboss.threads-metadata>2.0.0.CR4</version.org.jboss.threads-metadata>
- <version.org.jboss.vfs>3.0.0.CR5</version.org.jboss.vfs>
+ <version.org.jboss.vfs>3.0.0.GA</version.org.jboss.vfs>
<version.org.jboss.weld>1.1.0.CR3</version.org.jboss.weld>
<version.cdi.api>1.0-SP4</version.cdi.api>
<version.org.jboss.xnio>2.1.0.CR2</version.org.jboss.xnio>
@@ -148,7 +148,7 @@
<version.ch.qos.cal10n>0.7.2</version.ch.qos.cal10n>
<version.org.springframework>3.0.1.RELEASE</version.org.springframework>
<version.oswego-concurrent.concurrent>1.3.4-jboss-update1</version.oswego-concurrent.concurrent>
- <version.seam.integration>6.0.0.Alpha1</version.seam.integration>
+ <version.seam.integration>6.0.0.GA</version.seam.integration>
<version.spring.integration>2.0.0-M1-SP1</version.spring.integration>
<version.staxex>2.1.1</version.staxex>
<version.streambuffer>1.0</version.streambuffer>
Modified: trunk/connector/pom.xml
===================================================================
--- trunk/connector/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/connector/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -145,6 +145,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.cl</groupId>
Modified: trunk/ejb3/pom.xml
===================================================================
--- trunk/ejb3/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/ejb3/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -233,7 +233,11 @@
<groupId>jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
Modified: trunk/system/pom.xml
===================================================================
--- trunk/system/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -133,6 +133,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.profileservice</groupId>
Modified: trunk/system/src/main/java/org/jboss/system/deployers/LegacyDeploymentContextComparator.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/deployers/LegacyDeploymentContextComparator.java 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system/src/main/java/org/jboss/system/deployers/LegacyDeploymentContextComparator.java 2010-12-22 17:31:56 UTC (rev 110165)
@@ -53,6 +53,7 @@
legacyOrder.put(".rar", 250);
legacyOrder.put("-ds.xml", 300);
legacyOrder.put(".har", 350);
+ legacyOrder.put("-jms.xml", 350);
legacyOrder.put(".jar", 400);
legacyOrder.put(".ejb3", 400);
legacyOrder.put(".par", 400);
Modified: trunk/system-jmx/pom.xml
===================================================================
--- trunk/system-jmx/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system-jmx/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -58,6 +58,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
Deleted: trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ManagementObjectClass.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ManagementObjectClass.java 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ManagementObjectClass.java 2010-12-22 17:31:56 UTC (rev 110165)
@@ -1,44 +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.system.deployers.managed;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * ManagementObjectClass annotation for describing the actual class
- * annotated with org.jboss.managed.api.annotation.ManagementObject.
- *
- * @see {@linkplain org.jboss.managed.api.annotation.ManagementObject}
- *
- * @author <a href="dimitris at jboss.org">Dimitris Andreadis</a>
- * @version $Revision: 82920 $
- */
- at Target({ElementType.TYPE})
- at Retention(RetentionPolicy.RUNTIME)
-public @interface ManagementObjectClass
-{
- /** The class annotated with ManagementObject */
- Class code();
-}
\ No newline at end of file
Deleted: trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/SecurityActions.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/SecurityActions.java 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/SecurityActions.java 2010-12-22 17:31:56 UTC (rev 110165)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt 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.deployers.managed;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Package privileged actions
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision: 82920 $
- */
-class SecurityActions
-{
- interface TCLAction
- {
- class UTIL
- {
- static TCLAction getTCLAction()
- {
- return System.getSecurityManager() == null ? NON_PRIVILEGED : PRIVILEGED;
- }
-
- static ClassLoader getContextClassLoader()
- {
- return getTCLAction().getContextClassLoader();
- }
-
- static ClassLoader getContextClassLoader(Thread thread)
- {
- return getTCLAction().getContextClassLoader(thread);
- }
-
- static void setContextClassLoader(ClassLoader cl)
- {
- getTCLAction().setContextClassLoader(cl);
- }
-
- static void setContextClassLoader(Thread thread, ClassLoader cl)
- {
- getTCLAction().setContextClassLoader(thread, cl);
- }
- }
-
- TCLAction NON_PRIVILEGED = new TCLAction()
- {
- public ClassLoader getContextClassLoader()
- {
- return Thread.currentThread().getContextClassLoader();
- }
-
- public ClassLoader getContextClassLoader(Thread thread)
- {
- return thread.getContextClassLoader();
- }
-
- public void setContextClassLoader(ClassLoader cl)
- {
- Thread.currentThread().setContextClassLoader(cl);
- }
-
- public void setContextClassLoader(Thread thread, ClassLoader cl)
- {
- thread.setContextClassLoader(cl);
- }
- };
-
- TCLAction PRIVILEGED = new TCLAction()
- {
- private final PrivilegedAction<ClassLoader> getTCLPrivilegedAction = new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- };
-
- public ClassLoader getContextClassLoader()
- {
- return AccessController.doPrivileged(getTCLPrivilegedAction);
- }
-
- public ClassLoader getContextClassLoader(final Thread thread)
- {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- return thread.getContextClassLoader();
- }
- });
- }
-
- public void setContextClassLoader(final ClassLoader cl)
- {
- AccessController.doPrivileged(
- new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- }
- );
- }
-
- public void setContextClassLoader(final Thread thread, final ClassLoader cl)
- {
- AccessController.doPrivileged(
- new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- thread.setContextClassLoader(cl);
- return null;
- }
- }
- );
- }
- };
-
- ClassLoader getContextClassLoader();
-
- ClassLoader getContextClassLoader(Thread thread);
-
- void setContextClassLoader(ClassLoader cl);
-
- void setContextClassLoader(Thread thread, ClassLoader cl);
- }
-
- static ClassLoader getContextClassLoader()
- {
- return TCLAction.UTIL.getContextClassLoader();
- }
- static void setContextClassLoader(ClassLoader loader)
- {
- TCLAction.UTIL.setContextClassLoader(loader);
- }
-}
Deleted: trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ServiceMetaDataICF.java
===================================================================
--- trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ServiceMetaDataICF.java 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/system-jmx/src/main/java/org/jboss/system/deployers/managed/ServiceMetaDataICF.java 2010-12-22 17:31:56 UTC (rev 110165)
@@ -1,501 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt 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.deployers.managed;
-
-import java.beans.PropertyEditor;
-import java.io.Serializable;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.beans.info.spi.PropertyInfo;
-import org.jboss.logging.Logger;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.spi.factory.InstanceClassFactory;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.metatype.spi.values.MetaMapper;
-import org.jboss.mx.util.JMXExceptionDecoder;
-import org.jboss.system.ServiceController;
-import org.jboss.system.metadata.ServiceAnnotationMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceDependencyValueMetaData;
-import org.jboss.system.metadata.ServiceElementValueMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.system.metadata.ServiceTextValueMetaData;
-import org.jboss.system.metadata.ServiceValueContext;
-import org.jboss.system.metadata.ServiceValueMetaData;
-import org.jboss.util.propertyeditor.PropertyEditors;
-import org.w3c.dom.Element;
-
-/**
- * The InstanceClassFactory implementation for ServiceMetaData.
- *
- * @author Scott.Stark at jboss.org
- * @author Dimitris.Andreadis at jboss.org
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision: 89429 $
- */
-public class ServiceMetaDataICF implements InstanceClassFactory<ServiceMetaData>
-{
- private static final Logger log = Logger.getLogger(ServiceMetaDataICF.class);
-
- private static final String MOCLASS_ANNOTATION = '@' + ManagementObjectClass.class.getName();
- //private static final ThreadLocal<> attributeMap;
-
- private MBeanServer mbeanServer;
- private ServiceController controller;
-
- /** The meta value factory */
- private MetaValueFactory metaValueFactory = MetaValueFactory.getInstance();
-
- public MBeanServer getMbeanServer()
- {
- return mbeanServer;
- }
-
- public void setMbeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- public ServiceController getController()
- {
- return controller;
- }
- public void setController(ServiceController controller)
- {
- this.controller = controller;
- }
-
- public Class<ServiceMetaData> getType()
- {
- return ServiceMetaData.class;
- }
-
- public Class<? extends Serializable> getManagedObjectClass(ServiceMetaData md)
- throws ClassNotFoundException
- {
- ClassLoader prevLoader = SecurityActions.getContextClassLoader();
- try
- {
- ClassLoader loader = getServiceMetaDataCL(md);
- Class moClass = loader.loadClass(md.getCode());
- // Set the mbean class loader as the TCL
- SecurityActions.setContextClassLoader(loader);
-
- // Looks for a ManagementObjectClass annotation that defines
- // an alternate class to scan for management annotations
- List<ServiceAnnotationMetaData> samlist = md.getAnnotations();
- for (ServiceAnnotationMetaData sam : samlist)
- {
- // Annotations are not yet introduced to the actual mbean
- // so just look for the annotation string
- String anString = sam.getAnnotation();
- if (anString.startsWith(MOCLASS_ANNOTATION))
- {
- Class<?> originalClass = moClass;
- ManagementObjectClass moc = (ManagementObjectClass)sam.getAnnotationInstance(loader);
- moClass = moc.code();
- log.debug("Using alternate class '" + moClass + "' for class " + originalClass);
- break;
- }
- }
- return moClass;
- }
- catch(InstanceNotFoundException e)
- {
- throw new ClassNotFoundException("Failed to obtain mbean class loader", e);
- }
- finally
- {
- SecurityActions.setContextClassLoader(prevLoader);
- }
- }
-
- public MetaValue getValue(BeanInfo beanInfo, ManagedProperty property,
- MetaData metaData,
- ServiceMetaData md)
- {
- // First look to the mapped name
- String name = property.getMappedName();
- if (name == null)
- name = property.getName();
-
- ClassLoader prevLoader = SecurityActions.getContextClassLoader();
- Object value = null;
- MetaType metaType = property.getMetaType();
- MetaValue mvalue = null;
- ObjectName mbean = md.getObjectName();
- String attrName = null;
-
- try
- {
- ClassLoader loader = getServiceMetaDataCL(md);
- // Set the mbean class loader as the TCL
- SecurityActions.setContextClassLoader(loader);
-
- // Get the attribute value from the metadata
- for (ServiceAttributeMetaData amd : md.getAttributes())
- {
- // The compare is case-insensitve due to the attribute/javabean case mismatch
- if (amd.getName().equalsIgnoreCase(name))
- {
- value = amd.getValue();
- attrName = amd.getName();
- break;
- }
- }
- // If the value is null, look to mbean for the value
- if (value == null && getMbeanServer() != null)
- {
- try
- {
- value = getMbeanServer().getAttribute(mbean, name);
- }
- catch (AttributeNotFoundException e)
- {
- // Try the alternate name
- String attribute = name;
- if(Character.isUpperCase(name.charAt(0)))
- attribute = Character.toLowerCase(name.charAt(0)) + name.substring(1);
- else
- attribute = Character.toUpperCase(name.charAt(0)) + name.substring(1);
- try
- {
- value = getMbeanServer().getAttribute(mbean, attribute);
- }
- catch(Exception e2)
- {
- log.debug("Failed to get value from mbean for: "+attribute, e2);
- }
- }
- catch(Exception e)
- {
- log.debug("Failed to get value from mbean for: "+name, e);
- }
- }
-
- // Unwrap the ServiceValueMetaData types
- try
- {
- if (value instanceof ServiceTextValueMetaData)
- {
- ServiceTextValueMetaData text = (ServiceTextValueMetaData) value;
- try
- {
- // TODO: cache this somehow
- HashMap<String, MBeanAttributeInfo> attrs = getAttributeMap(mbeanServer, mbean);
- MBeanAttributeInfo mbi = attrs.get(attrName);
- ServiceValueContext svc = new ServiceValueContext(mbeanServer, controller, mbi, loader);
- value = text.getValue(svc);
- }
- catch(Exception e)
- {
- // TODO: better way to determine if the bean was installed, as this does not make much sense
- PropertyEditor editor = PropertyEditors.getEditor(metaType.getTypeName());
- editor.setAsText(text.getText());
- value = editor.getValue();
- }
- }
- else if (value instanceof ServiceDependencyValueMetaData)
- {
- ServiceDependencyValueMetaData depends = (ServiceDependencyValueMetaData) value;
- value = depends.getObjectName();
- }
- else if (value instanceof ServiceElementValueMetaData)
- {
- value = ((ServiceElementValueMetaData)value).getElement();
- }
- // TODO: unwrap other ServiceValueMetaData types
- }
- catch(Exception e)
- {
- log.debug("Failed to get value from mbean for: "+name, e);
- }
-
- PropertyInfo propertyInfo = beanInfo.getProperty(name);
- MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
- try
- {
- if(metaMapper != null)
- {
- mvalue = metaMapper.createMetaValue(property.getMetaType(), value);
- }
- else
- {
- mvalue = metaValueFactory.create(value, propertyInfo.getType());
- }
- }
- catch(Exception e)
- {
- log.debug("Failed to get property value for bean: "+beanInfo.getName()
- +", property: "+propertyInfo.getName(), e);
- mvalue = metaValueFactory.create(null, propertyInfo.getType());
- return mvalue;
- }
- }
- catch(InstanceNotFoundException e)
- {
- throw new IllegalStateException("Failed to obtain mbean class loader", e);
- }
- finally
- {
- SecurityActions.setContextClassLoader(prevLoader);
- }
- return mvalue;
- }
-
- public void setValue(BeanInfo beanInfo, ManagedProperty property, ServiceMetaData md, MetaValue value)
- {
- ClassLoader prevLoader = SecurityActions.getContextClassLoader();
- try
- {
- ClassLoader loader = getServiceMetaDataCL(md);
- // Set the mbean class loader as the TCL
- SecurityActions.setContextClassLoader(loader);
-
- // First look to the mapped name
- String name = property.getMappedName();
- if (name == null)
- name = property.getName();
-
- // Get the attribute value
- ServiceValueMetaData attributeValue = null;
- for (ServiceAttributeMetaData amd : md.getAttributes())
- {
- // The compare is case-insensitive due to the attribute/javabean case mismatch
- if (amd.getName().equalsIgnoreCase(name))
- {
- attributeValue = amd.getValue();
- break;
- }
- }
- // There may not be an attribute value, see if there is a matching property
-
- // Unwrap the value before, so that we can recreate empty values
- Object plainValue = null;
- // Look for a MetaMapper
- MetaType propertyType = property.getMetaType();
- MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
- Type mappedType = null;
- if(metaMapper != null)
- {
- mappedType = metaMapper.mapToType();
- plainValue = metaMapper.unwrapMetaValue(value);
- }
- else
- {
- PropertyInfo propertyInfo = beanInfo.getProperty(name);
- plainValue = metaValueFactory.unwrap(value, propertyInfo.getType());
- }
-
- if (attributeValue == null)
- {
- String aname = mapAttributeName(md, name);
- if(aname != null)
- {
- ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
- attr.setName(aname);
- // Check if this is mapped to a Element
- if(mappedType != null && mappedType.equals(Element.class))
- {
- attributeValue = new ServiceElementValueMetaData();
- }
- else if(plainValue != null)
- {
- // Create a text value
- String textValue = String.valueOf(plainValue);
- // Don't create a empty value
- if(textValue.trim().length() > 0 )
- attributeValue = new ServiceTextValueMetaData(textValue);
- }
- // Don't create a null serviceAttribute
- if(attributeValue == null)
- return;
-
- // Add
- attr.setValue(attributeValue);
- md.addAttribute(attr);
- }
- }
- if (attributeValue != null)
- {
- // Unwrap the ServiceValueMetaData types
- if (attributeValue instanceof ServiceTextValueMetaData)
- {
- String textValue = plainValue != null ? String.valueOf(plainValue) : null;
- ServiceTextValueMetaData text = (ServiceTextValueMetaData) attributeValue;
- text.setText(textValue);
- }
- else if (attributeValue instanceof ServiceElementValueMetaData)
- {
- if(plainValue != null)
- ((ServiceElementValueMetaData) attributeValue).setElement((Element) plainValue);
- }
- else if (attributeValue instanceof ServiceDependencyValueMetaData)
- {
- ServiceDependencyValueMetaData depends = (ServiceDependencyValueMetaData) attributeValue;
- if (plainValue instanceof ObjectName)
- depends.setObjectName((ObjectName) plainValue);
- else
- depends.setDependency(String.valueOf(plainValue));
- }
- // TODO: unwrap other ServiceValueMetaData types
- else
- {
- throw new IllegalArgumentException("Unhandled attribute value type: " + name + "/" + md+", class="+attributeValue.getClass());
- }
- }
- else
- throw new IllegalArgumentException("No matching attribute found: " + name + "/" + md);
- }
- catch(InstanceNotFoundException e)
- {
- throw new IllegalStateException("Failed to obtain mbean class loader", e);
- }
- finally
- {
- SecurityActions.setContextClassLoader(prevLoader);
- }
- }
-
- /**
- * The service context uses the canonical object name string
- * @return the service metadata canonical object name string
- */
- public Object getComponentName(BeanInfo beanInfo, ManagedProperty property, ServiceMetaData md, MetaValue value)
- {
- ObjectName objectName = md.getObjectName();
- String canonicalName = objectName.getCanonicalName();
- return canonicalName;
- }
-
- /**
- * Obtains the ServiceMetaData class loader from the
- * getClassLoaderName value if there is an mbeanServer.
- *
- * @param md - the mbean metadata
- * @return the ServiceMetaData.ClassLoaderName class loader if
- * the mbeanServer has been set, the current TCL otherwise.
- * @throws InstanceNotFoundException if no mbean class loader can be
- * found by the ServiceMetaData.ClassLoaderName
- */
- private ClassLoader getServiceMetaDataCL(ServiceMetaData md)
- throws InstanceNotFoundException
- {
- ClassLoader loader = null;
- if(mbeanServer != null)
- loader = mbeanServer.getClassLoader(md.getClassLoaderName());
- // Fallback to TCL if there is no mbeanServer
- if(loader == null)
- loader = Thread.currentThread().getContextClassLoader();
- return loader;
- }
-
- /**
- * Try to find a matching mbean attribute
- * @param name
- * @return
- */
- private String mapAttributeName(ServiceMetaData md, String name)
- {
- ObjectName mbean = md.getObjectName();
- String attrName = null;
- try
- {
- mbeanServer.getAttribute(mbean, name);
- attrName = name;
- }
- catch(Exception e)
- {
- char c = name.charAt(0);
- if(Character.isLowerCase(c))
- name = Character.toUpperCase(c) + name.substring(1);
- else
- name = Character.toLowerCase(c) + name.substring(1);
- try
- {
- mbeanServer.getAttribute(mbean, name);
- attrName = name;
- }
- catch(Exception e2)
- {
- }
- }
- // FIXME
- if(attrName == null)
- {
- char c = name.charAt(0);
- name = Character.toUpperCase(c) + name.substring(1);
- return name;
- }
- return attrName;
- }
-
- /**
- * Get an attribute map for the MBean
- *
- * @param server the server
- * @param objectName the object name
- * @return a map of attribute name to attribute info
- * @throws Exception for any error
- */
- private static HashMap<String, MBeanAttributeInfo> getAttributeMap(MBeanServer server, ObjectName objectName) throws Exception
- {
- MBeanInfo info;
- try
- {
- info = server.getMBeanInfo(objectName);
- }
- catch (InstanceNotFoundException e)
- {
- // The MBean is no longer available
- throw new RuntimeException("Trying to configure nonexistent mbean: " + objectName);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Could not get mbeanInfo", JMXExceptionDecoder.decode(e));
- }
- if (info == null)
- throw new RuntimeException("MBeanInfo is null for mbean: " + objectName);
- MBeanAttributeInfo[] attributes = info.getAttributes();
- HashMap<String, MBeanAttributeInfo> attributeMap = new HashMap<String, MBeanAttributeInfo>();
- for (int i = 0; i < attributes.length; i++)
- {
- MBeanAttributeInfo attr = attributes[i];
- attributeMap.put(attr.getName(), attr);
- }
-
- return attributeMap;
- }
-}
Modified: trunk/testsuite/pom.xml
===================================================================
--- trunk/testsuite/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/testsuite/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -170,6 +170,10 @@
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-jmx</artifactId>
+ </dependency>
</dependencies>
<profiles>
Modified: trunk/tomcat/pom.xml
===================================================================
--- trunk/tomcat/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/tomcat/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -265,7 +265,11 @@
<groupId>jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
Modified: trunk/webservices/pom.xml
===================================================================
--- trunk/webservices/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/webservices/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -391,6 +391,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
Modified: trunk/weld-int/deployer-mc-int/pom.xml
===================================================================
--- trunk/weld-int/deployer-mc-int/pom.xml 2010-12-22 15:43:47 UTC (rev 110164)
+++ trunk/weld-int/deployer-mc-int/pom.xml 2010-12-22 17:31:56 UTC (rev 110165)
@@ -214,6 +214,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
<scope>test</scope>
</dependency>
More information about the jboss-cvs-commits
mailing list