Articles for SCBCD Java Upgrade CX310-092
Primary key of an entity class
A primary key is an identity in an entity class. Every entity bean must have a primary key that is unique for a class. A primary key can be of the following types:
Java primitive type
Primitive wrapper type
java.lang.String
java.util.Date
java.sql.Date A primary key has......
continue reading "Primary key of an entity class" »
Describe the life cycle of a message-driven bean.
The life cycle of a message-driven bean has two states, namely 'does not exist' and 'method-ready pool'. A message-driven bean does not maintain any client specific state. The container is responsible for maintaining the life cycle of a message-driven bean. It provides services such as......
continue reading "Describe the life cycle of a message-driven bean." »
Describe the life cycle of a stateful session bean.
The life cycle of a stateful session bean is shown in the following image:
A stateful session bean can have three states during its life as follows: Does not exist
Method ready
Passivated A stateful session bean must be annotated with the @stateful annotation or denoted in the......
continue reading "Describe the life cycle of a stateful session bean." »
Describe the life cycle of a stateless session bean.
A stateless session bean does not maintain any client specific information. It has only two states in its life cycle as shown below:
Does not exist
Method ready The container creates instances of a stateless session bean and keeps them in a pool of instances. When there is a method......
continue reading "Describe the life cycle of a stateless session bean." »
Explain the life cycle of an interceptor instance.
The life cycle of an interceptor instance depends on the bean class with which the instance is associated. An interceptor instance is created when a bean instance is created. Similarly, it is passivated, activated, or destroyed when, respectively, the associated bean instance is passivated,......
continue reading "Explain the life cycle of an interceptor instance." »
How does the JNDI locate the home interface of an enterprise bean?
To locate the home interface of an enterprise bean, the JNDI requires the following steps:
Create the JNDI naming context using the InitialContext class as follows:
Context ctx = new InitialContext()
Use the InitialContext reference to look up for the JNDI name as follows:......
continue reading "How does the JNDI locate the home interface of an enterprise bean?" »
What are application exceptions?
Application exceptions are thrown in an application to indicate a problem in the business logic of the application. All exceptions in EJB that are not subclasses of RuntimeException or RemoteException are application exceptions. All application exceptions are checked....
continue reading "What are application exceptions?" »
What are bi-directional relationships?
Bi-directional relationships have owning as well as inverse sides. These are different from unidirectional relationships, which have only owning sides. The updates made on the owning sides are reflected in the database. Bi-directional relationships are of the following types:
OneToOne......
continue reading "What are bi-directional relationships?" »
What are container-managed transactions?
Container-managed transactions are those in which the container is responsible for managing the transaction boundaries. Such transactions are also known as declarative transactions. To use a container-managed transaction, the transaction type must be specified in the deployment descriptor.......
continue reading "What are container-managed transactions?" »
What are environment entries?
Environment entries are declared by the bean provider in the deployment descriptor. Their values can be changed by the deployer at the deployment time. The values set by the deployer cannot be changed programmatically, as these are read-only values. These entries are represented in the deployment......
continue reading "What are environment entries?" »
| Includes | Free | Buy |
|---|---|---|
| Version | 8.00.05 | |
| Practice Tests | 1 | 5 |
| 30 | 380 | |
| Quiz | 15 | 150 |
| Final Test | No | Yes |
| Articles, How Tos.., Tips | Yes | Yes |
| Study Notes | 10 | 100 |

