JNDI and Clustering

   

To achieve better scalability and high availability, J2EE services, including EJB servers and naming services, can be clustered. Clustering is when a set of identical services or components is started so that the system can be more fault-tolerant and also balance the load across the redundant services. We will only briefly mention clustering of JNDI services in this section.

For more of a general discussion on clustering concepts and EJB, see Chapter 22, "EJB Clustering Concepts."

Because JNDI can also be considered a limited resource and is a point of failure for an enterprise application, the JNDI service can also be clustered.

Clustering is very dependent on the vendor implementation. Each EJB server might have different features and might implement support for JNDI clustering differently. EJB servers are not required to support clustering, but most have some type of support for it. Even when a vendor supports clustering, the level of support can be limited. Therefore, you will need to read the vendor documentation for your EJB server to determine the level of clustering support available.

An example of a vendor that has a broad range of support for clustering is BEA's WebLogic 6.1. WebLogic has different options for supporting clustering, but the premise is that each EJB server can contain objects that get attached to a JNDI tree. The JNDI might be replicated across the clustered nodes. If one of these clustered nodes fails, another node would be able to pick up the workload. However, unless the component itself was clustered, a client would not be able to access it even though the object might still be registered in the JNDI tree.

An alternative to this cluster design might be to replicate all the objects for one EJB server across to all the other nodes in the enterprise. Obviously, this would have a negative effect on performance due to the necessary copying of objects to all JNDI trees. However, you can gain failover support of the JNDI service with this method.

Whether you need to cluster the JNDI services or not depends on your particular application requirements and constraints. Make sure to check with your EJB server vendor to verify that it supports clustering for JNDI services and that it is a requirement for your application.



Special Edition Using Enterprise JavaBeans 2.0
Special Edition Using Enterprise JavaBeans 2.0
ISBN: 0789725673
EAN: 2147483647
Year: 2000
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net