21.Explain @javax.ejb.ActivationConfigProperty annotation.?@javax.ejb.ActivationConfigProperty annotation is used to specify properties required for a
message driven bean. For example end point, destination, message selector etc.
22.Explain @javax.ejb.PostActivate annotation.?@javax.ejb.PostActivate annotation is used to specify callback method of ejb lifecycle. This method will be called when EJB container just activated/reactivated the bean instance. This interface is used to expose the business methods to local clients which are running in same deployment/application as EJB. 23.What is Callback in EJB?Callback is a mechanism by which life cycle of an enterprise bean can be intercepted. EJB 3.0 specification has specified callbacks for which callback handler methods are to be created. EJB Container calls these callbacks. We can define callback methods in the ejb class itself or in a separate class. EJB 3.0 has provided many annotations for callbacks. 24.What are the callback annotations for stateless bean?Following is the list of callback annotations for stateless bean:
25.What are the callback annotations for stateful bean?Following is the list of callback annotations for stateful bean:
26.What are the callback annotations for message driven bean?Following is the list of callback annotations for message driven bean:
27.What are the callback annotations for entity bean?Following is the list of callback annotations for entity bean:
28.What is a timer service in EJB?Timer Service is a mechanism using which scheduled application can be build. For example, salary
slip generation on 1st of every month. EJB 3.0 specification has specified @Timeout annotation
which helps in programming the ejb service in a stateless or message driven bean. EJB Container
calls the method which is annotated by @Timeout. 29.Which annoatation is used to inject an ejb into another ejb?@EJB annotation is used to inject other EJB reference. 30.Which annoatation is used to inject an datasource into an ejb?@Resource annotation is used to inject an datasource into an ejb. 31.Which annoatation is used to inject singleton services like timer service into an ejb?@Resource annotation is used to inject singleton services like timer service into an ejb. 32.Which annoatation is used to inject SessionContext into an ejb?@Resource annotation is used to inject SessionContext into an ejb. 33.How EJB implements dependency injection?EJB 3.0 specification provides annotations which can be applied on fields or setter methods to inject dependencies. EJB Container uses the global JNDI registry to locate the dependency. 34.What is an EJB Interceptor?EJB 3.0 provides specification to intercept business methods calls using methods annotated with @AroundInvoke annotation. An interceptor method is called by ejbContainer before business method call it is intercepting. 35.What is class level interceptor in EJB?Class level interceptor is invoked for every method of the bean. Class level interceptor can be applied both by annotation or via xmlejb − jar. xml. 36.What is default interceptor in EJB?Default interceptor is invoked for every bean within deployment.Default interceptor can be applied only via xml ejb − jar. xml. 37.What is method level interceptor in EJB?Method level interceptor is invoked for a particular method of the bean. Method level interceptor can be applied both by annotation of via xmlejb − jar. xml. 38.Explain @Embeddable annotation.EJB 3.0 provides option to embed JAVA POJO PlainOldJavaObject into an entity bean and allows to map column names with the methods of the embedded POJO class. A java POJO to be embedded must be annotated as @Embeddable. 39.Explain @Lob annotation.EJB 3.0 provides support for Blob and Clob types using @Lob annotation. 40.Which types of java classes can be mapped using @Lob annotation?Following java types can be mapped using @Lob annotation:
|