How would you get the actual bound object of type MyObject using JNDI?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bhaskar_Kommuru
Posted On:   Friday, April 5, 2002 04:08 AM

How would you get the actual bound object of type MyObject using JNDI? A: namesList = context.listBindings(someContextName); Binding binding = namesList.next(); MyObject obj = (MyObject) binding.getObject(); B: namesList = context.listBindings(someContextName); Binding binding = namesList.next(); MyObject obj = binding.getObject("MyObject"); C: namesList = context.listContents(someContextName); Binding binding = namesList.next(); MyObject obj = binding.getObject(); D: namesList = context.list(someContextName); Binding binding = namesList.next(); MyObject obj = (MyObject) binding.getObject("MyObject"); Can anybody help me   More>>

How would you get the actual bound object of type MyObject using JNDI?


A: namesList = context.listBindings(someContextName);
Binding binding = namesList.next();
MyObject obj = (MyObject) binding.getObject();
B: namesList = context.listBindings(someContextName);
Binding binding = namesList.next();
MyObject obj = binding.getObject("MyObject");
C: namesList = context.listContents(someContextName);
Binding binding = namesList.next();
MyObject obj = binding.getObject();
D: namesList = context.list(someContextName);
Binding binding = namesList.next();
MyObject obj = (MyObject) binding.getObject("MyObject");

Can anybody help me please?

   <<Less
About | Sitemap | Contact