Enlist the contents of Container. Container contains?
Differentiate 'Stateful Session' from 'Entity Bean' ?
Which is more beneficial: Stateful or Stateless Bean?
Which is more beneficial: CMP or BMP?
How is consistency maintained by Stateful Session through transaction updates ?
Is ejbCreate () method mandatory while defining a Session Bean?
Define Context?
Define Initial Context?
Define SessionContext ?
Can remove () be a Stateless Session bean?
Is state maintained by a Stateless bean?
Can EJB made to handle multiple transactions?
Enlist the CallBack methods of Session Bean?
Enlist the CallBack methods of Entity Bean.
How can one EJB be called from within another EJB?
Differentiate Conversational from Non-conversational interactions?
Define ejb Create() and EjbPostCreate ()?
Define EAR, WAR and JAR ?
Differentiate Phantom from Un-repeatable?
Define ACID Properties?
What do you mean by 'Hot deployment' ?
How can a session bean be configured for transactions of bean-managed?
Enlist the technologies embraced in J2EE.
What do you mean Enterprise JavaBeans (EJB) container?
What do you mean by in-memory replication?
Define Ripple Effect?
Define Clone?
What do you mean by bean managed transaction?
Differentiate, "find a method" from "select method" in EJB ?
What do you mean by abstract schema?
What do you mean by re-entrant? Can you say that session beans as re-entrant? Can entity beans be specified as re-entrant?
What do you mean by EJB architecture?
Write the basic requirement of a CMP entity based class in 2.0 from EJB 1.1?
How can Enterprise JavaBeans be accessed from Active Server Pages?
Is having static initializer blocks legal in EJB?
What changes have been made in EJB 2.0 specifications?
What do you mean by EJBDoclet?
What do you mean by EJB QL?
How does EJB invocation take place?
Can more than a single table be mapped in CMP?
Are entity beans allowed to create () methods?
Ejb interview questions and answers on advance and basic Ejb with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Ejb also add your Questions if any you have to ask and for apply
in Ejb Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.
Top Ejb interview questions and answers for freshers and experienced
What is Ejb ?
Answer :
Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction of enterprise applications. The EJB specification is one of several [Java] APIs in the [Java EE] specification.
Questions : 1 :: What is EJB?
A server-side component, which manages the architecture for constricting enterprise applications and managed is called Enterprise JavaBeans(EJB).
Questions : 2 :: When was EJB developed?
EJB was developed by IBM in 1997.
Questions : 3 :: Who took over EJB?
EJB was taken over by Sun Microsystems in 1999.
Questions : 4 :: Enlist the Enterprise Beans types?
They are:
Session Beans: Expanded as “Stateful”,”Stateless” and “Singleton”, A Remote or Local interface is used to access the EJB files.
Message Driven Beans...View answers
Questions : 5 :: What were Entity Beans?
Entity Beans were presented in the earlier versions of EJB consisting of persistent data in distributed...View answers
Questions : 6 :: Enlist the Declarative Transaction types?
They are:
MANDATORY:
REQUIRED
REQUIRES_NEW
SUPPORTS
NOT_SUPPORTED
NEVER
Questions : 7 :: What are versions of EJB?
EJB 3.1
EJB 3.2
EJB 3.2 Final Release (2013-05-28)
EJB 3.1 Final Release (2009-12-10)
EJB 3.0 Final Release (2006-05-11)
EJB 2.1, Final Release (2003-11-24)
EJB 2.0 Final Release...View answers
Questions : 8 :: What is J2EE?
A collection of synchronized specifications and procedures, which enable solutions regarding deploying, developing supervising multi-tier server-centric applications, is called J2EE.
Questions : 9 :: Enlist the changes in EJB 2.1 ?
The changes made are:
Message Driven Beans (MDBs): messages are accepted from other sources besides JMS.
EJB Query Language: New functions had been added.
Web services supported.
EJB Timer...View answers
Questions : 10 :: Enlist the contents of Container. Container contains?
Security support: Used to configure Deployment Descriptor (DD)
Persistence support: Used to be persistence in transactions.
Transaction management support: Used to configure Deployment Descriptor...View answers
While both undergo activation and passivation; EB have ejbStore () callback to save state through passivation and ejbLoad () callback to load state through activation. But in case of SS, this is not...View answers
Questions : 12 :: Which is more beneficial: Stateful or Stateless Bean?
If a conversational state is needed then, Stateful mode is preferred while Stateless paradigm is preferred for a single business process.
Questions : 13 :: Which is more beneficial: CMP or BMP?
When “one to one” mapping is involved, and the data is stored persistently is regional database, CMP is preferred. But when no “one to one” mapping is there and data is...View answers
Questions : 14 :: How is consistency maintained by Stateful Session through transaction updates ?
The data consistency is maintained by updating their fields every time a commitment of the transaction is made.
Questions : 15 :: Is ejbCreate () method mandatory while defining a Session Bean?
EjbCreate () as being part of the bean’s lifecycle, therefore, it is not mandatory for ejbCreate () method to be present and there will be no errors returned by the compiler.
Questions : 16 :: Define Context?
This is a method of binding a name to a specific object by giving an interface like javax.naming.Context.
Questions : 17 :: Define Initial Context?
Implementation of available methods in the interface of context such as a context called javax.meaning.InitialContext.
Questions : 18 :: Define SessionContext ?
An EJBContext object, the SessionContext is used for accessing the information and container services.
Questions : 19 :: Can remove () be a Stateless Session bean?
Yes, remove () can be a Stateless Session bean because the life remains the same till the method is executed.
Questions : 20 :: Is state maintained by a Stateless bean?
A Stateless bean contains no-client specific state through client-invoked methods.
Questions : 21 :: Can EJB made to handle multiple transactions?
EJB can be made to handle multiple transactions by enabling multiple Entity beans to handle every database and one Session Bean to retain transaction with the Entity Bean.
Questions : 22 :: Enlist the CallBack methods of Session Bean?
public interface javax.ejb.SessionBean extends javax.ejb.EnterpriseBean { Public abstract void ejbCreate(); public abstract void ejbRemove(); Public abstract void ejbActivate ();...View answers
Questions : 23 :: Enlist the CallBack methods of Entity Bean.
public interface javax.ejb.EntityBean extends javax.ejb.EnterpriseBean { public abstract void ejbRemove(); public abstract void ejbActivate(); public abstract void...View answers
Questions : 24 :: How can one EJB be called from within another EJB?
An EJB can be called within another EJB by using JNDI which can be used for locating the Home Interface and acquiring the instance.
Questions : 25 :: Differentiate Conversational from Non-conversational interactions?
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...View answers
Questions : 26 :: Define ejb Create() and EjbPostCreate ()?
When the method is called before the persistence storage is written with the bean state, it is ejbCreate ().
When the method is called after the persistence storage is written with the bean state,...View answers
Questions : 27 :: Define EAR, WAR and JAR ?
JAR files contain all EJB classes.
WAR files contain all servlets, web component pages, gif, html, beans, applets, classes and classes.
EAR files contain both JAR and WAR files.
Questions : 28 :: Differentiate Phantom from Un-repeatable?
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.
Questions : 29 :: Define ACID Properties?
ACID is Atomicity, Consistency, Isolation and Durability.
Atomicity: Operations that are bundled together and projected a single unit of job.
Consistency: Guarantees that after a transaction has...View answers
Questions : 30 :: What do you mean by 'Hot deployment' ?
The act of redeployment, deployment and un-deployment in Web logic when the server is running in EJB is called Hot Deployment.
Questions : 31 :: How can a session bean be configured for transactions of bean-managed?
It can be done by setting transaction-attribute in the deployment sector or XML file.
Questions : 32 :: Enlist the technologies embraced in J2EE.
The technologies embraced in J2EE are:
Enterprise JavaBeansTM (EJBsTM)
JavaServer PagesTM (JSPsTM)
Java Servlets
The Java Naming and Directory InterfaceTM (JNDITM)
The Java Transaction API...View answers
Questions : 33 :: What do you mean Enterprise JavaBeans (EJB) container?
Enterprise JavaBeans container helps in managing the implementation of enterprise beans applications of J2EE.
Questions : 34 :: What do you mean by in-memory replication?
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.
Questions : 35 :: Define Ripple Effect?
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.
Questions : 36 :: Define Clone?
Server group copies are defined as clone. But unlike Server Groups, clones are linked by means of nodes.
Questions : 37 :: What do you mean by bean managed transaction?
If the Container is not wanted by the developer for managing transactions, every database operation can be implemented to write the suitable JDBC code.
Questions : 38 :: Differentiate, "find a method" from "select method" in EJB ?
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.
Questions : 39 :: What do you mean by abstract schema?
An element of an entity’s bean’s deployment descriptor that defines the persistent fields of bean’s and the relationship existing between them is known as Abstract Schema. It is...View answers
Questions : 40 :: What do you mean by re-entrant? Can you say that session beans as re-entrant? Can entity beans be specified as re-entrant?
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...View answers
Questions : 41 :: What do you mean by EJB architecture?
A non-visual component involving a transaction-oriented, distributed enterprise application is called Enterprise beans. They are characteristically deployed in containers of EJB and run on servers of...View answers
Questions : 42 :: Write the basic requirement of a CMP entity based class in 2.0 from EJB 1.1?
The basic requirement of a CMP is an abstract class which the container extends and gets the methods implemented required for managing the relationships.
Questions : 43 :: How can Enterprise JavaBeans be accessed from Active Server Pages?
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...View answers
Questions : 44 :: Is having static initializer blocks legal in EJB?
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.
Questions : 45 :: What changes have been made in EJB 2.0 specifications?
Changes that have been made in EJB 2.0 specification are:
JMS is integrated with EJB.
Message Driven Beans.
Implementing additional Business methods.
Questions : 46 :: What do you mean by EJBDoclet?
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.
Questions : 47 :: What do you mean by EJB QL?
A query language which provides navigation through a network comprising enterprise beans and objects which are dependent and are defined by methods of container managed persistence. EJB 2.0 was the...View answers
Questions : 48 :: How does EJB invocation take place?
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...View answers
Questions : 49 :: Can more than a single table be mapped in CMP?
No, more than one table cannot be mapped in a single CMP.
Questions : 50 :: Are entity beans allowed to create () methods?
Yes, it is allowed in cases where data is not inserted by using Java application.
Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website.
If you are using this website then its your own responsibility to understand the content of the website