Java Web + EJB (EAD)
EAD-EJB- Assignment viết chương trình quản lý công ty
Question 1
You are required to create a table and insert data for company information as shown below:
| id | name | company_key | description | address | enabled |
|---|---|---|---|---|---|
| 1 | LL Bean | llbean | LL Bean | Maine | 1 |
| 2 | Apple | apple | Apple | California | 1 |
| 3 | EMC | emc | EMC | Massachusetts | 0 |
| 4 | Nike | nike | Nike | Oregon | 1 |
Using this information, create a remote SessionBean with the following functions (using JPA or another persistence framework for database operations):
- Create new company information
- Find company details by ID
- Update existing company information
Question 2
Create a Swing client application to call the methods from SessionBean in Question 1. You are free to design the UI, but it must meet the following requirements:
- Show all SessionBean data (company information) in a JTable
- Find a company by ID and display the result in JTextField and checkbox
- Update the selected company and refresh all data in the JTable
Question 3
Using JMS, develop an application that allows a Producer to send a MapMessage to a Consumer. The MapMessage should include:
- UserName: name of the sender (producer)
- Time: the current time when the message is sent
- Description: information about the UserName
Note: You must use MapMessage to meet the requirement. Any Queue or Topic is allowed.