Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1620

javax.ejb.Handle implementations can't find a target object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • None
    • JBossAS-4.0.2RC1
    • None
    • None

    Description

      Handle implementations keeps an empty environment Hashtable for InitialContext.

      The test is very simple: on my client I put into system properties a wrong URL for server (simulates a situation, when we transfer a bean Handle to some computer, that is not knows, where the real server is).
      Just try my source:

      Hashtable env = new Hashtable();
      env.putAll( System.getProperties() );
      env.put( "java.naming.provider.url",
      System.getProperty( "realServerURL" ) );
      InitialContext ic = new InitialContext( env );
      Object ref = ic.lookup( "SomeBean" );
      SomeBeanHome home =
      ( SomeBeanHome )PortableRemoteObject.narrow( ref, SomeBeanHome.class );

      SomeBean beanA = home.create();
      Handle bh = beanA.getHandle();
      /*

      • here you will get a javax.naming.CommunicationException:
      • Receive timed out
        */
        EJBObject beanB = bh.getEJBObject();
        System.out.println( beanB.isIdentical( beanA ) );

      Attachments

        Issue Links

          Activity

            People

              starksm64 Scott Stark (Inactive)
              maxoid_jira Maxim Karavaev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: