Answered step by step
Verified Expert Solution
Link Copied!

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

  1. 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:

image text in transcribed

Figure 4

Solution:

public class MockTest {

public static void main(String[] args) {

}

}

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

}

}

Course +courseCode: String +title: String +credithours:int +semestercode:String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago