[jboss-cvs] JBossAS SVN: r60181 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 1 23:47:49 EST 2007
Author: scott.stark at jboss.org
Date: 2007-02-01 23:47:48 -0500 (Thu, 01 Feb 2007)
New Revision: 60181
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/ExternalContextUnitTestCase.java
Log:
JBAS-4048, look to all superclass interfaces when creating the proxy
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/ExternalContextUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/ExternalContextUnitTestCase.java 2007-02-02 04:41:50 UTC (rev 60180)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/ExternalContextUnitTestCase.java 2007-02-02 04:47:48 UTC (rev 60181)
@@ -102,37 +102,24 @@
*/
protected void setUp() throws Exception
{
- try
+ super.setUp();
+ super.redeploy("extcontext.sar");
+ contextNames = null;
+ ObjectName pattern = new ObjectName("*:service=ExternalContext,*");
+ Set names = getServer().queryMBeans(pattern, null);
+ Iterator iter = names.iterator();
+ ArrayList tmp = new ArrayList();
+ while (iter.hasNext())
{
- super.setUp();
- contextNames = null;
- ObjectName pattern = new ObjectName("*:service=ExternalContext,*");
- Set names = getServer().queryMBeans(pattern, null);
- Iterator iter = names.iterator();
- ArrayList tmp = new ArrayList();
- while (iter.hasNext())
- {
- ObjectInstance oi = (ObjectInstance)iter.next();
- ObjectName name = oi.getObjectName();
- getLog().debug(name);
- tmp.add(name);
- }
- if (tmp.size() > 0)
- {
- contextNames = new ObjectName[tmp.size()];
- tmp.toArray(contextNames);
- }
+ ObjectInstance oi = (ObjectInstance)iter.next();
+ ObjectName name = oi.getObjectName();
+ getLog().debug(name);
+ tmp.add(name);
}
- catch (Exception x)
+ if (tmp.size() > 0)
{
- if (x instanceof RuntimeMBeanException)
- {
- getLog().error("setUp RuntimeMBeanException:",((RuntimeMBeanException)x).getTargetException());
- }
- else
- {
- getLog().error("setUp Error:" , x);
- }
+ contextNames = new ObjectName[tmp.size()];
+ tmp.toArray(contextNames);
}
}
More information about the jboss-cvs-commits
mailing list