|
1. What is session Facade? 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. 2. What technologies are included in J2EE? The main technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data access API. 3. What is EJB role in J2EE? EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.
4. What is Enterprise JavaBeans (EJB) container? It manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. 5. What is the new basic requirement for a CMP entity bean class in 2.0 from that of ejb 1.1? It must be abstract class. The container extends it and implements methods which are required for managing the relationships 6. How can I access EJB from ASP? We can use the Java 2 Platform, Enterprise Edition Client Access Services (J2EETM CAS) COM Bridge 1.0, currently downloadable from Sun 7. How EJB Invocation happens? Step 1: Retrieve Home Object reference from Naming Service via JNDI. step 2: Return Home Object reference to the client. step 3: Create me a new EJB Object through Home Object interface. step 4: Create EJB Object from the Ejb Object step 5: Return EJB Object reference to the client. step 6: Invoke business method using EJB Object reference. step 7: Delegate request to Bean (Enterprise Bean). 8. What is the relationship between local interfaces and container-managed relationships? Entity beans that have container-managed relationships with other entity beans, must be accessed in the same local scope as those related beans, and therefore typically provide a local client view. In order to be the target of a container-managed relationship, an entity bean with container-managed persistence must provide a local interface. 9. Are enterprise beans allowed to use Thread.sleep()? 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 10. What are Local Interfaces? Describe. EJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally, that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.
|