Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Whizlabs Question doubt(UDDI)

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Q->What is the output of the following JAXR code?
ConnectionFactory factory=ConnectionFactory.newInstance();
Properties props=new Properties();
props.put("javax.xml.registry.lifeCycleManagerURL","http://java.sun.com/uddi/publish";);
Connection con=factory.createConnection();
System.out.println(factory.getProperties().get("javax.xml.registry.lifeCycleManagerURL"));
Options:
1-javax.xml.registry.lifeCycleManagerURL
2-null
3-http://java.sun.com/uddi/publish
4-http://java.sun.com/uddi/inquiry
5-none of the above

whizlabs ans-none of the above
Can any one clarify me why?
Thanks in advance.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Divya Gehlot:
Hi,
Q->What is the output of the following JAXR code?
ConnectionFactory factory=ConnectionFactory.newInstance();
Properties props=new Properties();
props.put("javax.xml.registry.lifeCycleManagerURL","http://java.sun.com/uddi/publish";);
Connection con=factory.createConnection();
System.out.println(factory.getProperties().get("javax.xml.registry.lifeCycleManagerURL"));
Options:
1-javax.xml.registry.lifeCycleManagerURL
2-null
3-http://java.sun.com/uddi/publish
4-http://java.sun.com/uddi/inquiry
5-none of the above

whizlabs ans-none of the above
Can any one clarify me why?
Thanks in advance.



Notice he did not do a factory.setProperties(props) after setting the property for lifeCycleManagerURL. You need to do that before you create the connection or the properties wont be set. So effectively nothing was set on the connection/factory anyways. Hence none of the above is the answer.

Cheers.
 
Divya Gehlot
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explaination.
But in whizlabs they have given some other explaination
whizlabs Explaination:
The goal of this question to test your ability to recognize how JAXR handles mandatory and non-mandatory properties while creating JAXR connections to UDDI registeries.In other words,the "javax.xml.registry.queryManagerURL"
must always be specifed and must map to a valid query manager URI of a UDDI registry.Moreover only "javax.xml.registry.queryManagerURL" property is mandatory while "javax.xml.registry.lifeCycleManagerURL" property is not.However if later is not specified it must resolve the to the URL mapped to the "javax.xml.registry.queryManagerURL" property i.e."http://java.sun.com/uddi/inquiry".

So I got confused with that.
Can any one explain me what they want to say.
 
It will give me the powers of the gods. Not bad for a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic