Quiz Permalink:
https://www.jobilize.com/enterprise-javabeans-ejb
Question Permalink:
https://www.jobilize.com/stateless-session-bean-life-cycle-example
Question 49 / 57:  Suppose that an EJB client code is invoking the calculateSales() method on the SalesBean class.

Assuming the the bean is not instantiated yet by the container.

What could be printed from such invocation?

@Stateless

public class SalesBean implements SalesBeanLocal {

public SalesBean() {

System.out.println("Constructor");

}

public void calculateSales() {

System.out.println("calculateSales");

}

@PostConstruct

public void m1() {

System.out.println("PostConstruct");

}

@PreDestroy

public void m2() {

System.out.println("PreDestroy");

}

}

A  PostConstruct, Constructor, PreDestroy, calculateSales
B  Constructor, PostConstruct, calculateSales, PreDestroy
C  calculateSales, Constructor, PostConstruct, PreDestroy
D  Constructor, PostConstruct, PreDestroy, calculateSales
<< First < Previous Next > Last >>
Quiz Home Page
https://www.jobilize.com/enterprise-javabeans-ejb

Enterprise JavaBeans

Author:

Access: Public Instant Grading

Ask
Marion Cabalfin
Start Quiz
Caitlyn Gobble
Start Exam
Madison Christian
Start Quiz
Jill Zerressen
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/enterprise-javabeans-ejb" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>