User: ejort   
  Date: 02/03/23 13:11:04

  Modified:    src/main/org/jboss/test/naming/test EjbLinkUnitTestCase.java
  Log:
  JBoss/JBossMX integration. Also includes a fix to the cluster tests and a more 
complete ejblink test that currently fails
  
  Revision  Changes    Path
  1.2       +57 -0     
jbosstest/src/main/org/jboss/test/naming/test/EjbLinkUnitTestCase.java
  
  Index: EjbLinkUnitTestCase.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/naming/test/EjbLinkUnitTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EjbLinkUnitTestCase.java  17 Mar 2002 12:56:29 -0000      1.1
  +++ EjbLinkUnitTestCase.java  23 Mar 2002 21:11:03 -0000      1.2
  @@ -53,6 +53,63 @@
         bean.remove();
      }
   
  +   /**
  +    * Test an ejblink with a relative path
  +    *
  +    * @exception Exception  Description of Exception
  +    */
  +   public void testEjbLinkRelative() throws Exception
  +   {
  +      Object obj = getInitialContext().lookup("naming/SessionB");
  +      obj = PortableRemoteObject.narrow(obj, TestEjbLinkHome.class);
  +      TestEjbLinkHome home = (TestEjbLinkHome)obj;
  +      getLog().debug("Found naming/SessionB");
  +
  +      TestEjbLink bean = home.create();
  +      getLog().debug("Created the bean");
  +      assertEquals("Works", 
bean.testEjbLinkCaller("java:comp/env/ejb/RelativeSessionA"));
  +      getLog().debug("Test succeeded");
  +      bean.remove();
  +   }
  +
  +   /**
  +    * Test an ejblink using a local ejb-ref
  +    *
  +    * @exception Exception  Description of Exception
  +    */
  +   public void testEjbLinkLocalNamed() throws Exception
  +   {
  +      Object obj = getInitialContext().lookup("naming/SessionB");
  +      obj = PortableRemoteObject.narrow(obj, TestEjbLinkHome.class);
  +      TestEjbLinkHome home = (TestEjbLinkHome)obj;
  +      getLog().debug("Found naming/SessionB");
  +
  +      TestEjbLink bean = home.create();
  +      getLog().debug("Created the bean");
  +      assertEquals("Works", 
bean.testEjbLinkCallerLocal("java:comp/env/ejb/LocalSessionA"));
  +      getLog().debug("Test succeeded");
  +      bean.remove();
  +   }
  +
  +   /**
  +    * Test an ejblink using a local ejb-ref with a relative path
  +    *
  +    * @exception Exception  Description of Exception
  +    */
  +   public void testEjbLinkLocalRelative() throws Exception
  +   {
  +      Object obj = getInitialContext().lookup("naming/SessionB");
  +      obj = PortableRemoteObject.narrow(obj, TestEjbLinkHome.class);
  +      TestEjbLinkHome home = (TestEjbLinkHome)obj;
  +      getLog().debug("Found naming/SessionB");
  +
  +      TestEjbLink bean = home.create();
  +      getLog().debug("Created the bean");
  +      assertEquals("Works", 
bean.testEjbLinkCallerLocal("java:comp/env/ejb/LocalRelativeSessionA"));
  +      getLog().debug("Test succeeded");
  +      bean.remove();
  +   }
  +
      public static Test suite() throws Exception
      {
         return getDeploySetup(EjbLinkUnitTestCase.class, "naming.ear");
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to