• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejb questions

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2.
Which one of the following statements correctly describes the differences between CMP and BMP entity beans related to finder methods?
Choice 1
CMP finders return a primary key or a Collection of EJBObjects. BMP finders return a primary key or a Collection thereof.
Choice 2
CMP finders return only a Collection of primary keys. BMP finders return only a Collection of EJBObjects.
Choice 3
CMP finders return an EJBObject or a Collection thereof. BMP finders return a primary key or a Collection thereof.
Choice 4
CMP finders return a primary key or a Collection thereof. BMP finders return an EJBObject or a Collection thereof.
Choice 5
CMP finders return only a Collection of EJBObjects. BMP finders return only a Collection of primary keys.

3.
Which one of the following is NOT true about the finder methods of a local home interface for a BMP entity bean?
Choice 1
Finder methods must be declared public.
Choice 2
Finder methods must throw ObjectNotFoundException.
Choice 3
Finder method names must start with the prefix "find."
Choice 4
The entity bean can declare only one findByPrimaryKey method.
Choice 5
Finder methods must return an EJBLocalObject or a collection thereof.

4.After serializing an EJB object handle, which one of the following methods is used to re-acquire the EJB object from a serialized handle?
Choice 1
ejbCreate()
Choice 2
getEJBHome()
Choice 3
getEJBHandle()
Choice 4
ejbRestore()
Choice 5
getEJBObject()

5.
Code
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>testBean/TestBean</ejb-name>
<home>testBean.TestHome</home>
<remote>testBean.TestRemote</remote>
<ejb-class>testBean.TestBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Given the above deployment descriptor fragment, which one of the following describes the behavior of this bean?
Choice 1
The bean uses a custom primary key.
Choice 2
The bean is forced to passivate after ten seconds.
Choice 3
The bean implementation class is not part of a Java package.
Choice 4
This bean may execute without a transaction context.
Choice 5
This bean is re-entrant.

6.
What deployment descriptor information is only changed by the Bean Provider?
Choice 1
Relationship role source element
Choice 2
Environment entries
Choice 3
Relationship names
Choice 4
Binding of enterprise bean references
Choice 5
Message-driven bean message selector

7.
Which one of the following statements correctly describes the function of the <message-selector> element in the MDB deployment descriptor?
Choice 1
It specifies which type of messages (TextMessage, StreamMessage, etc.) will be routed by JMS to the MDB.
Choice 2
It specifies a regular expression used by JMS to determine which messages to route to the MDB.
Choice 3
It specifies which message header properties are selected by the container to be passed to the MDB.
Choice 4
It specifies the SQL-92 compatible query used by JMS to determine which messages to route to the MDB.
Choice 5
It specifies an Object Query Language (OQL) compatible query used by JMS to determine which messages to route to the MDB.

8,
Scenario
In order to publish a MapMessage to a Topic, a JMS client has to use a set of helper JMS objects.
Referring to the scenario above, which one of the following is a correct sequence to look up and create the JMS helper objects?
Choice 1
Topic, TopicConnectionFactory, TopicConnection, TopicPublisher, TopicSession, MapMessage
Choice 2
TopicConnectionFactory, TopicConnection, TopicSession, TopicPublisher, MapMessage, Topic
Choice 3
Topic, TopicConnectionFactory, TopicSession, TopicConnection, MapMessage, TopicPublisher
Choice 4
TopicConnectionFactory, TopicConnection, TopicSession, MapMessage, Topic, TopicPublisher
Choice 5
Topic, TopicConnectionFactory, TopicConnection, MapMessage, TopicSession, TopicPublisher
[ March 03, 2003: Message edited by: Timber Lee ]
[ March 04, 2003: Message edited by: Timber Lee ]
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For sake of clarity, please post just one question per thread. It will also help keep the discussion focussed on a specific topic. Thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic