Shared Flashcard Set

Details

EJB Interview Qs
n/a
34
Computer Science
Undergraduate 1
05/25/2013

Additional Computer Science Flashcards

 


 

Cards

Term

What is EJB?

Definition
A technology that helps manage the server-side component architecture.
Term

What are the different types of EJBs?

(Hint: 3)

Definition
Session Bean, Entity Bean, & Message Driven Bean.
Term
What are Session Beans in EJBs?
Definition
An extension of the client's application that deals with business logic.
Term
What are Entity Beans in EJB?
Definition
An ORM for EJBs, concerned with Data Access Logic.
Term
What are Message Driven Beans?
Definition
An enterprise bean that allows applications to process messages asynchorously.
Term

What are the advantages of using EJBs?

(Hint: 5)

Definition

- May be accessed by a variety of clients.

- Can be accessed remotely.

- Are supported by a rich set of services.

- Makes it easier to build Business components.

- Provides reliability, robustness, scalability.

Term

What interface must be supplied to a client in order to access a Session bean in EJB?

(Hint: 2)

Definition

The Remote Home Interface and the Remote Interface.

Term

How would you make an interface Remote?

(Hint: 3)

Definition

- extend java.rmi.Remote

- Each method must throw RemoteException

- Arguments and return types must be shippable.

 

 

Term

Can Stateless Session Beans have multiple create() methods in Home Interface?

Definition
No, it must have one create() with no arguements.
Term

Can Stateful Session Beans have multiple create() methods in the Remote Home Interface?

Definition

Yes, they can have overloaded create() methods, and do not need to have a no-arg create().

Term

What is the difference between Stateless and Stateful Session Beans?

Definition

- A stateful bean remembers the client.

- A stateless bean forgets the client each time.

Term

What is a Remote Interface?

Definition
Exposes the methods of the bean outside the container.
Term

What is a Remote Home Interface?

Definition
It defines the bean's life-cycle methods which can be accessed outside the EJB container.
Term

What is a Local interface in EJB?

(Hint: not Remote)

Definition
It defines methods that can be used by other beans in the same EJB container.
Term

What is a Local Home interface?

Definition
It defines the life-cycle methods that can be used by other beans in the same EJB container.
Term

What is a Bean class in EJB?

Definition
The session or entity bean classes that implement the bean's business and life-cycle methods.
Term

What is an EJBObject?

Definition
An object that implements the remote and/or local interfaces of the EJB on the server side.
Term

What is an EJBHome?

Definition
It manages the bean's life-cycle and is responsible for locating, creating and removing enterprise beans.
Term

What data types can be passed as parameters or returned from EJBs?

(Hint: 3)

Definition

Primitives, Serializable types, RMI remote types

Term

What are the types of message models for MDBs?

(Hint: 2)

Definition

- Queue (Point-to-Point) behaves like a first-in-first-out (FIFO) queue.

- Topic (Publish-and-Subscribe) all MDBs in the pool get the message simultaneously.

Term

Are the parameters of methods defined in EJB Remote interface passed by value or passed by reference?

(Hint: 2)

Definition

- Serializable objects are passed by value.

- Objects that implement java.rmi.Remote are passed as remote references.

Term

What is the difference between Local and Distributed transactions in EJB?

Definition

- Local transaction has only one Resource Manager.

- Distributed transactions spans multiple resources that participate in one unified transaction.

Term

How did you manage transactions in EJBs?

(Hint: 2)

Definition

By using CMT or BMT.

(Container-Managed Transaction or Bean-Managed Transaction)

 

Term

What are the Transaction Attributes? (for CMT)

(Hint: 6)

Definition
Required, Requires New, Mandatory, Never, Supports, Not Supported.
Term

What are the Transactional attributes support by MDBs?

(Hint: 2)

Definition
Not Supported and Required.
Term

On what types of Exceptions will the container rollback the transaction in EJBs?

Definition
System Exceptions
Term

What API / Interface is used for BMT?

Definition
javax.transaction.UserTransaction
Term

What do the Transaction Isolation Levels do?

Definition

When a transaction is performed, access is restricted for other transactions.

Term

What are the characteristics/properties of a Transaction?

(Hint: 4)

Definition

Atomic, Consistent, Isolated, Durable

(ACID)

Term

How do you manage security in EJB?

(Hint: 2)

Definition

- Programmatic (bean-managed): defined in the bean.

- Declarative (container-managed): defined in deployment descriptor.

Term

What does a BMT do in EJB?

(Bean-Managed Transaction)

Definition
It allows you to explicitly state where the transaction starts, ends, commits, and rollsback.
Term

What does a CMT do?

(Container-Managed Transaction)

Definition
The Container starts, commits, and rolls back a transaction on our behalf. The container must be told how to manage the transaction by using deployment descriptors or annotations
Term
Identify each Transaction Isolation Level.
Definition
Read Uncommitted, Read Committed, Repeatable Read, and Serializable.
Term
What is the difference between authentication and authorization security in EJB?
Definition

- Authentication involves identifying who the caller of the EJB is.

- Authorization ensures only authenticated principals with right permission can access the components.

Supporting users have an ad free experience!