• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

mock question

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following are true about SSL?
a. SSL facilitates secure communication
b. SSL is a high level protocol and sits on top of HTTP
c. SSL is a low level protocol and sits below HTTP
d. SSL works only with HTTP
 
bird cao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Select the correct sentences from below
a. In the mediator pattern the individual Objects participating in the collaboration maintain direct references to each other
b. Facade pattern is used to provide a simple interface to a subsystem comprising of a large number of objects.
c. Memento pattern preserves Encapsulation boundaries whil exposing an object's internal state
d. State pattern is used for operations that have large number of conditional statements based on the Object's state
 
bird cao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following are true about the Observer pattern ...
a. The subject is the publisher of the message and the Observer is the subscriber of the message notification
b. Observers can be dynamically added.
c. The Observer pattern supports broadcast communications
d. It promotes loose coupling between senders of messages and receivers of messages during communication
e. None of the above
 
bird cao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When is unsetEntityContext() invoked on an Entity bean?
a. When the entity bean is to be garbage collected
b. After an entity bean is garbage collected
c. after the finalize() method has been invoked on the EntityBean
d. None of the above
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SSL - a & c
unsetEntityContext - d
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Select the correct sentences from below
a. In the mediator pattern the individual Objects participating in the collaboration maintain direct references to each other
b. Facade pattern is used to provide a simple interface to a subsystem comprising of a large number of objects.
c. Memento pattern preserves Encapsulation boundaries whil exposing an object's internal state
d. State pattern is used for operations that have large number of conditional statements based on the Object's state
b,c & d answers in my opinion.
---------------------------------------------------------------------------Which of the following are true about the Observer pattern ...
a. The subject is the publisher of the message and the Observer is the subscriber of the message notification
b. Observers can be dynamically added.
c. The Observer pattern supports broadcast communications
d. It promotes loose coupling between senders of messages and receivers of messages during communication
e. None of the above
a,c & d are the answers for this
---------------------------------------------------------------------------When is unsetEntityContext() invoked on an Entity bean?
a. When the entity bean is to be garbage collected
b. After an entity bean is garbage collected
c. after the finalize() method has been invoked on the EntityBean
d. None of the above
a is the answer for this.
 
bird cao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
about unsetEntityContext()
ejb1.1 spec just say "The container invokes this method when the container wants to reduce the number of instances
in the pool. After this method completes, the container must not reuse this instance." It doesnot mention about garbage collection.
I think the answer is D.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my answers:
Which of the following are true about SSL?
a. SSL facilitates secure communication
b. SSL is a high level protocol and sits on top of HTTP
c. SSL is a low level protocol and sits below HTTP
d. SSL works only with HTTP
ANSWER: a,c
------------------------------------------------------
Select the correct sentences from below
a. In the mediator pattern the individual Objects participating in the collaboration maintain direct references to each other
b. Facade pattern is used to provide a simple interface to a subsystem comprising of a large number of objects.
c. Memento pattern preserves Encapsulation boundaries whil exposing an object's internal state
d. State pattern is used for operations that have large number of conditional statements based on the Object's state
ANSWER: b,c & d
---------------------------------------------------------------------------Which of the following are true about the Observer pattern ...
a. The subject is the publisher of the message and the Observer is the subscriber of the message notification
b. Observers can be dynamically added.
c. The Observer pattern supports broadcast communications
d. It promotes loose coupling between senders of messages and receivers of messages during communication
e. None of the above
ANWSER: a, b,c & d. B is correct since we can add subscriber to the subject on the fly. Applications of the Observer pattern include the JMS and Loosely Coupled Events (LCE) in COM+. In JMS you can dynamically add message listener to the topic. In LCE you can add subscriber dynamically too.
---------------------------------------------------------------------------When is unsetEntityContext() invoked on an Entity bean?
a. When the entity bean is to be garbage collected
b. After an entity bean is garbage collected
c. after the finalize() method has been invoked on the EntityBean
d. None of the above
ANWSER: a. True the EJB spec doens't say it is GCed after the method is called, but in the specs 2.1 Page 185, the life cycle diagram says that after unsetEntityContext is called, the bean doesn't exist. If this doesn't mean it is garbage collected, what else can it mean?
-David
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,
I disagree with you for your reasoning about the answer of the last question regarding the unsetEntityContext(). When container wants to end the life of an entity bean. It calls the unSetEntityContext(). This may make the bean intance to be elligable for garbage collection. However, garbag collection does not happen immediately. there could be a very long gap between the time when unSetEntityContext() is called and the bean instance is actually garbage collected. "does not exists" is a logic state of a ejb.
It should not be considered a state object java object inside JVM.
My answer should be d) None of above.
reply
    Bookmark Topic Watch Topic
  • New Topic