Author: dallen6
Date: 2009-03-24 14:15:12 -0400 (Tue, 24 Mar 2009)
New Revision: 2192
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockNamingContext.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
Log:
Minor fixes for broken tests.
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-24
15:48:21 UTC (rev 2191)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-03-24
18:15:12 UTC (rev 2192)
@@ -101,10 +101,13 @@
this.manager = new
ManagerImpl(ServiceRegistries.unmodifiableServiceRegistry(getServices()));
try
{
- getServices().get(NamingContext.class).lookup(ManagerImpl.JNDI_KEY,
Manager.class);
+ getServices().get(NamingContext.class).unbind(ManagerImpl.JNDI_KEY);
}
catch (ExecutionException e)
{
+ }
+ finally
+ {
getServices().get(NamingContext.class).bind(ManagerImpl.JNDI_KEY,
getManager());
}
CurrentManager.setRootManager(manager);
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockNamingContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockNamingContext.java 2009-03-24
15:48:21 UTC (rev 2191)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockNamingContext.java 2009-03-24
18:15:12 UTC (rev 2192)
@@ -32,6 +32,14 @@
}
}
+ public void unbind(String key)
+ {
+ if (context != null)
+ {
+ super.unbind(key);
+ }
+ }
+
public <T> T lookup(String name, Class<? extends T> expectedType)
{
if (context != null)
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2009-03-24
15:48:21 UTC (rev 2191)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java 2009-03-24
18:15:12 UTC (rev 2192)
@@ -13,7 +13,7 @@
@IntegrationTest
public class ManagerTest extends AbstractJSR299Test
{
- @Test(groups = { "broken", "manager", "ejb3",
"integration" })
+ @Test(groups = { "manager", "ejb3", "integration" })
@SpecAssertion(section = "5.7.2", id = "b")
public void testManagerLookupInJndi() throws Exception
{