QuestionQuestion

1. Connection Pooling is vital for a large scale enterprise application. Why? Discuss.
2. Why is it a good idea to do the database initialization in the init() method rather than the doGet() or doPost()? Discuss.

You will be designing a simple database to support the web application that you have built and deployed so far. You can use an in-memory database or use a cloud based DB to store the registration and user data.

The database design is completely up to you but at a minimum you will need a User table, Course table and a Registration table.

Note: To validate the data insertion, make sure to retrieve the data from the DB and display it on the page (after the final “confirm” or “register” button). Example: Your final confirmation page shown below should be the user/registration data retrieved from the database.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

public class myRegistration {

    private final int employee = 850;
    private final int student = 1000;
    private final int other = 1350;
    private final int hotel_fee = 185;
    private final int parking = 10;

    private final String[] courseValues = {
       "webServices", "J2EEDesignPatterns",
       "serviceOrientedArchitectures", "enterpriseServiceBus",
       "secureMessaing", "webServicesSecurity"
    };

    private final String[] courseNames = {
       "A4-Web Services", "A1-J2EE Design Patterns",
       "A3-Service Oriented Architectures",
       "A4-enterprise Service Bus", "A6-Secure Messaging",
       "A5-Web Services Security"
    };

    private final String[] employmentValues = {
       "employee", "student", "speaker", "other"
    };

    private final int[] employmentFee = {
       850, 1000, 0, 1350
    };

    private final String[] employmentNames = {
       "Employee", "Student", "Speaker", "Other"
    };

    private final String[] additionalValues = {
       "hotelAccomodation", "parking", "noThankYou"
    };

    private final int[] additionalFee = {
       185, 10, 0
    };

    private final String[] additionalNames = {
       "Hotel Accomodation (Conference Guest Special Fee - Parking Included)",
       "Parking Permit", "None"
    };

    private String name;
    private String email;
    private ArrayList<String> courses;
    private String status;
    private String addition;
    // format total cost value to $
    NumberFormat formatter;

    private Connection con;

    public myRegistration() throws SQLException {
       courses = new ArrayList<>();
       formatter = NumberFormat.getCurrencyInstance();

       try {
            Class.forName("org.apache.derby.jdbc.ClientDriver");
            con
                   = DriverManager.getConnection(
                            "jdbc:derby://localhost:1527/assignment7",                           
                            "john", "1111111");

       } catch (ClassNotFoundException ex) {
            System.out.println(ex.getMessage());
       }
    }...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$73.00 $36.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats