WebLogic Clustering and JNDI


Performance and scalability: WebLogic Clustering and JNDI

  1. WebLogic Clustering and JNDI (3 messages)

    What I need is the following
    Java clients invoking EJBs in a WebLogic cluster.

    I read from the docs that there is a "direct-model", where a client lookup a stub using JNDI, which returns a clusterable stub maching ID, and allow multiple method invocation. The stubs use load balacing algorithm to choose which server to call.

    There is also a 'indirect model' where client lookup up stub using JNDI and is returned with a clusterable stub which the client calls create on and is pinned to a server.

    Problem is with how could I get the stubs/skeletons to be generated in both models. I use Web Gain visual cafe 4.1. Is the Clusterable options from Project options->Configure Deployment Descriptor->Target Options->Clustering
    Home is Clusterable
    Stateless Bean is clusterable
    Stateless Bean method is idempotent

    what this is all about?

    Let me get it right? Is it the STUB that is doing the intelligent bit and route call to different servers?

    Also, as for the JNDI lookup in the server, I saw that the code could be called like
    p.put(Context.PROVIDER_URL, "t3://myCluster:7001");
    where p is the property to be passed in the InitialContext used for looking up.

    But surely, myCluster is not a machine name, it is barely a clustername setup in weblogic.properties, which the client, seating on another machine on the same LAN would have no knowledge of. Would it work if I just use a JNDI service from any machine within the cluster. e.g. if I myCluster contains server1,server2,server 3 then
    p.put(Context.PROVIDER_URL, "t3://server1:7001");
    is sufficient?
    but surely, that defeats the whole purpose of resilience??, what if server1 goes down??

    Or does it need a 'round-robin' DNS server routing the JNDI request to different machines within the cluster. All the documents talks a lot about 'downloading' stubs, is that all transparent to the client?

    Sorry if I am a bit naive, but I am new to clustering!

    Many thanks!
  2. WebLogic Clustering and JNDI[ Go to top ]

    To answer the last question, yes, set up your cluster in DNS and use DNS round robin.

    Note this is the single point of failure, since DNS round robin will happily route you to a dead server. :-(


  3. WebLogic Clustering and JNDI[ Go to top ]

    This is not correct.
    You can use round-robin DNS but it does not give you a single point of fail.

    In WebLogic round-robin DNS name is merely used to get a list of servers and not for actual round-robining.
    The remote stub is smart enough not to send you to a dead server.


  4. WebLogic Clustering and JNDI[ Go to top ]

    For all objects except a connection to JNDI that's true, sort of. But when you are trying to connect to JNDI you *do not have a smart stub* to provide this fail over, that's precisely what you are trying to get at.

    For other stubs, it depends on the type of the stub, clustering settings, all sorts of things.

    There is no blanket statement that says you "won't get a dead server" with WLS5.1.0.