• 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

tough questions on beans and others

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
please so share your answers/opinions regarding foll questions:
Q. Which of the following are true regarding Stateful Session beans?
a. Stateful Session beans can not have more than one ejbCreate methods
b. Stateful session beans serve only one client at a time
c. Stateful session beans can remember anything from the previous business method call
d. Stateful session bean can interact with any database using JDBC
e. In the ejbPassivate method of a Stateful session bean, we should release any resources a bean may be holding.
Q. Assume an Entity Bean ‘AccountBean’ with Remote Interface ‘Account’, Home Interface ‘AccountHome’ and Primary Key Class ‘AccountPK’. What should the return value of the ejbCreate() signature in AccountBean be ?
a.AccountPK
b.Account
c.void
Q. Following are some statements about Message-driven beans.
1. A message-driven bean does not have a remote or home interface.
2. A message-driven bean can have only one business method.
3. A message-driven bean can send error messages to clients through Exceptions defines in the JMS API only.
4. A message-driven bean can be stateful or stateless.
5. A message-driven bean can find out the security identity of the message producer through deployment descriptor.
Which of the following combination is false?
a. 3, 4 and 5
b. 1, 4 and 5
c. 1, 3 and 4
d. 1, 3 and 5
e. 2, 3 and 5
Q) The transaction setting attribute for a bean is ‘Required’ in the Deployment Descriptor. A client calls this bean without starting its own transaction. Which of the following will occur ?–
a. The bean will start its new transaction and the transaction context will be returned to the client. The client now continues to execute in this Transaction Context.
b. The bean will start its new transaction but the transaction context will end when the beans business method ends its execution.
c. The bean will run without a transaction
d. An Exception will be thrown because the client called the bean without creating it’s own transaction
Q. Which of the following statements about EJB Deployment Descriptor are false?
a. Deployment Descriptor is used by containers to learn about various bean attributes like transactional characteristics, access control etc.
b. Deployment Descriptors, since they are in XML format are best suited for transporting enterprise beans back and forth between various systems.
c. Relationships between Entity Beans are stored in Deployment Descriptors.
d. EJBQL statements are written in Deployment Descriptors and not in the Entity Bean Java files.
- prat.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q. Which of the following are true regarding Stateful Session beans?
-a. Stateful Session beans can not have more than one ejbCreate methods
+ b. Stateful session beans serve only one client at a time
if bean==instance, "-" else. (bad quest.)
+c. Stateful session beans can remember anything from the previous business method call
here bean==instance, for sure.
+d. Stateful session bean can interact with any database using JDBC
why not?
-e. In the ejbPassivate method of a Stateful session bean, we should release any resources a bean may be holding.
not any
Q. Assume an Entity Bean �AccountBean� with Remote Interface �Account�, Home Interface �AccountHome� and Primary Key Class �AccountPK�. What should the return value of the ejbCreate() signature in AccountBean be ?
a. AccountPK
Q. Following are some statements about Message-driven beans.
+1. A message-driven bean does not have a remote or home interface.
+2. A message-driven bean can have only one business method.
onMessage
-3. A message-driven bean can send error messages to clients through Exceptions defines in the JMS API only.
no Exceptions
-4. A message-driven bean can be stateful or stateless.
-5. A message-driven bean can find out the security identity of the message producer through deployment descriptor.
no client, no identity.

Q) The transaction setting attribute for a bean is �Required� in the Deployment Descriptor. A client calls this bean without starting its own transaction. Which of the following will occur ?�
b. The bean will start its new transaction but the transaction context will end when the beans business method ends its execution.
Q. Which of the following statements about EJB Deployment Descriptor are false?
b. Deployment Descriptors, since they are in XML format are best suited for transporting enterprise beans back and forth between various systems.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope in the real test, there will be a clear discrimination between "bean" and "instance". Am I right??
reply
    Bookmark Topic Watch Topic
  • New Topic