Recent Question/Assignment

The Assignment 3 Specification and Marking Criteria
Some Theoretical Issues in Enterprise Computing Architecture
In this assignment, you are to address some theoretical issues in the area of enterprise computing architecture. You will need to demonstrate your understanding of these theoretical issues or competence to apply these theoretical issues. These theoretical issues have been introduced by this unit through the textbook, weekly lectures or tutorials/labs. You will need to review these learning materials to address the following questions and prepare to do personal research if necessary.
Please note: copying from the unit learning materials or internet resources cannot show your understanding of the following issues, but may incur plagiarism or loss of marks. Thus, you will need to address the following issues in your own word with proper in-text citations and references if necessary.
Question 1 (4 Marks)
Answer the following questions that are related to JPA.
1. On completion of the lab projects of this unit, you have used a number of JPA configuration files persistence.xml. You have noticed that transaction-type=-RESOURCE_LOCAL (e.g. Week 1 project) or transaction-type=-JTA- (e.g. Week 5 project) is used in the configuration files. Describe the difference of using these JPA configuration properties.
2. Using Week 5 project as an example, @PersistenceContext(unitName =
-W5P1EJBModulePU-) is the only one in the source code that is referencing to a JPA persistence unit, and you haven’t seen any physical database names in the source code of the project. Describe how this logic name W5P1EJBModulePU is mapped to a physical database.
Question 2 (4 Marks)
Answer the following questions that are related to callbacks and listeners.
1. What are JPA callbacks and how are they driven?
2. Why do we need JPA listeners when callbacks and listeners are the same in functionality?
Question 3 (2 Marks)
Explain how an EJB container treats an EJB and a POJO differently and why EJB containers can support one of the Java EE goals: ease of use.
Question 4 (6 Marks)
The following is a Java class of simplified shopping cart, which has a number of attributes and methods.
public class Cart { private String customerName; private String customerAddress; private String contactNumber;
…… ……
private List String cartItems = new ArrayList String ();
…… ……
public String addItem (String str) {
if (!cartItems.contains(str)) { cartItems.add(str);
return new String(-The item has been added-); } else return new String(-The item already existed-); }
public String removeItem(String str) { if (cartItems.contains(str)) { cartItems.remove(str);
return new String(-The item has been removed-); } else return new String(-The item does not exist-);
}
……
……
}
Assume that the Cart object needs to be made into an EJB, which can be called remotely by EJB clients through a Java standalone application.
1. Write a remote interface for the EJB by using relevant annotations.
2. Use EJB annotations to modify the Cart object into an EJB.
3. Write a Java standalone application to call the addItem() method of the Cart EJB.
Note: to make your code concise, Java import statements are not required, and you can use any Java SE or EE APIs directly. You don’t need to provide Java source code files; you will need to provide the code in your assignment Word document.
Question 5 (8 marks)
On completion of the lab projects of Week 11, answer the following questions that are related to SOAP web service.
1. Explain the key difference between a web service application and a general client/server application
2. Describe the main components of WSDL document of web service by using the example CardValidator WSDL document.
3. Describe why WSDL document is important for creating a web service client.
4. What is the standard format of messages that are exchanged between a SOAP client and a SOAP server? In this example project, which object is transformed to that format and how is it recognised for such a transformation?
Question 6 (6 marks)
On completion of the lab projects of Week 12, answer the following questions that are related to JMS.
1. What is the key goal of messaging for enterprise computing?
2. To achieve the same goal in point 1 of this question, there are other Java technologies, list and describe 2 of these technologies.
3. Using JMS as the discussion context, describe what is asynchronous messaging and how to respond to asynchronous messages.
Submission
You will need to address the above issues (even if it is a programming question) in a Microsoft Word document. You must submit your assignment via the online submission system from the unit Moodle site. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted.
The Marking Criteria
Marking Criteria Available Marks
Question 1: ORM 4
1. Whether the transaction types are clearly differentiated 2
2. Whether the persistence unit to physical database mapping is clearly described 2
Question 2: Callbacks and Listeners 4
1. What are JPA callbacks and how are they driven 2
2. Why JPA listeners are useful when we have callbacks 2
Question 3: EJB Container 2
1. How an EJB container treats an EJB and a POJO differently 1
2. Why EJB containers can support the Java EE goal: ease of use 1
Question 4: EJB Remote Call 6
1. Whether the remote interface is correct 2
2. Whether the EJB is correct 2
3. Whether the client application is correct 2
Question 5: SOAP Web Service 8
1. Whether the key difference between web service application and client/server application is clearly described 2
2. Whether the key components of WSDL document are clearly described 2
3. Whether the role of WSDL for creating a web service client is clearly described 2
4. Whether the standard format of SOAP messages is 2
identified and explained clearly
Question 6: JMS 6
1. Why JMS is useful for enterprise computing 2
2. Whether the other 2 technologies are identified and clearly described 2
3. What is asynchronous messaging and how to respond to asynchronous messages 2
Subtotal for Assignment 3 30
Late Penalty -1.5 (5% ) for each calendar day (either full
or part)
Plagiarism Related Penalty
Total for Assignment 3