Question

What is the use of the following Code in java below:

WorkManager manager = (WorkManager) initialContext
                .lookup("java:comp/env/wm/LMKGWM01");

What is the String argument passed in lookup method ?

Was it helpful?

Solution

Look at this post, it talks all about it. The path is used for searching for the needed resource by JNDI (Java Naming and Directory Interface).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top