Author: dblevins
Date: Fri Jan 22 00:25:31 2010
New Revision: 901943
URL: http://svn.apache.org/viewvc?rev=901943&view=rev
Log:
Slightly cleaned up
Modified:
openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
Modified:
openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java?rev=901943&r1=901942&r2=901943&view=diff
==============================================================================
---
openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
(original)
+++
openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/RedeployTest.java
Fri Jan 22 00:25:31 2010
@@ -39,6 +39,7 @@
// create reference to openejb itests
File file = JarLocation.jarLocation(BasicStatelessBean.class);
+ // These two objects pretty much encompas all the EJB Container
ConfigurationFactory config = new ConfigurationFactory();
Assembler assembler = new Assembler();
@@ -51,8 +52,12 @@
}
private void createAndDestroy(Assembler assembler, ConfigurationFactory
config, File file) throws Exception {
+
+ // Deploy the file
assembler.createApplication(config.configureApplication(file));
+
+ // Lookup and execute a bean
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
LocalInitialContextFactory.class.getName());
InitialContext ctx = new InitialContext(properties);
@@ -60,8 +65,10 @@
EncStatefulObject ejbObject = home.create("foo");
ejbObject.lookupStringEntry();
+ // Undeploy the file
assembler.destroyApplication(file.getCanonicalPath());
+ // Try and execute the bean after it's been undeployed -- should fail
try {
ejbObject.lookupStringEntry();
fail("Proxy should no longer be valid");