Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the class shown in the below Figure 4 and complete the missing code in the below class called MockTest.java. Instantiate the course object, set
- Consider the class shown in the below Figure 4 and complete the missing code in the below class called MockTest.java. Instantiate the course object, set the values as Course (ITSW3101, Application Software Development, 3 and FALL20) and save the object to the database. Use the persistence unit name as FL20_PU:
Figure 4
Solution:
public class MockTest {
public static void main(String[] args) {
}
}
- Write the appropriate annotations to turn the below MyEJBBean EJB in such a way that it can have only one instance per application. Also, which annotation you can apply to the below bean so that it will obtain an exclusive lock to the calling client and prevents all other clients from accessing all methods of the bean.
public class MyEJBBean {
public String getProductDetails(){
return "Return name from Database";
}
public void addProductDetails(String){
// code that save the name to Database
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started