Notes on Weblogic JNDI, Cluster, Datasource Deployment
- You can bind an RMI object or a non-RMI object into a JNDI tree.
- When a client connects to a cluster, it is actually connecting to one of the WebLogic Servers in the cluster. Because the JNDI tree for this WebLogic Server contains the RMI stubs for all services offered by the other WebLogic Servers in the cluster in addition to its own services, the cluster appears to the client as one WebLogic Server hosting all of the cluster-wide services.
- When an instance of a RMI object is deployed to a single WebLogic Server, the stub is replicated across the cluster.
(1) Note that only the stub of the RMI object is replicated. So if the hosting server of the RMI object is down, the service given by the RMI object is also down. The RMI stubs in the other sever's JNDI tree are updated to reflect the server failure. (2) When you deploy a data source to a cluster, WebLogic Server creates an instance of the data source on each server in the cluster. So in this case, each server has an actual instance instead of a stub. So even if one server goes down, the data source in other servers can still work.
- When a customer object ( a non-RMI object) is bound into a JNDI tree in a cluster, the object is replicated across all the servers in the cluster. However, if the host server goes down, the customer object is removed from teh cluster's JNDI tree.
To create a binding that is not replicated across WebLogic Servers in a cluster, you must specify the REPLICATE_BINDING property to "false" when creating the context that binds the customer object.
- A client can use the ClusterAddress to get the service. This address may be either a DNS host name that maps to multiple IP addresses or a comma separated list of single address host names or IP addresses. An alternative method of specifying the initial point of contact with the WebLogic Cluster is to supply a comma-delimited list of DNS Server names or IP addresses. Examples:
Hashtable ht = new Hashtable(); ht.put(Context.PROVIDER_URL, "t3://acme1,acme2,acme3:7001");
- Programming WebLogic JNDI(http://docs.oracle.com/cd/E15051_01/wls/docs103/jndi/jndi.html)
- Deploying Data Sources on Servers and Clusters (http://docs.oracle.com/cd/E23943_01/web.1111/e13737/ds_deploy.htm)