Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

should queryManagerURL or lifeCycleManagerURL returned? - Is the answer correct?

 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In whizlab practice exam simulator question #14, it asks for which of following are correct ways of ceating a new EmailAddress using JAXR?

there is one choice A which code is:

Connection connection = ConnectionFactory.newConnection();
Properties props = new Properties();
props.put("javax.xml.registry.queryManagerURL","http://myuddi.org/inquiry");
connection.setProperties(props);
LifeCycleManager mgr = RegistryService.getLifeCycleManager();
EmailAddress addr = mgr.createEmailAddress("john.doe@mymail.com");


In the simulator answer, it explains that A is correct answer.


My question - Should the answer A be correct? I think not.

I think in answer A ,factory did not set up the property of javax.xml.registry.lifeCycleManager, it only set up the queryManagerURL. So when the RegistryService.getLifeCycleManager() is called, the queryManagerURL should be returned instead of the LifeCycleManger. then returned queryManagerURL can't do the creating/updating.


Is my understanding correct? Is the answer wrong? Or can someone help me clear this out?
[ January 17, 2006: Message edited by: Helen Li ]
 
ruijin yang
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helen,

I am a new immigrant in Canada.I plan to take SCDJWS test in February.I have something to talk with you.Would you like to contact me at:richardyangca@yahoo.ca?

Thank you!
[ January 17, 2006: Message edited by: ruijin yang ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helen,

Whizlabs contacted me yesterday and I responded them, so you should have an answer from them very soon
 
ruijin yang
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helen,

Do you think Whizlabs exam simulator for SCDJWS is helpful for the preparaton of this test?

Cheer!
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had some doubt on some question answers. As the one I posted, so far there is no clear out from Whizelab yet. It's frustrating!!!


For the simulator itself, a lot of questions need more detailed knowledge on APIs. Now I am going back to the Blue Print and MZ study guide.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty sure you should have gotten an answer by now.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,

By now I still have not got the answer yet except there is a email telling me the question is forwarded to the author.

Valentin, if you know the answer, could you explain it here in this board?
I'd just like to know if the Whizlab answer is wrong? I could not figure out why they offer that answer?
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how long the Whizlab tech suport will clear my doubt on the answer of this quesion. I lost hope with them.

I wish some export in this board take some time to read this question and help me clear it out.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helen,

Whizlabs is not responsible for the delay, I am. Thus, I hereby apologize for the time it takes to answer that question. The fact is that I just discovered that "Helen Li" (on Javaranch) and "Helen Ge" (who contacted Whizlabs' support team) are one and the same person

So I'll try to answer your question directly here so that we remove one indirection. I'll inform Whizlabs support team afterwards.

Regarding this problem, I have responded last Saturday and you should have received an email with the following content:


The customer is right, there is a small mistake. Please replace option A
with what follows (only the url of the server has changed):

A- Connection connection = ConnectionFactory.newInstance();
Properties props = new Properties();
props.put("javax.xml.registry.queryManagerURL", "http://myuddi.org/lifecycle");
connection.setProperties(props);
RegistryService regServ = connection.getRegistryService();
LifeCycleManager mgr = regServ.getLifeCycleManager();
EmailAddress addr = mgr.createEmailAddress("john.doe@mymail.com");



Since the lifecycleManagerURL defaults to the queryManagerURL if not specified, and the queryManagerURL is actually an URL to the server managing the lifecycle, you will end up creating a correct LifeCycleManager. So yes, there was a bug in the answer and I apologize for that again.

Please let me know if this is still not clear to you
[ January 23, 2006: Message edited by: Valentin Crettaz ]
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,

Your apology is accepted here.

I appreciated that you directly cleared out the bug on this answer here so I and other people who is preparing the exam using the simulotor as reference will not be misleaded if we take the real exam.


thanks.

Helen
 
Qiuming Yan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this question and answer really wrong? In the real world, you may design a service to act as both �query manager service� and �life cycle manager�. In this case, there is only one URL.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the queryManagerURL is the mandatory property you have to set up and used as default, the lifeCycleManagerURL is the optional. So if you don't set up the lifeCycleManagerURL, then whatever the URL set up in your queryManagerURL will be used for the lifeCycleManagerURL.
 
Qiuming Yan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<<the queryManagerURL is the mandatory property you have to set up and used as default, the lifeCycleManagerURL is the optional. So if you don't set up the lifeCycleManagerURL, then whatever the URL set up in your queryManagerURL will be used for the lifeCycleManagerURL.>>

If a service implements both services and they need to use the same URL, so you do not need to setup lifeCycleManagerURL. In this case the question and answer is right.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
take a close look at the code in simulator original answer:

there is one choice A which code is:

Connection connection = ConnectionFactory.newConnection();
Properties props = new Properties();
props.put("javax.xml.registry.queryManagerURL","http://myuddi.org/inquiry");
connection.setProperties(props);
LifeCycleManager mgr = RegistryService.getLifeCycleManager();
EmailAddress addr = mgr.createEmailAddress("john.doe@mymail.com");


it's fine it do not set up the lifeCycleManagerURL, however, the one the
LifeCycleManager mgr = RegistryService.getLifeCycleManager();
get is really the URL 'http://myuddi.org/inquiry' which is the inquiry URL and it can not do the update as in the last line of code. So the bug is here.

See last emails and find out how the author corrected the bug.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than the last bug on this SCDJWS Practice Exam Simulator #14 which I posted and the author already corrected and posted on the JavaRanch forum, I think in the same question, there is another bug:

on each question first line, the code writes:

Connection connection = ConnectionFactory.newConnection();

I think it's incorrect since ConnectionFactory does not has such newConnection() method. Instead, the correct way to get the connection should be:

ConnectionFactory factory = ConnectionFactory.newInstance();
Connection connection = factory.createConnection();
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whizlabs support team and I had an email exchange yesterday and they shall get back to you today, I guess.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic