Java-EJB –HR interview questions
Q.What’s the relationship between Enterprise JavaBeans component architecture and CORBA?
Ans:The Enterprise JavaBeans specification is intended to support compliance with the range of CORBA standards, current and proposed.
A Bean’s remote and home interfaces are RMI compliant, and thus can interact with CORBA objects via RMI/IIOP, Sun and IBM’s forthcoming adaptation of RMI that conforms with the CORBA-standard IIOP protocol.
As a companion to the Enterprise JavaBeans specification, Sun Microsystems has defined a standard mapping from Enterprise Java Beans API to CORBA IDL.
JTA, the transaction API prescribed by the Enterprise JavaBeans specification for bean-managed transactions, is designed to layer easily over the OMG OTS transaction standard.
Q.What’s the relationship between Enterprise JavaBeans component architecture and XML technology?
Ans:The two technologies are complementary: Enterprise JavaBeans defines a standard for portable business logic and XML technology defines a standard for portable data.
Q.What’s the relationship between the Enterprise JavaBeans architecture and JTA?
Ans:The Enterprise JavaBeans architecture is intended to conceal transactional complexities from the component developer. Thus, developers and deployers writing to Enterprise JavaBeans architecture don’t need to access transaction management programmatically. However, in the case of bean- or client-managed transactions, the developer can call methods of JTA to initiate and complete transactions. JTA defines the Java programming language interfaces related to transaction management on the Java platform, conformant with the OMG/OTS standard.
Q.What’s the relationship between Enterprise JavaBeans and JDBC/SQLJ?
Ans:An entity bean can implement data persistence in one of two ways: bean-managed or container-managed. In the case of bean-managed persistence, the implementor of an entity bean stores and retrieves the information managed by the bean by means of direct database calls. For these, the bean can use either JDBC or SQLJ. The one tradeoff of this approach is that it makes it harder to adapt bean managed persistence to alternate data sources.
In the case of container-managed persistence, the container provider may implement access to the database using these APIs. The container provider can offer tools to map instance variable of an entity bean to calls to an underlying database. This approach makes it easier to use Beans with different databases.
Q.How does the Enterprise JavaBeans 2.0 Specification support messaging?
Ans:The EJB 2.0 Specification defines JMS support through a new type of enterprise bean, the message-driven bean. A message-driven bean is invoked by the EJB container as the result of the arrival of a JMS message. To a client, the message-driven bean is a JMS consumer that implements some business logic on the server. Clients communicate with message-driven beans by sending messages to a JMS Destination (either a Queue or a Topic) for which the message-driven bean is a MessageListener.
Message driven beans are distinct from both Entity and Session beans. They have neither home nor remote interfaces. Instead, they implement the javax.jms.MessageListener interface.
Q.What new features are provided to support container-managed persistence for Entity beans?
Ans:The EJB 2.0 Specification defines a new mechanism for modeling persistent data with Entity beans, and a new query language for Entity beans.
Features to support persistent data models include new abstract classes for both Entity beans and dependent objects. These classes can be implemented to define complex models for persistent data. EJB 2.0 also defines new deployment descriptor elements to define the^Mabstract schema supported by a bean. These allow the bean developer to specify the data model at development time, then allow a container’s deployment tools to automatically^Mgenerate the appropriate helper classes at deployment time. This provides additional platform-independence while supporting a richer representation of the data underlying an Entity bean.
Q.How does EJB 2.0 improve support for interoperability between EJB containers and other J2EE products?
Ans:The EJB 2.0 public draft specification includes requirements on EJB container/server providers which enable interoperability for invocations on enterprise beans. These requirements enable communication with J2EE clients including JavaServer Pages, Servlets, Application Clients as well as with enterprise beans in other EJB containers. The goal of these features is to allow enterprise bean invocations to work even when client components and enterprise beans are deployed in J2EE products from different vendors. Support for interoperability between components includes transaction propagation, naming services and security services.




Leave a Reply
You must be logged in to post a comment.