[jboss-cvs] JBossAS SVN: r103957 - in branches/KABIR_JAVASSIST_REFLECT: cluster/src/etc and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 14 06:43:42 EDT 2010


Author: kabir.khan at jboss.com
Date: 2010-04-14 06:43:39 -0400 (Wed, 14 Apr 2010)
New Revision: 103957

Added:
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml
Removed:
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml
Modified:
   branches/KABIR_JAVASSIST_REFLECT/
   branches/KABIR_JAVASSIST_REFLECT/cluster/src/etc/hapartition-jboss-beans.xml
   branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml
   branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist-src.xml
   branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist.xml
   branches/KABIR_JAVASSIST_REFLECT/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossASKernel.java
   branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployers/DeploymentFactory.java
   branches/KABIR_JAVASSIST_REFLECT/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java
   branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/jmx/invoker/sar/META-INF/jboss-service.xml
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc/conf/login-config.xml
   branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/xml/mbeanserver/mbean-service_1_0.xsd
Log:
Merged revisions 103918-103922,103927,103930-103931,103945-103948 via svnmerge from 
https://svn.jboss.org/repos/jbossas/trunk

.......
  r103918 | ALRubinger | 2010-04-13 17:32:31 +0100 (Tue, 13 Apr 2010) | 1 line
  
  [JBAS-7931] Properly package the AS distribution ZIP
.......
  r103919 | smarlow at redhat.com | 2010-04-13 17:35:06 +0100 (Tue, 13 Apr 2010) | 1 line
  
  JBAS-7874 moved SecureJMXInvokerTest to run as part of jacc-security-allstarrole and use jsr-160 security
.......
  r103920 | clebert.suconic at jboss.com | 2010-04-13 17:42:40 +0100 (Tue, 13 Apr 2010) | 1 line
  
  Cleanup class
.......
  r103921 | clebert.suconic at jboss.com | 2010-04-13 17:43:15 +0100 (Tue, 13 Apr 2010) | 1 line
  
  Fixing a few security issues on the test config
.......
  r103922 | clebert.suconic at jboss.com | 2010-04-13 17:43:51 +0100 (Tue, 13 Apr 2010) | 1 line
  
  cleanup log.info
.......
  r103927 | ispringer | 2010-04-13 18:44:51 +0100 (Tue, 13 Apr 2010) | 1 line
  
  upgrade EmbJopr from 1.4.0.Beta2 to 1.4.0.Beta3, which includes RichFaces 3.3.3.Final and hornetq plugin 1.0.0.BETA1
.......
  r103930 | smarlow at redhat.com | 2010-04-13 19:52:51 +0100 (Tue, 13 Apr 2010) | 1 line
  
  JBAS-7932 shutdown rmiregistry on stop of JMXConnector
.......
  r103931 | wolfc | 2010-04-13 20:28:02 +0100 (Tue, 13 Apr 2010) | 2 lines
  
  JBAS-7640: reverted 103638
.......
  r103945 | clebert.suconic at jboss.com | 2010-04-14 03:56:52 +0100 (Wed, 14 Apr 2010) | 1 line
  
  Increasing timeout in a MDB test
.......
  r103946 | clebert.suconic at jboss.com | 2010-04-14 04:28:55 +0100 (Wed, 14 Apr 2010) | 1 line
  
  tweaks on test's destinations
.......
  r103947 | smarlow at redhat.com | 2010-04-14 05:20:13 +0100 (Wed, 14 Apr 2010) | 1 line
  
  JBAS-7934 org.jboss.test.xml.MBeanServerUnitTestCase test failure
.......
  r103948 | bstansberry at jboss.com | 2010-04-14 05:27:13 +0100 (Wed, 14 Apr 2010) | 1 line
  
  Temporarily work around JGRP-1190 by disabling concurrent channel connects
.......



Property changes on: branches/KABIR_JAVASSIST_REFLECT
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk:1-103909
   + /trunk:1-103954

Modified: branches/KABIR_JAVASSIST_REFLECT/cluster/src/etc/hapartition-jboss-beans.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/cluster/src/etc/hapartition-jboss-beans.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/cluster/src/etc/hapartition-jboss-beans.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -39,9 +39,9 @@
       <!-- Max time (in ms) to wait for RPC calls to complete. -->
       <property name="methodCallTimeout">60000</property>
       
-      <!-- Optionally provide a thread source to allow async connect of our channel -->
+      <!-- Optionally provide a thread source to allow async connect of our channel
       <property name="threadPool"><inject bean="LongRunningTasksThreadPool"/></property>
-      
+       -->
       <property name="distributedStateImpl">
 	      <bean name="DistributedState"
 	   		 class="org.jboss.ha.framework.server.DistributedStateImpl">	      

Modified: branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/component-matrix/pom.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -103,7 +103,7 @@
     <version.org.jboss.embedded>1.0.0-alpha-2</version.org.jboss.embedded>
     <version.org.jboss.integration>6.0.0.Alpha9</version.org.jboss.integration>
     <version.org.jboss.jbossxb>2.0.2.Beta7</version.org.jboss.jbossxb>
-    <version.org.jboss.jopr>1.4.0.Beta2</version.org.jboss.jopr>
+    <version.org.jboss.jopr>1.4.0.Beta3</version.org.jboss.jopr>
     <version.org.jboss.jpa.deployers>1.0.2-alpha-1</version.org.jboss.jpa.deployers>
     <version.org.jboss.jpa.impl>2.0.0</version.org.jboss.jpa.impl>
     <version.org.jboss.jpa.spi>1.0.0</version.org.jboss.jpa.spi>

Modified: branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist-src.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist-src.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist-src.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -7,7 +7,7 @@
   <fileSets>
     <fileSet>
       <directory>..</directory>
-      <outputDirectory>${project.build.dir}/jboss-${project.version}-src</outputDirectory>
+      <outputDirectory>jboss-${project.version}-src</outputDirectory>
       <excludes>
         <exclude>**/target/**</exclude>
         <exclude>**/output/**</exclude>
@@ -16,7 +16,7 @@
     </fileSet>
     <fileSet>
       <directory>..</directory>
-      <outputDirectory>${project.build.dir}/jboss-${project.version}-src</outputDirectory>
+      <outputDirectory>jboss-${project.version}-src</outputDirectory>
       <includes>
         <include>tools/**/bin/*</include>
       </includes>

Modified: branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/dist/src/assembly/jboss-dist.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -7,7 +7,7 @@
   <fileSets>
     <fileSet>
       <directory>${basedir}/../build/target/jboss-${project.version}</directory>
-      <outputDirectory>${project.build.dir}/jboss-${project.version}</outputDirectory>
+      <outputDirectory>jboss-${project.version}</outputDirectory>
       <excludes>
         <exclude>**/data/**</exclude>
         <exclude>**/log/**</exclude>
@@ -18,7 +18,7 @@
     </fileSet>
     <fileSet>
       <directory>${basedir}/../build/target/jboss-${project.version}</directory>
-      <outputDirectory>${project.build.dir}/jboss-${project.version}</outputDirectory>
+      <outputDirectory>jboss-${project.version}</outputDirectory>
       <includes>
         <include>bin/*</include>
       </includes>
@@ -26,7 +26,7 @@
     </fileSet>
     <fileSet>
       <directory>docs</directory>
-      <outputDirectory>${project.build.dir}/jboss-${project.version}</outputDirectory>
+      <outputDirectory>jboss-${project.version}</outputDirectory>
     </fileSet>
   </fileSets>
 </assembly>

Modified: branches/KABIR_JAVASSIST_REFLECT/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossASKernel.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossASKernel.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossASKernel.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -104,7 +104,7 @@
             String kdname = unit.getShortName();
             deployment.setName(kdname);
             unit.addAttachment(KernelDeployment.class.getName(), deployment);
-            log.debugf("Created KernelDeployment for: %s", unit.getShortName());
+            log.info("Created KernelDeployment for: "+unit.getShortName());
          }
       }
 
@@ -115,29 +115,27 @@
       bean.setDepends(policy.getDependencies());
       bean.setDemands(policy.getDemands());
       bean.setSupplies(policy.getSupplies());
-      if (log.isTraceEnabled()) {
-         log.tracef("installing bean: %s", name);
-         log.trace("  with dependencies:");
-         for (Object obj : policy.getDependencies())
+      log.info("installing bean: " + name);
+      log.info("  with dependencies:");
+      for (Object obj : policy.getDependencies())
+      {
+         Object msgObject = obj;
+         if (obj instanceof AbstractDemandMetaData)
          {
-            Object msgObject = obj;
-            if (obj instanceof AbstractDemandMetaData)
-            {
-               msgObject = ((AbstractDemandMetaData)obj).getDemand();
-            }
-            log.tracef("\t%s", msgObject);
+            msgObject = ((AbstractDemandMetaData)obj).getDemand();
          }
-         log.trace("  and demands:");
-         for(DemandMetaData dmd : policy.getDemands())
-         {
-            log.tracef("\t%s; Required: %s", dmd.getDemand(), dmd.getWhenRequired().getStateString());
-         }
-         log.trace("  and supplies:");
-         for(SupplyMetaData smd : policy.getSupplies())
-         {
-            log.tracef("\t%s", smd.getSupply());
-         }
+         log.info("\t" + msgObject);
       }
+      log.info("  and demands:");
+      for(DemandMetaData dmd : policy.getDemands())
+      {
+         log.info("\t" + dmd.getDemand() + "; Required: " + dmd.getWhenRequired().getStateString());
+      }
+      log.info("  and supplies:");
+      for(SupplyMetaData smd : policy.getSupplies())
+      {
+         log.info("\t" + smd.getSupply());
+      }
 
       if(service instanceof EJBContainer)
       {
@@ -166,7 +164,7 @@
       {
          // Just add the mc bean metadata to the unit
          deployment.getBeanFactories().add(bean);
-         log.debugf("Added bean(%s) to KernelDeployment of: %s", name, unit.getShortName());
+         log.info("Added bean("+name+") to KernelDeployment of: "+unit.getShortName());
       }
       else
       {
@@ -179,7 +177,7 @@
             }
             catch (IllegalStateException e){}
                   
-            log.debugf("Installing bean(%s) into kernel", name);
+            log.info("Installing bean("+name+") into kernel");
             kernel.getController().install(bean);
          }
          catch (Throwable throwable)

Modified: branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployers/DeploymentFactory.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployers/DeploymentFactory.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployers/DeploymentFactory.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -66,28 +66,18 @@
          for (JMSQueueConfiguration config : mainConfig.getQueueConfigurations())
          {
             String name = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(config.getName()).toString();
-            //String name = "org.hornetq:module=JMS,name=\"" + config.getName() + "\",type=Queue";
-            
-            log.info("Adding queue deployment " + name);
-            
             unit.addAttachment(name, createJMSBasicBean(unit, HornetQQueueDeployment.class.getName(), name, config));
          }
    
          for (TopicConfiguration config : mainConfig.getTopicConfigurations())
          {
             String name = ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(config.getName()).toString(); 
-            //String name = "org.hornetq:module=JMS,name=\"" + config.getName() + "\",type=Topic";
-            
-            log.info("Adding topic deployment " + name);
-            
-   
             unit.addAttachment(name, createJMSBasicBean(unit, HornetQTopicDeployment.class.getName(), name, config));
          }
    
          for (ConnectionFactoryConfiguration config : mainConfig.getConnectionFactoryConfigurations())
          {
             String name = "org.hornetq:module=JMS,name=\"" + config.getName() + "\",type=ConnectionFactory";
-   
             unit.addAttachment(name, createJMSBasicBean(unit, HornetQConnectionFactoryDeployment.class.getName(), name, config));
          }
       }

Modified: branches/KABIR_JAVASSIST_REFLECT/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -43,6 +43,7 @@
 import java.rmi.NotBoundException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
 import java.util.HashMap;
 
 
@@ -169,6 +170,8 @@
          registry.unbind(RMI_BIND_NAME);
          Util.unbind(context, JNDI_BIND_NAME);
          Util.unbind(context, LEGACY_BIND_NAME);
+         UnicastRemoteObject.unexportObject(registry, true);
+         log.info(this.getClass().getSimpleName() + " stopped");
       } catch (NotBoundException e) {
          log.error("connector was not bound ("+RMI_BIND_NAME+") to registry", e);
       } catch (IOException e) {

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/build.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -967,6 +967,7 @@
    </patternset>
    <patternset id="jacc.allstarrole.includes">
       <include name="org/jboss/test/jacc/test/allstarrole/*TestCase.class"/>
+      <include name="org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.class"/>
    </patternset>
    <patternset id="ldap.includes">
       <include name="**/test/security/test/opends/*TestCase.class"/>
@@ -1029,7 +1030,7 @@
       <include name="**/test/security/test/mapping/**/*TestCase.class"/>
       <include name="**/test/web/security/authorization/XACML*UnitTestCase.class"/>
       <include name="**/test/jca/test/SecurityContextUnitTestCase.class"/>
-      <include name="**/test/jmx/test/Secure*TestCase.class"/>
+      <include name="**/test/jmx/test/SecureRMIAdaptorUnitTestCase.class"/>
       <include name="**/test/jmx/test/RMIAdaptorAuthorizationUnitTestCase.class"/>
       <include name="**/test/perf/test/SecurePerfStressTestCase.class"/>
       <include name="**/test/timer/test/SecureTimerUnitTestCase.class"/>

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -27,6 +27,7 @@
 import junit.framework.TestSuite;
 import junit.extensions.TestSetup;
 import org.jboss.test.JBossTestSetup;
+import org.jboss.test.util.jms.JMSDestinationsUtil;
 import org.jboss.security.auth.login.XMLLoginConfigImpl;
 
 /** Test of EJB spec conformace using the security-spec.jar
@@ -94,6 +95,7 @@
          protected void setUp() throws Exception
          {
             super.setUp();
+            JMSDestinationsUtil.destroyEveryDestination();
             Configuration.setConfiguration(XMLLoginConfigImpl.getInstance());
             redeploy("security-spec.jar");
             flushAuthCache();
@@ -101,6 +103,7 @@
          protected void tearDown() throws Exception
          {
             undeploy("security-spec.jar");
+            JMSDestinationsUtil.destroyEveryDestination();
             super.tearDown();
          
          }

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -21,18 +21,30 @@
  */
 package org.jboss.test.jmx.test;
 
+import java.util.HashMap;
+
+import javax.management.Attribute;
 import javax.management.MalformedObjectNameException;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanInfo;
 import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.jmx.invoker.CustomClass;
+
 /** Tests for the jmx invoker adaptor with a secured xmbean.
  *
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class SecureJMXInvokerUnitTestCase extends JMXInvokerUnitTestCase
+public class SecureJMXInvokerUnitTestCase extends JBossTestCase
 {
    public SecureJMXInvokerUnitTestCase(String name)
    {
@@ -55,20 +67,120 @@
       return getDeploySetup(suite, "invoker-adaptor-test.ear");
    }
 
+   /**
+    * The jmx object name name of the mbean under test
+    * @return The name of the mbean under test
+    * @throws MalformedObjectNameException
+    */
    ObjectName getObjectName() throws MalformedObjectNameException
    {
       return new ObjectName("jboss.test:service=InvokerTest,secured=true");
    }
-   
+
+   static final String TARGET_SERVER = System.getProperty("jbosstest.server.host", "localhost");
+   private MBeanServerConnection getJMXServer() throws Exception
+   {
+      HashMap env = new HashMap();
+      String username = "admin";
+      String password = "admin";
+
+      if (username != null && password != null)
+      {
+         String[] creds = new String[2];
+         creds[0] = username;
+         creds[1] = password;
+         env.put(JMXConnector.CREDENTIALS, creds);
+      }
+
+      JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+TARGET_SERVER+":1090/jmxrmi");
+      JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
+      MBeanServerConnection adaptor = jmxc.getMBeanServerConnection();
+      return adaptor;
+   }
+
+   public void testGetSomething()
+      throws Exception
+   {
+      log.info("+++ testGetSomething");
+      assertEquals("something", getJMXServer().getAttribute(getObjectName(), "Something"));
+   }
+
+   public void testGetCustom()
+      throws Exception
+   {
+      log.info("+++ testGetCustom");
+      CustomClass custom = (CustomClass) getJMXServer().getAttribute(getObjectName(), "Custom");
+      assertEquals("InitialValue", custom.getValue());
+   }
+
+   public void testGetCustomXMBean()
+      throws Exception
+   {
+      log.info("+++ testGetCustomXMBean");
+      ObjectName xmbean = new ObjectName("jboss.test:service=InvokerTest,type=XMBean");
+      CustomClass custom = (CustomClass) getJMXServer().getAttribute(xmbean, "Custom");
+      assertEquals("InitialValue", custom.getValue());
+   }
+   public void testGetXMBeanInfo()
+      throws Exception
+   {
+      log.info("+++ testGetXMBeanInfo");
+      ObjectName xmbean = new ObjectName("jboss.test:service=InvokerTest,type=XMBean");
+      MBeanInfo info = getJMXServer().getMBeanInfo(xmbean);
+      log.info("MBeanInfo: "+info);
+   }
+   public void testXMBeanDoSomething()
+      throws Exception
+   {
+      log.info("+++ testXMBeanDoSomething");
+      ObjectName xmbean = new ObjectName("jboss.test:service=InvokerTest,type=XMBean");
+      Object[] args = {};
+      String[] sig = {};
+      CustomClass custom = (CustomClass) getJMXServer().invoke(xmbean, "doSomething", args, sig);
+      log.info("doSomething: "+custom);
+   }
+
+   public void testSetCustom()
+      throws Exception
+   {
+      log.info("+++ testSetCustom");
+      MBeanServerConnection server = getJMXServer();
+      server.setAttribute(getObjectName(), new Attribute("Custom", new CustomClass("changed")));
+      CustomClass custom = (CustomClass) server.getAttribute(getObjectName(), "Custom");
+      assertEquals("changed", custom.getValue());
+   }
+
+   /**
+    * Create an mbean whose class does not exist to test that the exception
+    * seen from the adaptor is a ClassNotFoundException wrapped in a
+    * ReflectionException
+    * @throws Exception
+    */
+   public void testClassNotFoundException() throws Exception
+   {
+      log.info("+++ testClassNotFoundException");
+      MBeanServerConnection server = getJMXServer();
+      ObjectName name = new ObjectName("jboss.test:test=testClassNotFoundException");
+      try
+      {
+         server.createMBean("org.jboss.text.jmx.DoesNotExist", name);
+         fail("Was able to create org.jboss.text.jmx.DoesNotExist mbean");
+      }
+      catch (ReflectionException e)
+      {
+         Exception ex = e.getTargetException();
+         assertTrue("ReflectionException.target is ClassNotFoundException",
+            ex instanceof ClassNotFoundException);
+      }
+   }
+
    protected void setUp() throws Exception
    {
       super.setUp();
-      delegate.login();
    }
    
    protected void tearDown() throws Exception
    {
       super.tearDown();
-      delegate.logout();
    }
 }

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -152,29 +152,6 @@
       }
    }
    
-   /**
-    * JBossMessage will resend the send message, and because of that the message needs to be cloned before being stored
-    * @param message
-    * @return
-    */
-   private Message cloneMessage(Message message) 
-   {
-		try
-		 {
-			 ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
-			 ObjectOutputStream cloneOut = new ObjectOutputStream(byteOut);
-			 cloneOut.writeObject(message);
-			 cloneOut.close();
-			 ObjectInputStream inputArray = new ObjectInputStream (new ByteArrayInputStream(byteOut.toByteArray()));
-			 message = (Message)inputArray.readObject();
-		 }
-		 catch (Exception e)
-		 {
-			 log.error(e.toString(), e);
-		 }
-		return message;
-	}
-   
    public void startService() throws Exception
    {
       if(this.ejbParsingDeployer == null)

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2010-04-14 10:43:39 UTC (rev 103957)
@@ -62,7 +62,7 @@
       return new Operation[]
       {
          new SendMessageOperation(this, "1"),
-         new CheckMessageSizeOperation(this, 1, 0),
+         new CheckMessageSizeOperation(this, 1, 5000),
          new CheckJMSDestinationOperation(this, 0),
          new CheckMessageIDOperation(this, 0, "1"),
       };

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/jmx/invoker/sar/META-INF/jboss-service.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/jmx/invoker/sar/META-INF/jboss-service.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/jmx/invoker/sar/META-INF/jboss-service.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -62,7 +62,6 @@
       <xmbean>
          <descriptors>
             <interceptors>
-               <interceptor code="org.jboss.test.jmx.interceptors.PrincipalInterceptor" />
                <interceptor code="org.jboss.mx.interceptor.PersistenceInterceptor2" />
                <interceptor code="org.jboss.mx.interceptor.ModelMBeanInterceptor" />
                <interceptor code="org.jboss.mx.interceptor.ObjectReferenceInterceptor" />

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc/conf/login-config.xml
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc/conf/login-config.xml	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc/conf/login-config.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -22,19 +22,6 @@
        </authentication>
     </application-policy>
 
-   <!-- Security domain for JBossMQ -->
-   <application-policy name = "jbossmq">
-      <authentication>
-         <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
-            flag = "required">
-            <module-option name = "unauthenticatedIdentity">guest</module-option>
-            <module-option name = "dsJndiName">java:/DefaultDS</module-option>
-            <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
-            <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
-         </login-module>
-      </authentication>
-   </application-policy>
-
    <application-policy name = "JmsXARealm">
       <authentication>
          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
@@ -47,15 +34,21 @@
       </authentication>
    </application-policy>
 
-   <application-policy name="messaging">
-      <authentication>
-         <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
-            <module-option name="unauthenticatedIdentity">guest</module-option>
-            <module-option name="usersProperties">props/messaging-users.properties</module-option>
-            <module-option name="rolesProperties">props/messaging-roles.properties</module-option>
-         </login-module>
-      </authentication>
-   </application-policy>
+  <!-- A template configuration for hornetq. This
+    defaults to the UsersRolesLoginModule the same as other and should be
+    changed to a stronger authentication mechanism as required.
+  -->
+  <application-policy name="hornetq">
+    <authentication>
+      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+        flag="required">
+	    <module-option name = "unauthenticatedIdentity">guest</module-option>
+        <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+        <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+      </login-module>
+    </authentication>
+  </application-policy>
+  
 
     <application-policy name = "other">
        <authentication>

Copied: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy (from rev 103948, trunk/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy)

Deleted: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml	2010-04-14 04:27:13 UTC (rev 103948)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-  <!-- 
-      Configure JSR-160 style JMX connector for use with jconsole and other remote access programs such as twiddle.
-      
-      To invoke jconsole with this JMX connector, issue:
-         jconsole service:jmx:rmi:///jndi/rmi://hostname:rmiRegistryPort/jmxrmi
-       or
-         jconsole service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi
-
- -->
-
-  <bean name="InitialContext" class="javax.naming.InitialContext"/>
- 
-  <bean name="JMXConnector" class="org.jboss.system.server.jmx.JMXConnector">
-
-      <!-- configuration properties -->
-
-      <property name="securityDomain">jmx-console</property>
-
-      <!--  specify the NIC that will run the JMX connector --> 
-      <property name="hostname">
-         <value-factory bean="ServiceBindingManager" method="getStringBinding" 
-            parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
-      </property>
-
-      <!-- specify the port that the JMX connector is looked up through (used in JMXServiceURL) -->
-      <!-- commenting this out, will use 1090 as default -->
-          <property name="rmiRegistryPort" class="int">
-          <!-- Get the port from the ServiceBindingManager -->
-          <value-factory bean="ServiceBindingManager" method="getIntBinding" 
-          parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
-       </property>
-
-
-      <!-- specify the port that the RMI server listens to  -->
-      <!-- commenting this out, will use 1091 as default -->
-      <property name="rmiServerPort" class="int">
-      <!-- Get the port from the ServiceBindingManager -->
-      <value-factory bean="ServiceBindingManager" method="getIntBinding"
-      parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmiServer"/>
-      </property>
-
-
-      <!-- specify the mbean server that is used internally, this shouldn't be changed here. -->
-      <property name="mbeanServer" class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer" /></property>
-      <property name="context" class="javax.naming.InitialContext"><inject bean="InitialContext"/></property>
-  </bean>
-</deployment>

Copied: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml (from rev 103948, trunk/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml)
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml	                        (rev 0)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/test-configs/jacc-security-allstarrole/deploy/jmx-jboss-beans.xml	2010-04-14 10:43:39 UTC (rev 103957)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- 
+      Configure JSR-160 style JMX connector for use with jconsole and other remote access programs such as twiddle.
+      
+      To invoke jconsole with this JMX connector, issue:
+         jconsole service:jmx:rmi:///jndi/rmi://hostname:rmiRegistryPort/jmxrmi
+       or
+         jconsole service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi
+
+ -->
+
+  <bean name="InitialContext" class="javax.naming.InitialContext"/>
+ 
+  <bean name="JMXConnector" class="org.jboss.system.server.jmx.JMXConnector">
+
+      <!-- configuration properties -->
+
+      <property name="securityDomain">jmx-console</property>
+
+      <!--  specify the NIC that will run the JMX connector --> 
+      <property name="hostname">
+         <value-factory bean="ServiceBindingManager" method="getStringBinding" 
+            parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
+      </property>
+
+      <!-- specify the port that the JMX connector is looked up through (used in JMXServiceURL) -->
+      <!-- commenting this out, will use 1090 as default -->
+          <property name="rmiRegistryPort" class="int">
+          <!-- Get the port from the ServiceBindingManager -->
+          <value-factory bean="ServiceBindingManager" method="getIntBinding" 
+          parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
+       </property>
+
+
+      <!-- specify the port that the RMI server listens to  -->
+      <!-- commenting this out, will use 1091 as default -->
+      <property name="rmiServerPort" class="int">
+      <!-- Get the port from the ServiceBindingManager -->
+      <value-factory bean="ServiceBindingManager" method="getIntBinding"
+      parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmiServer"/>
+      </property>
+
+
+      <!-- specify the mbean server that is used internally, this shouldn't be changed here. -->
+      <property name="mbeanServer" class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer" /></property>
+      <property name="context" class="javax.naming.InitialContext"><inject bean="InitialContext"/></property>
+  </bean>
+</deployment>

Modified: branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/xml/mbeanserver/mbean-service_1_0.xsd
===================================================================
--- branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/xml/mbeanserver/mbean-service_1_0.xsd	2010-04-14 10:38:06 UTC (rev 103956)
+++ branches/KABIR_JAVASSIST_REFLECT/testsuite/src/resources/xml/mbeanserver/mbean-service_1_0.xsd	2010-04-14 10:43:39 UTC (rev 103957)
@@ -109,7 +109,7 @@
          </xsd:annotation>
 
          <xsd:simpleContent>
-            <xsd:extension base="xsd:anyURI">
+            <xsd:extension base="xsd:string">
                <xsd:attribute name="optional-attribute-name" use="required" type="xsd:NCName"/>
             </xsd:extension>
          </xsd:simpleContent>




More information about the jboss-cvs-commits mailing list