EJB and COBOL Programming Quiz
Test your knowledge of Enterprise JavaBeans (EJB) 2.0 and COBOL/Unisys mainframe programming standards and operations.
Questions
General formate for an ECL statement
- @LABEL:COMMAND,OPTION(S)FIELD1,FIELD2..COMMENT
- @LABEL:OPTION(S)FIELD1,FIELD2,COMMAND..COMMENT
- @LABEL:OPTION(S)FIELD1,FIELD2,..COMMENT,COMMAND
- @COMMAND:LABEL,OPTION(S)FIELD1,FIELD2..COMMENT
Incorrect option for @ASG statements
- @ASG,UP
- @ASG,N
- @ASG,AR
- @ASG,T
Is not a COBOL verb
- ACCEPT
- MOVE
- FIND
- STRING
Following is a real program
- SEU12ABC
- TXI14IJK
- PHR10XYZ
- BOTH A and C
FURPUR stands for
- File Utility Routines/Process Utility Routines
- File Utility Run/Program Utility Routines
- File Utility Routines/Program Utility Routines
- File Utility Run/Process Utility Routines
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
- FURPUR
- ECL
- Exec
- processor call control statements
According to COBOL programming standard the PROGRAM-ID
- must be atleast 8 character name
- must be an 8-character descriptive name
- must be an 8 or more character descriptive name
- must be an less than 8-character descriptive name
Find the incorrect:
- IMPART-DEPART=0,Successful IMPART
- IMPART-DEPART=1,Successful IMPART
- IMPART-DEPART=2,Successful DEPART
- IMPART-DEPART=0,IMPART or DEPART not happened
The EJB container offers which of the following services?
- Security management
- Transaction management
- Load balancing
- Fault tolerance
Which of the following are true about an enterprise bean according to the EJB 2.0 spec?
- A bean cannot use java.net.Socket.
- A bean instance variable cannot be declared static and final.
- A bean cannot listen on a socket as a server.
- A bean cannot use the java.io package.
- A bean cannot use this in the body of a class method.
Which of the following are valid entries in the deployment descriptor?
- <env-entry-type> int </env-entry-type>
- <env-entry-type> short </env-entry-type>
- <env-entry-type> java.lang.Boolean</env-entry-type>
- <env-entry-type> java.lang.Character</env-entry-type>
Which of the following statements are true about locating or using the home interface of a session bean?
- Once acquired, the home interface can be used only once.
- Each instance of a session bean has its own EJBHome object.
- The InitialContext must be narrowed before it can be used to get the
- Only remote clients need to get the home interface; local clients can get to the
- The local client can use the home interface to remove the bean instance.
- None of the above.
Assuming L and R are the local and remote clients for session bean B, which of the following are true statements?
- L can pass its reference for B as a return value of a method call from R.
- R can pass its reference for B as a parameter in a method call to L.
- L cannot call methods on R. Doesn’t this depend on what R actually is, and where it is located
- L cannot call methods on B.
Which of the following statements are true about a session bean client?
- A local client can remove the bean by invoking a method on the home interface
- Only a remote client can use the remove() method in the component interface.
- A stateful session bean is created by the container when the client invokes a create() method on the home interface.
- 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.
- A remove call from a client on a stateless session bean instance results in removing the instance.
From which of the following methods can you call the isCallerInRole() method of the SessionContext?
- setSessionContext()
- ejbCreate() method of a stateless session bean
- ejbCreate() method of a stateful session bean
- None of the above
For a session bean, which of the following are the container’s responsibilities?
- Call ejbCreate().
- Implement javax.ejb.SessionBean.
- Implement javax.ejb.EJBContext.
- Implement ejbRemove().
- Implement setSessionContext().
Which of the following statements are true about a stateful session bean?
- An ejbRemove() call from the container removes the bean instance and puts it out for the garbage collector.
- An ejbCreate() call is made by the container only when a client invokes a create method.
- You can get the security information about a client from inside the ejbCreate() method.
- The container will call the setSessionContext() method only once.
- All of the above.
From which of the following methods can’t a stateful session bean access the methods of another bean?
- ejbRemove()
- ejbPassivate()
- setSessionContext()
- ejbCreate()
- None of the above
Which of the following statements show what happens when a client invokes a session bean instance that does not exist?
- javax.ejb.NoSuchObjectLocalException for the local client
- javax.ejb.NoSuchObjectException for the remote client
- javax.ejb.RemoveException
- javax.ejb.ObjectNotFoundException
- java.rmi.NoSuchObjectException for the remote client
Which of the following methods belong to the SessionContext interface, directly or by inheritance?
- ejbCreate()
- ejbActivate()
- create()
- setSessionContext()
- getRollbackOnly()
- getEJBHome()