[jboss-cvs] JBossAS SVN: r86302 - projects/ejb3/examples/trunk/firstejb/src/test/java/org/jboss/ejb3/examples/ch04/firstejb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 25 08:07:21 EDT 2009
Author: ALRubinger
Date: 2009-03-25 08:07:21 -0400 (Wed, 25 Mar 2009)
New Revision: 86302
Modified:
projects/ejb3/examples/trunk/firstejb/src/test/java/org/jboss/ejb3/examples/ch04/firstejb/CalculatorIntegrationTestCase.java
Log:
Put a PortableRemoteObject.narrow into ejb3-examples-firstejb
Modified: projects/ejb3/examples/trunk/firstejb/src/test/java/org/jboss/ejb3/examples/ch04/firstejb/CalculatorIntegrationTestCase.java
===================================================================
--- projects/ejb3/examples/trunk/firstejb/src/test/java/org/jboss/ejb3/examples/ch04/firstejb/CalculatorIntegrationTestCase.java 2009-03-25 11:53:50 UTC (rev 86301)
+++ projects/ejb3/examples/trunk/firstejb/src/test/java/org/jboss/ejb3/examples/ch04/firstejb/CalculatorIntegrationTestCase.java 2009-03-25 12:07:21 UTC (rev 86302)
@@ -24,6 +24,7 @@
import javax.naming.Context;
import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
import junit.framework.TestCase;
@@ -88,8 +89,9 @@
// Obtain views (vendor-specific)
calcRemoteBusiness = (CalculatorRemoteBusiness) namingContext.lookup(JNDI_NAME_CALC_REMOTE_BUSINESS);
- final CalculatorRemoteHome calcRemoteHome = (CalculatorRemoteHome) namingContext
- .lookup(JNDI_NAME_CALC_REMOTE_HOME);
+ final Object calcRemoteHomeReference = namingContext.lookup(JNDI_NAME_CALC_REMOTE_HOME);
+ final CalculatorRemoteHome calcRemoteHome = (CalculatorRemoteHome) PortableRemoteObject.narrow(
+ calcRemoteHomeReference, CalculatorRemoteHome.class);
calcRemote = calcRemoteHome.create();
}
More information about the jboss-cvs-commits
mailing list