Term
For a RMI, describe the relation between the Client and Server. |
|
Definition
Client -> Stub -> Serialize -> Skeleton-> Server. |
|
|
Term
For a RPC, describe the relation between the Client and Server. |
|
Definition
Client -> Stub -> NRF -> Stub-> Server. |
|
|
Term
EJB deals exclusively with _____ logic. |
|
Definition
|
|
Term
What does the EJB container do? |
|
Definition
It takes care of everything.
(life-cycle, security, transaction, scalability) |
|
|
Term
Simply state what the JNDI does. |
|
Definition
It's a phone book for the server. |
|
|
Term
Describe the EJB life-cycle.
(Hint: 7) |
|
Definition
1. Client to JNDI -> JNDI lookup.
2. JNDI to Client -> returns Home interface reference.
3. Client to Home Interface -> call create().
4. a. Home Interface to Bean Class -> create instance of bean class.
b. Home Interface to Remote Obj <-> Create Remote Obj & return reference.
5. Home Interface to Client -> return reference of Remote reference.
6. Client to Remote Interface -> call business method.
7. Remote Interface to Bean Class -> Provide middleware services & call method. |
|
|
Term
Enterprise beans extend the ______ interface. |
|
Definition
|
|
Term
What is Synchronous messaging? |
|
Definition
When a request is sent, it has to wait for a response. |
|
|
Term
What is Asynchronous messaging? |
|
Definition
When a request is sent, it doesn't have to wait for a response. |
|
|
Term
What is the difference between a Enterprise Java Bean and a Java Bean. |
|
Definition
- A EJB is a complete framework.
- a Java Bean is a class with getters and setters. |
|
|
Term
What does the Business Delegate do? |
|
Definition
It delegates the client call to the business layer. |
|
|
Term
What kind of messaging does the Session bean have. |
|
Definition
|
|
Term
What kind of messaging does the MDB have? |
|
Definition
|
|
Term
Between Entity Bean and Session Bean, which can be consider a noun and and which a verb. |
|
Definition
- Session bean – verb.
- Entity bean – noun. |
|
|
Term
What are the two types of Entity Beans? |
|
Definition
CMP and BMP.
(Container/Bean-Managed Persistence) |
|
|
Term
What are the two states a Session bean can have? |
|
Definition
|
|
Term
Define the Stateless state of a Session bean. |
|
Definition
The server will forget the client after each transaction. |
|
|
Term
Define the Stateful state of a Session bean. |
|
Definition
The server will remember the client after a transaction. |
|
|
Term
For a MDB, describe the relation between the Client and Server. |
|
Definition
Client -> JMS -> EJB Container
(EJB Container is a part of the App Server) |
|
|
Term
What are the rules of a MDB?
(Hint: 2) |
|
Definition
1. Override onMessage().
2. No Home or Remote Interface. |
|
|
Term
|
Definition
|
|
Term
Describe what the JMS does. |
|
Definition
It listens to see what message mode should be implemented (Topic or Queue). |
|
|
Term
How does Topic deal with messages? |
|
Definition
(Publishes and subscribes)
It subscribes the message, so that anyone can take it. |
|
|
Term
How does Queue deal with messages? |
|
Definition
(First-In First-Out) First bean created in the pool gets the message. |
|
|
Term
Define Transactions in EJBs. |
|
Definition
A grouping of tasks that must be processed as an inseparable unit, which must succeed or fail as a whole. |
|
|
Term
Define the Transaction Property Atomic. |
|
Definition
All or nothing. If a transaction is interrupted, all previous steps within the transaction are undone. |
|
|
Term
Define the Transaction Property Consistent. |
|
Definition
The data stays consistent with the business logic. |
|
|
Term
Define the Transaction Property Isolated. |
|
Definition
What happens within one transaction should not affect or be visible within another transaction. |
|
|
Term
Define the Transaction Property Durable. |
|
Definition
It means that data is not lost in system crashes. |
|
|
Term
Define the Transaction Attribute Mandatory. |
|
Definition
A transaction must already exists.
( none -> error)(t1 -> t1) |
|
|
Term
Define the Transaction Attribute Never. |
|
Definition
A transaction context must not exist; if one exists an error wil occur.
(none -> none)(t1 -> error) |
|
|
Term
Define the Transaction Attribute Not Supported. |
|
Definition
Transactions not supported; if provided, ignored.
( none -> none)(t1 -> none) |
|
|
Term
Define the Transaction Attribute Supported. |
|
Definition
Supports the preexisting transaction eviroment.
(none -> none)(t1 -> t1) |
|
|
Term
Define the Transaction Attribute Required. |
|
Definition
A transaction is required; if it doesn't exist, one is made.
(t1 -> t1)(none -> t2).
|
|
|
Term
Define the Transaction Attribute Requires New. |
|
Definition
A new transaction will always be made.
(t1 -> t2)(none -> t2). |
|
|
Term
What is the life-cycle of a Stateless Session Bean? |
|
Definition
Does Not Exist <--> Ready State |
|
|
Term
What is the life-cycle of a Stateful Session Bean? |
|
Definition
Does not exist <--> Ready state <--> Passive state |
|
|
Term
What are the benefits of an application server? |
|
Definition
- Resource Management (instance pooling/swapping, activation)
- Primary Services (concurrency, transactions, persistence) |
|
|
Term
What is the difference between a component and a container? |
|
Definition
- A component (framework) provides basic services and resides within the container.
- A container intercepts communication between client and component, and controls the components. |
|
|
Term
What does the Remote Interface extend? |
|
Definition
|
|
Term
What does the Remote Home Interface extend? |
|
Definition
|
|
Term
What does EJBObject extend? |
|
Definition
|
|
Term
A Session Bean must implement what interface and what method? |
|
Definition
- javax.ejb.SessionBean
- ejbCreate() |
|
|
Term
|
Definition
It is a small API that exposes the transaction manager layer. |
|
|
Term
What are the Transaction problems?
(Hint: 3) |
|
Definition
Dirty Read, Non-Repeatable, Phantom Read. |
|
|
Term
What is the Transaction problem Dirty read? |
|
Definition
Occurs when a user sees some uncommitted transactions from another user. |
|
|
Term
What is the Transaction problem Non-Repeatable? |
|
Definition
Occurs when a user is allowed to change data employed by another user in a separate transaction. |
|
|
Term
What is the Transaction problem Phantom read? |
|
Definition
Occurs when a user receives inconsistent results in two different attempts of the same query. |
|
|
Term
What are the Isolation levels?
(Hint: 4) |
|
Definition
Read Uncommitted, Read Committed, Repeatable Read, and Serializable.
(Weakest -> Strongest) |
|
|
Term
What does the Isolation level Read Uncommitted do? |
|
Definition
Nothing, it has no isolation level. |
|
|
Term
What does the Isolation level Read Commited do? |
|
Definition
|
|
Term
What does the Isolation level Repeatable Read do? |
|
Definition
A write lock, it solves dirty read and non-repeatable read. |
|
|
Term
What does the Isolation level Serializable do? |
|
Definition
A read & write lock, it solves dirty read, non-repeatable read, and phantom read. |
|
|
Term
Transaction management support in EJB is provided by what? |
|
Definition
Provided by the JTA (Java Transaction API). |
|
|
Term
What are the implicit services EJBs support?
(Hint: 6) |
|
Definition
Transactions, Security, Lifecycle, Concurrency, Persistence, Remote Access. |
|
|
Term
|
Definition
A component/framework that provides services for transactions, security, and automated persistence. |
|
|
Term
What is a Resource Manager? |
|
Definition
The component that takes care of transactions for a particular resource. |
|
|
Term
What is the Deployment Descriptor in EJB? |
|
Definition
|
|
Term
|
Definition
You must explicitly write the peresistence logic in the bean class. |
|
|
Term
|
Definition
Responsibility for the persistence is delegated to the EJB container, allowing the business logic to be focused upon. |
|
|
Term
What is WebLogic's default transaction attribute? |
|
Definition
|
|
Term
What is the Entity Bean life-cycle? |
|
Definition
Does Not Exist <--> Pooled <--> Ready |
|
|
Term
What is a local transaction? |
|
Definition
When a application attaches to a single resource, like a database. |
|
|
Term
What is a distributed transaction? |
|
Definition
When an application uses multiple resources it combines all resources ianto a single transaction. |
|
|