<> Context â€“ An EJB context has all the information that is common to both the entity bean and the session.
<> InitialContext â€“ This is a constructor providing the initial context.
<> Session Context â€“ This has the required information for a session bean that it will need from a container.
Posted Date:- 2021-09-04 08:20:55
EJB has a mechanism called persistence. An EntityManager in EJB is a persistence interface that is used for performing operations like add, update, delete or find on a particular persistent entity. It is also used for executing queries through the Query interface.
Posted Date:- 2021-09-04 08:19:42
Yes, it is allowed in cases where data is not inserted by using Java application.
Posted Date:- 2021-09-04 08:18:36
No, more than one table cannot be mapped in a single CMP.
Posted Date:- 2021-09-04 08:17:55
Home Object reference is retrieved from the Naming Service via JNDI. Home Object reference is returned to the client. The steps are:
> Created a new EJB Object via Home Object interface.
> Created an EJB Object from the Ejb Object.
> Returned an EJB Object reference to the client.
> Invoked business method by using EJB Object reference.
> Delegate requested to Bean (Enterprise Bean).
Posted Date:- 2021-09-04 08:17:17
JavaDoc doclet, an open source is a doclet which generates good stuff related to EJB from comment tags of custom JavaDoc, which are embedded in the source file of EJB.
Posted Date:- 2021-09-04 08:15:28
It is legal technically, but static initializer blocks have been used in executing pieces of code before the final execution of any method or constructor when a class is instantiated.
Posted Date:- 2021-09-04 08:14:35
Enterprise JavaBeans can be accessed from Active Server Pages by:
<> â€˜Java 2 Platformâ€™
<> Enterprise Edition Client Access Services (J2EETM CAS) COM Bridge 1.0 which has been currently downloaded from the Sun Microsystems.
Posted Date:- 2021-09-04 08:13:57
If the entity bean is defined as re-entrant, then it is possible by multiple clients to associate with the Entity bean and get methods executed concurrently inside the entity bean. Synchronization is taken care of by container. There is an exception thrown when an entity beam is defined as non-re-entrant and numerous clients are connected to it concurrently to carry out a method.
Posted Date:- 2021-09-04 08:13:06
A persistent field is returned by the select method of an entity bean that is related. A remote or local interface is returned by the finder method.
Posted Date:- 2021-09-04 08:12:28
Server group copies are defined as clone. But unlike Server Groups, clones are linked by means of nodes.
Posted Date:- 2021-09-04 08:11:42
During runtime, when the changes made in the various properties of server group, are propagated in every associated clone, this process is known as Ripple Effect.
Posted Date:- 2021-09-04 08:11:07
When the contents having the memory of a single physical m/c are simulated in all m/c in that cluster, that process is called memory replication.
Posted Date:- 2021-09-04 08:10:01
When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown.
Posted Date:- 2021-09-04 08:09:26
The non-Unicode letter characters $ and _ may appear as the first character of an identifier
Posted Date:- 2021-09-04 08:08:43
By associating Checkbox objects with a CheckboxGroup.
Posted Date:- 2021-09-04 08:08:09
A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.
Posted Date:- 2021-09-04 08:07:33
The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause.
Posted Date:- 2021-09-04 08:06:41
The technologies embraced in J2EE are:
Enterprise JavaBeansTM (EJBsTM)
JavaServer PagesTM (JSPsTM)
The Java Naming and Directory InterfaceTM (JNDITM)
The Java Transaction API (JTA)
The JDBCTM data access API.
Posted Date:- 2021-09-04 08:05:52
The compiler supplies a default constructor for a class if no other constructors are provided.
Posted Date:- 2021-09-04 08:05:16
The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.
Posted Date:- 2021-09-04 08:03:48
The abs() method is used to calculate absolute values.
Posted Date:- 2021-09-04 08:03:18
The File class is used to create objects that provide access to the files and directories of a local file system.
Posted Date:- 2021-09-04 08:02:36
The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invoked by the AWT painting thread.
Posted Date:- 2021-09-04 08:02:07
The Collection interface provides support for the implementation of a mathematical bag - an unordered collection of objects that may contain duplicates.
Posted Date:- 2021-09-04 08:01:05
Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.
Posted Date:- 2021-09-04 08:00:38
An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
Posted Date:- 2021-09-04 07:59:37
The elements of a GridBad layout are of equal size and are laid out using the squares of a grid.
Posted Date:- 2021-09-04 07:59:15
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.
Posted Date:- 2021-09-04 07:58:40
The act of redeployment, deployment and un-deployment in Web logic when the server is running in EJB is called Hot Deployment.
Posted Date:- 2021-09-04 07:58:12
ACID is Atomicity, Consistency, Isolation and Durability.
1. Atomicity: Operations that are bundled together and projected a single unit of job.
2. Consistency: Guarantees that after a transaction has taken place, there will be consistency.
3. Isolation: Helps protect viewing of other simultaneous incomplete transaction results.
4. Durability: Ensures durability by keeping a transitional log by which the permanent data be recreated by again applying the steps involved.
Posted Date:- 2021-09-04 07:57:50
The JDK 1.02 event model uses an event inheritance or bubbling approach. In this model, components are required to handle their own events. If they do not handle a particular event, the event is inherited by (or bubbled up to) the component's container. The container then either handles the event or it is bubbled up to its container and so on, until the highest-level container has been tried. In the event-delegation model, specific objects are designated as event handlers for GUI components. These objects implement event-listener interfaces. The event-delegation model is more efficient than the event-inheritance model because it eliminates the processing required to support the bubbling of unhandled events.
Posted Date:- 2021-09-04 07:53:24
A method's throws clause must declare any checked exceptions that are not caught within the body of the method.
Posted Date:- 2021-09-04 07:52:59
The Java runtime system generates RuntimeException and Error exceptions.
Posted Date:- 2021-09-04 07:52:35
The ObjectInputStream class supports the reading of objects from input streams.
Posted Date:- 2021-09-04 07:51:59
A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method.
Posted Date:- 2021-09-04 07:51:38
Static variables are only ok if they are final. If they are not final, they will break the cluster. What that means is that if you cluster your application server (spread it across several machines) each part of the cluster will run in its own JVM.
Say a method on the EJB is invoked on cluster 1 (we will have two clusters â€“ 1 and 2) that causes value of the static variable to be increased to 101. On the subsequent call to the same EJB from the same client, a cluster 2 may be invoked to handle the request. A value of the static variable in cluster 2 is still 100 because it was not increased yet and therefore your application ceases to be consistent. Therefore, static non-final variables are strongly discouraged in EJBs.
Posted Date:- 2021-09-04 07:51:13
To have a consistent interface, so that there is no different interface that you need to implement for Stateful Session Bean and Stateless Session Bean.
Both Stateless and Stateful Session Bean implement javax.ejb.SessionBean and this would not be possible if stateless session bean is to remove ejbActivate and ejbPassivate from the interface.
Posted Date:- 2021-09-04 07:50:45
The garbage collector invokes an object's finalize() method when it detects that the object has become unreachable.
Posted Date:- 2021-09-04 07:50:08
This() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.
Posted Date:- 2021-09-04 07:49:52
A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items.
Posted Date:- 2021-09-04 07:49:34
The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
Posted Date:- 2021-09-04 07:49:13
When data that did not existed before is inserted, it is read as phantom whereas when data that already existed is changed, un-repeatable occurs.
Posted Date:- 2021-09-04 07:47:58
The interaction between the client and the bean is called conversational while where multi method conversations are not held with clients it is known as non-conversational interactions.
Posted Date:- 2021-09-04 07:47:35
A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.
Posted Date:- 2021-09-04 07:46:22
The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.
Posted Date:- 2021-09-04 07:46:02
During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.
Posted Date:- 2021-09-04 07:44:31
JNDI context: provides a mechanism to lookup resources on the network.
Initial Context: it provides initial context to resources.
Session Context:it has all the information available which is required to session bean from the container.
EjbContext:it contain information which is required to both session and entity bean.
Posted Date:- 2021-09-04 07:44:02
An EJB can be called within another EJB by using JNDI which can be used for locating the Home Interface and acquiring the instance.
Posted Date:- 2021-09-04 07:43:32
Yes, remove () can be a Stateless Session bean because the life remains the same till the method is executed.
Posted Date:- 2021-09-04 07:43:14