EJB client redundancy and bootstrap failover support

  The first thing for any EJB client is to look up the home of the bean (except MDB). Two kinds of EJB clients need to be considered:

  1. Multiple copies of the same EJB client may exist in a client request chain.

    For example, Web clients from Web containers that are workload managed, EJB clients from another EJB container server cluster, or EJB clients from their own server cluster. In this case, EJB clients can use their own server to bootstrap with the default provider URL. If the bootstrap fails, the EJB client fails. This failure should be handled by the previous server, for example the HTTP plug-in. Another version of the same client in a different container may bootstrap from its server successfully. By using client redundancy, EJB failover and high availability is achieved.

  2. Only one copy of the same client.

    For example, a Java client, J2EE client, C++ client, or third-party ORB client. In this case, if the client is bootstrapped to only one server, it will fail if that server fails since the client is not redundant. You need to bootstrap this client to as many bootstrap servers as possible.

    prop.put(Context.INITIAL_CONTEXT_FACTORY, 
        "com.ibm.websphere.naming.WsnInitialContextFactory"); 
    
    prop.put(Context.PROVIDER_URL, 
        "corbaloc::host1:9810,:host2:9810"); 
    
    Context initialContext = 
        new InitialContext(prop);
    
    try { 
        java.lang.Object myHome = initialContext.lookup("MyEJB");
        ...
    }
    

In addition to the IIOP URL, WebSphere V5 also supports the CORBA object URL as specified in J2EE 1.3. It is very convenient to use multiple bootstrap addresses for automatic retries. Every WebSphere server process contains a naming service, and you can bootstrap to any combination of servers. It is good practice to bootstrap to the servers in a cluster since the initialContext is workload managed and you can use the simple name in the lookup. Otherwise, you need to specify the fully qualified names in the lookup and InitialContext in the Node Agents is not workload managed (so it has no failover capability), although they use the default port of 2809, which seems convenient.

For J2EE clients, you can specify a bootstrap host and port in the launch command line, and try different hosts/ports until you succeed if you use the default URL provider.

Once you look up the EJB home, the naming server will return an indirect IOR, LSD, and routing table, and the WLM plug-in will redirect the client to one of many clustered EJB containers.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.