1. Share Transactions 10%
At the heart of a share management system is a record of the purchases and sales of shares. You must therefore start by defining an entity bean representation of a share transaction. At a minimum you must record:
Company The name of the company shares. For our purposes, these should be limited to the following strings, since these are the only companies our technology oriented broker will deal in:
public static final String [ ] companies = {”Google” , ”Apple” , ”Oracle” , ”Microsoft”};
Amount How many shares were bought or sold, allowing for fractional amounts of shares to be allocated. To indicate that this was a sale, the amount should be a negative value.
。
Price Paid What price was paid per unit of share. Assume that we are buying and selling in dollars.
Purchase Date and Time On what date and time was the asset bought or sold?
These entity beans should be part of a persistence unit, and have an auto generated long as a primary key.
2. Share Transaction Manipulation 10%
You should implement a stateless Enterprise Java Bean (EJB) that provides a facade to the manipulation of the share transaction entities. At minimum, the EJB should allow for:
1. The creation and addition of new share transaction entities
2. The listing of all entities
3. The deletion of an entity by primary key
4. The listing of all share transactions by a particular company
Additional CRUD2 functionality may be needed depending on the ambition of your web application.
3 Portfolio Calculation 5%
You should implement an EJB that can calculate the current value of the shares held by the user. This EJB should utilise the ShareBroker service described be- low to locate the current price for each share. You may need to define additional classes to store the calculated totals for each asset and for transferring data to the manaed bean.
4. Share Broker Service 15%
The Share Broker service provides the capability to retrieve the current price for a company’s shares, to register a public key certificate so as to secure requests to purchase or sell shares. You should examine and include the attached Java interface and class definitions, and use these within your code so as to connect to the service over RMI as demonstrated in the lectures. If you choose the report option below, you will only have to use the getPrice method. You may wish to refer to the attached README comments for any advice as to how to deal with problems presented by your application server.
The share broker service will be available on the host [login to view URL] over RMI, but you are also provided with a jar file containing a stand-alone client. When run, this will start an RMI registry on port 3090, and the client on port 3091.
5. Portfolio Display 20%
You should provide one or more web pages using JSF that display the set of share transactions, allow for the deletion of a share transaction and provide a form to allow for the addition of new share transaction. You must provide a view of the current portfolio, including total shares held for each company, and their current value as provided by the ShareBroker.
6. Securing Access 10%
You should secure access to the portfolio management application, utilising the file realm, and only allow access to the application utilising secured http.
7. Final Part - Buying and Selling Shares 30%
Complete the programming of the system to provide for the buying and selling of shares, utilising the [login to view URL] code framework to generate and validate digital signatures.
To buy and sell shares through the remote sharebroker, the user must first reg- ister a public key certificate. The keystore can be created beforehand, utilising the keytool, or you are welcome to explore options for doing this programmat- ically. Once a certificate is found, this must be registered with the sharebroker, receiving in return a customer id, and the certificate containing the sharebroker’s certificate.
BID:80USD or 50GBPMAX