EJB and COBOL Programming Quiz

Test your knowledge of Enterprise JavaBeans (EJB) 2.0 and COBOL/Unisys mainframe programming standards and operations.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

General formate for an ECL statement

  1. @LABEL:COMMAND,OPTION(S)FIELD1,FIELD2..COMMENT
  2. @LABEL:OPTION(S)FIELD1,FIELD2,COMMAND..COMMENT
  3. @LABEL:OPTION(S)FIELD1,FIELD2,..COMMENT,COMMAND
  4. @COMMAND:LABEL,OPTION(S)FIELD1,FIELD2..COMMENT
Question 2 Multiple Choice (Single Answer)

Incorrect option for @ASG statements

  1. @ASG,UP
  2. @ASG,N
  3. @ASG,AR
  4. @ASG,T
Question 3 Multiple Choice (Single Answer)

Is not a COBOL verb

  1. ACCEPT
  2. MOVE
  3. FIND
  4. STRING
Question 4 Multiple Choice (Single Answer)

Following is a real program

  1. SEU12ABC
  2. TXI14IJK
  3. PHR10XYZ
  4. BOTH A and C
Question 5 Multiple Choice (Single Answer)

FURPUR stands for

  1. File Utility Routines/Process Utility Routines
  2. File Utility Run/Program Utility Routines
  3. File Utility Routines/Program Utility Routines
  4. File Utility Run/Process Utility Routines
Question 6 Multiple Choice (Single Answer)

A software program supplied by Unisys that processes user runs, controls files, manages system resources, and performs input/output operations for the user is called

  1. FURPUR
  2. ECL
  3. Exec
  4. processor call control statements
Question 7 Multiple Choice (Single Answer)

According to COBOL programming standard the PROGRAM-ID

  1. must be atleast 8 character name
  2. must be an 8-character descriptive name
  3. must be an 8 or more character descriptive name
  4. must be an less than 8-character descriptive name
Question 8 Multiple Choice (Single Answer)

Find the incorrect:

  1. IMPART-DEPART=0,Successful IMPART
  2. IMPART-DEPART=1,Successful IMPART
  3. IMPART-DEPART=2,Successful DEPART
  4. IMPART-DEPART=0,IMPART or DEPART not happened
Question 9 Multiple Choice (Multiple Answers)

The EJB container offers which of the following services?

  1. Security management
  2. Transaction management
  3. Load balancing
  4. Fault tolerance
Question 10 Multiple Choice (Multiple Answers)

Which of the following are true about an enterprise bean according to the EJB 2.0 spec?

  1. A bean cannot use java.net.Socket.
  2. A bean instance variable cannot be declared static and final.
  3. A bean cannot listen on a socket as a server.
  4. A bean cannot use the java.io package.
  5. A bean cannot use this in the body of a class method.
Question 11 Multiple Choice (Multiple Answers)

Which of the following are valid entries in the deployment descriptor?

  1. <env-entry-type> int </env-entry-type>
  2. <env-entry-type> short </env-entry-type>
  3. <env-entry-type> java.lang.Boolean</env-entry-type>
  4. <env-entry-type> java.lang.Character</env-entry-type>
Question 12 Multiple Choice (Multiple Answers)

Which of the following statements are true about locating or using the home interface of a session bean?

  1. Once acquired, the home interface can be used only once.
  2. Each instance of a session bean has its own EJBHome object.
  3. The InitialContext must be narrowed before it can be used to get the
  4. Only remote clients need to get the home interface; local clients can get to the
  5. The local client can use the home interface to remove the bean instance.
  6. None of the above.
Question 13 Multiple Choice (Multiple Answers)

Assuming L and R are the local and remote clients for session bean B, which of the following are true statements?

  1. L can pass its reference for B as a return value of a method call from R.
  2. R can pass its reference for B as a parameter in a method call to L.
  3. L cannot call methods on R. Doesn’t this depend on what R actually is, and where it is located
  4. L cannot call methods on B.
Question 14 Multiple Choice (Multiple Answers)

Which of the following statements are true about a session bean client?

  1. A local client can remove the bean by invoking a method on the home interface
  2. Only a remote client can use the remove() method in the component interface.
  3. A stateful session bean is created by the container when the client invokes a create() method on the home interface.
  4. A create call from a client on a stateless session bean may not result in creating any instance of the bean. The container can create stateless session bean instances before any call from the client.
  5. A remove call from a client on a stateless session bean instance results in removing the instance.
Question 15 Multiple Choice (Multiple Answers)

From which of the following methods can you call the isCallerInRole() method of the SessionContext?

  1. setSessionContext()
  2. ejbCreate() method of a stateless session bean
  3. ejbCreate() method of a stateful session bean
  4. None of the above
Question 16 Multiple Choice (Multiple Answers)

For a session bean, which of the following are the container’s responsibilities?

  1. Call ejbCreate().
  2. Implement javax.ejb.SessionBean.
  3. Implement javax.ejb.EJBContext.
  4. Implement ejbRemove().
  5. Implement setSessionContext().
Question 17 Multiple Choice (Multiple Answers)

Which of the following statements are true about a stateful session bean?

  1. An ejbRemove() call from the container removes the bean instance and puts it out for the garbage collector.
  2. An ejbCreate() call is made by the container only when a client invokes a create method.
  3. You can get the security information about a client from inside the ejbCreate() method.
  4. The container will call the setSessionContext() method only once.
  5. All of the above.
Question 18 Multiple Choice (Multiple Answers)

From which of the following methods can’t a stateful session bean access the methods of another bean?

  1. ejbRemove()
  2. ejbPassivate()
  3. setSessionContext()
  4. ejbCreate()
  5. None of the above
Question 19 Multiple Choice (Multiple Answers)

Which of the following statements show what happens when a client invokes a session bean instance that does not exist?

  1. javax.ejb.NoSuchObjectLocalException for the local client
  2. javax.ejb.NoSuchObjectException for the remote client
  3. javax.ejb.RemoveException
  4. javax.ejb.ObjectNotFoundException
  5. java.rmi.NoSuchObjectException for the remote client
Question 20 Multiple Choice (Multiple Answers)

Which of the following methods belong to the SessionContext interface, directly or by inheritance?

  1. ejbCreate()
  2. ejbActivate()
  3. create()
  4. setSessionContext()
  5. getRollbackOnly()
  6. getEJBHome()