• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions Regarding Ian's Mock Exam

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ID-DP008:
You need to create variable number of instances of a class (Basically controll the number of instance that are created), which pattern should you use?
The answer is Singleton. In my view, the Singleton Pattern is a pattern that insures there is "one and only one instance" of a class, and that it is possible to provide global access to that one instance.
ID-AP006
When would you use tunneling?
The answer is A. When you do not have access to any spare ports of the firewall and need to tunnel your application through an existing port.
I am uncertain the question is about tunneling or HTTP tunneling. I think that answer D. When you are using IIOP with RMI, we need HTTP tunneling to go through firewalls.
 
Ian B Anderson
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello JiaPei,
For the Singleton question look at the following URL:
http://www.javaworld.com/javaworld/javaqa/2001-11/01-qa-1102-singleton.html
Question 2 is about Tunnelling through a port
You wouln't necessarily need to use tunnelling just because you are using RMI-IIOP because you might already have access to that necessary port. It's more a question of how to work with firewalls. The correct answer is:
(A) When you don't have access to any spare ports of the Firewall and need to tunnel your application through an
existing port.
Good luck
Ian
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic