hi,folks
I'don't know whether DD questions will occur in the real phase 1 exam,but I'm unsure of following question,can anyone solve it?
1.A Deployer created the following descriptor fragment
for a message-driven bean:
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
Referring to the MDB deployment descriptor fragment
from the scenario above, which one of the following
statements correctly describes the MDB's features?
1 The MDB is a javax.jms.Topic producer that has a
NonDurable subscription for one or more Topics.
2 The MDB is a JMS Publish-Subscribe producer that may
lose its topic subscription after the
EJB server is
restarted.
3 The MDB is a javax.jms.Topic consumer that is
removed after the EJB server is restarted.
4 The MDB is a JMS Publish-Subscribe consumer that may
lose some messages if the EJB server goes down.
5 The MDB is a JMS Publish-Subscribe consumer that may
lose its topic subscription if the EJB server goes
down.
2.Which one of the following statements correctly
describes the differences between CMP and BMP entity
beans related to finder methods?
1 CMP finders return an EJBObject or a Collection
thereof. BMP finders return a primary key or a
Collection thereof.
2 CMP finders return a primary key or a Collection of
EJBObjects. BMP finders return a primary key or a
Collection thereof.
3 CMP finders return only a Collection of EJBObjects.
BMP finders return only a Collection of primary keys.
4 CMP finders return only a Collection of primary
keys. BMP finders return only a Collection of
EJBObjects.
5 CMP finders return a primary key or a Collection
thereof. BMP finders return an EJBObject or a
Collection thereof.
3.What types of resources are part of the conversational
state of a stateful session bean and are preserved by
the container when the bean is passivated?
1 Database connections
2 Open files
3 URL connections
4 Open sockets
5 EJB context references
4.How do you indicate the JNDI name for the
"MyDataSource" database resource in a deployment
descriptor?
1 <ref-name>jdbc/MyDataSource</ref-name>
2 <res-ref-name>jdbc/MyDataSource</res-ref-name>
3 <ref-name>MyDataSource</ref-name>
4<resource-env-ref-name>MyDataSource</resource-env-ref-name>
5<res-ref-name>
java:comp/env/jdbc/MyDataSource</res-ref-name>
5.What entity bean method do you use to uniquely
identify the data represented by the bean in a
persistent store?
1 getEJBMetaData()
2 getEntityContext()
3 getHandle()
4 getPrimaryKey()
5 getEJBObject()
6.What security conditions must a caller principal meet
in order to be allowed to perform an EJB method?
1 It must be assigned to exactly one of the security
roles allowed to access the method.
2 It must be assigned to one of the security roles
allowed to perform every method on the bean.
3 It must be assigned to all of the security roles
associated with the method.
4 It must be assigned to at least one of the security
roles associated with the method.
5 It must be assigned to all security roles allowed to
access the method
7.An EJB session bean needs to retrieve a JMS
QueueConnectionFactory that is registered in JNDI
under "java:comp/env/jms/QueueFactory". Referring to
the scenario above, which one of the following
correctly describes the related deployment descriptor
entries?
1 <resource-ref>
<res-ref-name>jms/QueueFactory</res-ref-name>
<res-ref-type>javax.jms.QueueConnectionFactory</res-ref-type>
<res-auth>Container</res-auth>
</resource-ref>
2 <resource-ref>
<res-ref-name>java:comp/env/jms/QueueFactory</res-ref-name>
<res-ref-type>javax.jms.QueueConnectionFactory</res-ref-type>
<res-auth>Container</res-auth>
</resource-ref>
3 <resource-env-ref>
<resource-env-ref-name>jms/QueueFactory</resource-env-ref-name>
<resource-env-ref-type>javax.jms.QueueConnectionFactory
</resource-env-ref-type>
</resource-env-ref>
4 <resource-env-ref>
<resource-env-ref-name>java:comp/env/jms/QueueFactory
</resource-env-ref-name>
<resource-env-ref-type>javax.jms.QueueConnectionFactory
</resource-env-ref-type>
</resource-env-ref>
5 <resource-env-ref>
<res-ref-name>jms/QueueFactory</res-ref-name>
<res-ref-type>javax.jms.QueueConnectionFactory</res-ref-type>
</resource-env-ref>
8.The EJB server manages some JMS-related objects so
that the developer can register and retrieve them
using JNDI. Referring to the scenario above, objects
implementing which one of the following JMS interfaces
are managed by the EJB server?
1 javax.jms.Queue
2 javax.jms.QueueSender
3 javax.jms.TopicConnection
4 javax.jms.QueueConnection
5 javax.jms.TopicSession
9.What is the difference between entity bean home and
select methods?
1 ejbHome methods can return primitive values or
Collections thereof; ejbSelect methods cannot.
2 ejbHome methods are exposed to EJB clients through the
Home interface; ejbSelect methods can only be used
internally in the bean.
3 ejbHome methods can return EJBObjects or Collections
thereof; ejbSelect methods can only return
EJBLocalObjects and Collections thereof.
4 ejbHome methods can be invoked on a bean in a "pooled"
state; ejbSelect methods can be invoked only on a bean
in a "ready" state.
5 ejbHome methods can be invoked on a bean in a "ready"
state; ejbSelect methods can be invoked only on a bean
in a "pooled" state.
10.What type of information is included in the
<assembly-descriptor> element of a deployment
descriptor?
1 Security role references
2 Resource manager connection factory references
3 Container-managed relationships
4 Environment entries
5 Method permissions