Interview Questions.

Top 100+ Ejb(enterprise Javabeans) Interview Questions And Answers

fluid

Top 100+ Ejb(enterprise Javabeans) Interview Questions And Answers

Question 1. What Is The Difference Between Ejb And Java Beans?

Answer :

EJB is a specification for J2EE server, no longer a product.
Java beans can be a graphical thing in IDE.

Question 2. What Is Ejb Role In J2ee?

Answer :

EJB generation is the core of J2EE. It enables developers to jot down reusable and transportable server-facet enterprise logic for the J2EE platform.

J2EE Interview Questions
Question 3. What Is Enterprise Javabeans (ejb) Container?

Answer :

1.It manages the execution of agency beans for J2EE packages.
2.Enterprise beans and their field run at the J2EE server.

Question 4. What Is In-memory Replication?

Answer :

The manner by means of which the contents in the memory of one physical m/c are replicated in all the m/c inside the cluster is called in-memory replication.

J2EE Tutorial
Question five. What Is Ripple Effect?

Answer :

The method of propagating the adjustments in the properties of a server organization at some point of runtime to all of the associated clones is referred to as Ripple Effect.

Core Java Interview Questions
Question 6. What Is A Clone?

Answer :

The copies of a server group are known as Clones. But not like a Server Group Clones are related to a node and are real server procedure going for walks in that node.

Question 7. What Are The Types Of Scaling?

Answer :

There are two forms of scaling: Vertical Scaling and Horizontal Scaling.
Vertical Scaling - When more than one server clones of an software server are described at the identical physical m/c, it's far called Vertical Scaling. The objective is to apply the processing energy of that m/c more efficaciously.
Horizontal Scaling - When Clones of an application server are described on a couple of physical m/c, it is known as Horizontal Scaling. The goal is to apply more than one less effective m/c greater efficiently.

Core Java Tutorial JDBC Interview Questions
Question 8. What Is A Server Group?

Answer :

A server institution is a template of an Application Server(and its contents) i.E, it's far a logical illustration of the software server. It has the same shape and attributes because the actual Application Server, but it isn't always associated with any node, and does not correspond to any actual server manner strolling on any node.

Question nine. What Is The New Basic Requirement For A Cmp Entity Bean Class In 2.0 From That Of Ejb 1.1?

Answer :

It need to be summary elegance. The box extends it and implements strategies which might be required for coping with the relationships

JSP Interview Questions
Question 10. What’s New In The Ejb 2.Zero Specification?

Answer :

Following are some of the principle features supported in EJB 2.Zero:
1. Integration of EJB with JMS.
2. Message Driven Beans.
Three. Implement additional Business strategies in Home interface which aren't specific for bean instance, EJB QL.

JDBC Tutorial
Question eleven. How Can I Access Ejb From Asp?

Answer :

We can use the Java 2 Platform, Enterprise Edition Client Access Services (J2EETM CAS) COM Bridge 1.0, presently downloadable from Sun

Android Interview Questions
Question 12. What Is The Relationship Between Local Interfaces And Container-controlled Relationships?

Answer :

Entity beans which have field-controlled relationships with other entity beans, need to be accessed in the identical nearby scope as the ones related beans, and therefore generally offer a nearby customer view. In order to be the goal of a box-managed dating, an entity bean with container-controlled staying power ought to provide a local interface.

J2EE Interview Questions
Question 13. What Is Ejbdoclet?

Answer :

EJBDoclet is an open source JavaDoc doclet that generates a number of the EJB associated source files from custom JavaDoc feedback tags embedded within the EJB source file.

JSP Tutorial
Question 14. What Is The Difference Between Session And Entity Beans?

Answer :

An entity bean represents continual worldwide facts from the database; a session bean represents temporary consumer-particular facts so that it will die whilst the consumer disconnects (ends his session). Generally, the session beans implement commercial enterprise strategies (e.G. Bank.TransferFunds) that name entity beans (e.G. Account.Deposit, Account.Withdraw)

Question 15. Is It Legal To Have Static Initializer Blocks In Ejb?

Answer :

Although technically it is prison, static initializer blocks are used to execute some piece of code earlier than executing any constructor or approach whilst instantiating a class. Static initializer blocks are also commonly used to initialize static fields - which can be illegal in EJB if they are read/write - In EJB this could be carried out with the aid of which includes the code in both the ejbCreate(), setSessionContext() or setEntityContext() strategies

JMS(Java Message Service) Interview Questions
Question sixteen. What Are Transaction Isolation Levels In Ejb?

Answer :

1. Transaction_read_uncommitted- Allows a method to read uncommitted information from a DB(fast however now not wise).
2. Transaction_read_committed- Guarantees that the statistics you have become has been dedicated.
3. Transaction_repeatable_read - Guarantees that every one reads of the database could be the equal in the course of the transaction (precise for examine and replace operations).
Four. Transaction_serializable- All the transactions for useful resource are carried out serial.

Android Tutorial
Question 17. Can Entity Beans Have No Create() Methods?

Answer :

Yes. In a few cases the information is inserted NOT using Java application, so you might also only need to retrieve the information, carry out its processing, but not create your personal information of this type.

JavaServer Faces (JSF) Interview Questions
Question 18. What Is Software Architecture Of Ejb?

Answer :

Session and Entity EJBs consist of four and 5 elements respetively:
1. A faraway interface (a customer interacts with it).
2. A home interface (used for creating items and for maintaining business methods).
Three. A bean item (an item, which really plays enterprise common sense and EJB-precise operations).
Four. A deployment descriptor (an XML file containing all data required for keeping the EJB) or a fixed of deployment descriptors (if you are using some box-precise capabilities).
Five.A Primary Key class - is handiest Entity bean unique.

Core Java Interview Questions
Question 19. What Is Ejb Ql?

Answer :

1.EJB QL is a Query Language supplied for navigation across a network of business enterprise beans and structured gadgets defined by way of container controlled staying power.
2.EJB QL is brought within the EJB 2.Zero specification.
Three.The EJB QL query language defines finder techniques for entity beans with field controlled endurance and is portable across containers and persistence managers.
4.EJB QL is used for queries of two forms of finder techniques:
               Finder methods that are described within the domestic interface of an entity bean and which go back entity gadgets.Select methods, which aren't uncovered to the consumer, however that are used by the Bean Provider to choose chronic values which can be maintained by way of the Persistence Manager or to choose entity objects which are associated with the entity bean on which the question is described.

JavaServer Faces (JSF) Tutorial
Question 20. How Ejb Invocation Happens?

Answer :

Steps:
1: Retrieve Home Object reference from Naming Service through JNDI.
2: Return Home Object reference to the patron.
Three: Create me a brand new EJB Object through Home Object interface.
4: Create EJB Object from the Ejb Object
five: Return EJB Object reference to the patron.
6: Invoke enterprise approach the use of EJB Object reference.
7: Delegate request to Bean (Enterprise Bean).

 

Java collections framework Interview Questions
Question 21. What Are The Call Back Methods In Entity Bean?

Answer :

Callback techniques allows the box to inform the bean of events in its life cycle. The callback techniques are defined in the javax.Ejb.EntityBean interface.

Question 22. What Is Message Driven Bean?

Answer :

1.An MDB is basically a message consumer that may listen to a message vacation spot or a message endpoint and receives activated whilst a message arrives.
2.By design, MDBs are nameless in nature and hence can't be directly invoked with the aid of a client.
3.The best way to invoke an MDB is to ship a message to the destination or endpoint to which it is listening.
4. As MDBs are stateless in nature and are not related to any specific patron, they can be pooled for concurrent processing of messages.

 

Java eight Tutorial
Question 23. What Are The Services Provided By Container?

Answer :

Container offerings are totally relies upon upon the “seller implementation”. But more or much less maximum of the providers suppots the fundamental offerings like,
LifeCycle Management - It is Automatic.
Session Management - it is used by Developer coded callback techniques…
Transaction Management - it's miles used by configuring deployment descriptor (DD) .
Security management - it's miles used by configuring deployment descriptor (DD) .
The different offerings, if any could be in superior variations, and depends on Vendor unique.

Java 8 Interview Questions
Question 24. What Is Deployment Descriptor?

Answer :

Deployment descriptor is a XML record. That's used to locate the net applicatio n by way of box.It includes the details of respective bean.

JDBC Interview Questions
Question 25. How Many Ejb Objects Are Created For A Bean?

Answer :

For a Session bean - one EJB item for one bean instance.
For entity bean - it depends , if 2 users are accessing one row at time then one EJB item is used for each the beans different smart for every bean one EJB item.

JAVA Persistence API (JPA) Tutorial
Question 26. What Is Re-entrant. Is Session Beans Reentrant. Is Entity Beans Reentrant?

Answer :

If we define the entity bean as being reentrant, more than one customers can hook up with the Entity bean & execute methods inside the entity bean concurrently. Container takes care of synchronization. If we outline the entity bean as non-reentrant and plenty of customers connect with it concurrently to execute a method, exception is thrown .

 

Java Collections Interview Questions
Question 27. What Is Ejb Client Jar File?

Answer :

An EJB client JAR record is an optional JAR file that could comprise all of the class documents that a client application wishes to use the consumer view of the corporation beans which can be contained inside the EJB JAR record. If you make a decision not to create a patron JAR record for an EJB module, all of the consumer interface instructions could be inside the EJB JAR record.

JSP Interview Questions
Question 28. What Is Ejb Container?

Answer :

An EJB field is a run-time surroundings that manages one or more agency beans. The EJB box manages the existence cycles of company bean gadgets, coordinates allotted transactions, and implements item security. Generally, every EJB container is provided by way of an EJB server and contains a hard and fast of organization beans that run at the server.

 

Question 29. What Is Remote Client View?

Answer :

1.The far flung customer view specification is most effective to be had in EJB 2.0.
2. The far off customer view of an employer bean is vicinity impartial.
Three.A customer going for walks within the equal JVM as a bean example uses the same API to get admission to the bean as a purchaser running in a distinct JVM on the identical or unique device.
Remote interface: The far off interface specifies the far flung commercial enterprise methods that a client can name on an organisation bean.
Remote domestic interface: The faraway domestic interface specifies the strategies utilized by far flung clients for finding, developing, and disposing of instances of enterprise bean training.

 

Java Exception Handling Interview Questions
Question 30. What Is Local Client View?

Answer :

1.The neighborhood customer view specification is best to be had in EJB 2.Zero. Unlike the faraway customer view, the nearby client view of a bean is area dependent.
2.Local patron view get admission to to an company bean calls for each the local consumer and the enterprise bean that offers the nearby purchaser view to be in the same JVM.
Three.The neighborhood consumer view consequently does now not offer the place transparency provided by means of the faraway patron view. Local interfaces and nearby domestic interfaces provide help for light-weight get admission to from employer bean which are local customers.
Four.Session and entity beans can be tightly couple with their customers, permitting get right of entry to without the overhead usually related to far flung technique calls.




CFG