0
Alien head

programming languages Online Quiz - 202

Description: programming languages Online Quiz - 202
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

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()


Correct Option: E,F

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


Correct Option: A,E

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


Correct Option: C

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.


Correct Option: E

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().


Correct Option: A,C

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


Correct Option: C

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.


Correct Option: C,D

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.


Correct Option: B,C

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.


Correct Option: F

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

  1. int

  2. short

  3. java.lang.Boolean

  4. java.lang.Character


Correct Option: C,D

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.


Correct Option: C,D

The EJB container offers which of the following services?

  1. Security management

  2. Transaction management

  3. Load balancing

  4. Fault tolerance


Correct Option: A,B

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


Correct Option: A

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


Correct Option: B

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


Correct Option: C

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


Correct Option: C

Following is a real program

  1. SEU12ABC

  2. TXI14IJK

  3. PHR10XYZ

  4. BOTH A and C


Correct Option: D

Is not a COBOL verb

  1. ACCEPT

  2. MOVE

  3. FIND

  4. STRING


Correct Option: C

Incorrect option for @ASG statements

  1. @ASG,UP

  2. @ASG,N

  3. @ASG,AR

  4. @ASG,T


Correct Option: B

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


Correct Option: A
+ View questions