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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Rejected
    • Affects Version/s: JBossAS-4.0.2RC1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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 ) );

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  starksm64 Scott Stark
                  Reporter:
                  Maxoid Maxim Karavaev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: