Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

EJB Interview Questions and Answers For Freshers Part-4

Be First!
by December 18, 2015 EJB

ejb31.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.

32.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.

33.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 xml(ejb-jar.xml).

34.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).

35.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 xml(ejb-jar.xml).

36.Explain @Embeddable annotation.
EJB 3.0 provides option to embed JAVA POJO (Plain Old Java Object) 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.

37.Explain @Lob annotation.
EJB 3.0 provides support for Blob and Clob types using @Lob annotation.

38.Which types of java classes can be mapped using @Lob annotation?
Following java types can be mapped using @Lob annotation:

java.sql.Blob

java.sql.Clob

byte[]

String

Serializable Object

39.What is a transaction?
A transaction is a single unit of work items which follows the ACID properties. ACID stands for Atomic, Consistent,Isolated and Durable.

40.What ACID stands for?
ACID stands for Atomic, Consistent,Isolated and Durable.

(139)

Previous
Next

Leave a Reply