[jboss-cvs] JBossAS SVN: r60844 - branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree832/unit.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 23 11:56:37 EST 2007


Author: wolfc
Date: 2007-02-23 11:56:37 -0500 (Fri, 23 Feb 2007)
New Revision: 60844

Modified:
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree832/unit/EntityTestCase.java
Log:
Checking server configuration

Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree832/unit/EntityTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree832/unit/EntityTestCase.java	2007-02-23 16:47:51 UTC (rev 60843)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree832/unit/EntityTestCase.java	2007-02-23 16:56:37 UTC (rev 60844)
@@ -21,6 +21,9 @@
  */
 package org.jboss.ejb3.test.ejbthree832.unit;
 
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
 import junit.framework.Test;
 
 import org.jboss.ejb3.test.ejbthree832.EntityTest;
@@ -40,8 +43,17 @@
       super(name);
    }
 
+   private String getConfiguration() throws Exception
+   {
+      MBeanServerConnection server = getServer();
+      ObjectName name = new ObjectName("jboss.system:type=ServerConfig");
+      return (String) server.getAttribute(name, "ServerName");
+   }
+   
    public void test1() throws Exception
    {
+      assertEquals("Wrong server configuration", "default", getConfiguration());
+      
       EntityTest test = (EntityTest) this.getInitialContext().lookup("EntityTestBean/remote");
       test.test1();
    }




More information about the jboss-cvs-commits mailing list