Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java Part 2
« Previous
Next »
There is no default transaction attribute for an EJB.
Options
- False
- True
CORRECT ANSWER : True
Discussion Board
Transaction attribute
It is correct that there is no default transaction attribute however there is enum TranstactionAttributeType which is used with the TransactionAttribute to specify whether the methods of a session bean or message driven bean are called with a valid transaction context or not. Different states can be used for different beans and they are as follows:
1) REQUIRED and NOT_SUPPORTED values are used for a message-driven bean's message listener methods (or interface).
2) REQUIRED, REQUIRES_NEW and NOT_SUPPORTED values are used for an enterprise bean's timeout callback methods.
3) REQUIRED, REQUIRES_NEW, and NOT_SUPPORTED values are used for a session bean's asynchronous business methods.
4) REQUIRED, REQUIRES_NEW, and NOT_SUPPORTED values are used for a singleton session bean's PostConstruct and PreDestroy lifecycle callback interceptor methods.
Rohit Sharma 08-14-2014 07:46 PM
Stateless Session Bean
Stateless Session Beans doesn't have a conversational state with the client or they don't maintain a session with the client. When a client invokes a method then the stateless bean consists of instance variable only for that client for certain particular time. When the methods is finished for that client then the state for that client also ends. All instances of stateless bean except during method invocation, are equivalent, allowing the EJB container to assign an instance to any client. State of stateless bean is being transferred to all the clients.
It provides better scalability for applications which requires large number of clients. It can also be used to implement a web service that a stateful bean cannot.
Rohit Sharma 08-14-2014 07:39 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲