Any work with JNDI requires an understanding of the underlying service as well as an accessible implementation. For example, a database connection service calls for specific properties and exception handling. The first token of the string represents the global context, after that each string added represents the next sub-context:.
Now, let's add a sub-context:. Context contains the properties for the naming and directory service. Here, let's use some helper code from Spring for convenience to build a Context :. In general, services should store an object reference, serialized data, or attributes in a directory context. It all depends on the needs of the application. Note that using JNDI this way is less common. Typically, JNDI interfaces with data that is managed outside the application runtime.
JNDI and its applications are used widely in the data analytics industry, where there is a lot of data that has to be mined, and there is a certain aspect of data being stored in different directories and files stored on different folders. It has wide use in the telecommunication industry where there is a calculation of bills taking place according to the hourly rate of conversation someone has.
The rate of interest is fixed at 8. Accordingly, all the interest rates are calculated. To create a menu-driven program to enter the principal amount and calculate the simple interest, compound interest and absolute difference between them. Here we enter the Principal amount of Rs , and we find out the simple and the compound interest as well as the difference. This article sees the programming concept of a Java program and its application in the BlueJ platform.
The code is used to calculate the interest rate from the principal. It returns the simple interest, compound interest, and exits if the user wishes to. Also, we see how JNDI is used in directories and servers, the packages used in programming and finding and searching directory using objects. The main use of JNDI is whenever there is a directory associated with it, and it has to be searched for meaningful insights about the data.
You may also look at the following article to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy.
JNDI stands for Java Naming and Directory Interface and it basically functions as a central interface for several or existing naming services in a particular computer network. With JNDI binding, networks are able run faster and smoother in terms of applications that need such naming services. In enterprise level computer networks, there may be several existing technologies and applications that provide binding or naming services.
These services are needed to streamline the process of getting the necessary data and resources for programs and the entire network to function smoothly and more efficiently. Through these naming services, the location for a particular application or another service can easily be mapped resulting to faster processing time for the computers connected to the network.
0コメント