Here is a list of commonly asked interview questions about EJB.
EJB stands for Enterprise JavaBean and is a widely-adopted server side component architecture for J2EE. It enables rapid development of mission-critical application
that are versatile, reusable and portable across middleware while protecting IT investment and preventing vendor lock-in.
Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. It increases the performance over the network. In this
case we call session bean which on turn call entity bean.
EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.
EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE
1. EJB components are server-side components written entirely in the Java programming language
2. EJB components contain business logic only – no system-level programming & services, such as transactions, security, life-cycle, threading, persistence, etc. are
automatically managed for the EJB component by the EJB server.
3. EJB architecture is inherently transactional, distributed, portable multi-tier, scalable and secure.
4. EJB components are fully portable across any EJB server and any OS.
5. EJB architecture is wire-protocol neutral–any protocol can be utilized like IIOP,JRMP, HTTP, DCOM,etc
Enterprise beans make use of the services provided by the EJB container, such as life-cycle management. To avoid
conflicts with these services, enterprise beans are restricted from performing certain operations: Managing or synchronizing threads
It’s certainly possible. In fact, there is an example that ships with the Inprise Application Server of an Account interface with separate implementations for
CheckingAccount and SavingsAccount, one of which was CMP and one of which was BMP.
No. To achieve this you have to deploy your EJB multiple times each specifying a different JNDI
Specify the transaction attribute of the bean as RequiresNew. Then as per section 220.127.116.11 of the EJB v 1.1 spec EJB container automatically starts a new transaction before the method call. The container also performs the commit protocol before the method result is sent to the client.