Exercice 2

Skip to first unread message

Luciano Sousa

Aug 30, 2013, 8:04:28 AM8/30/13
to cdiadv...@googlegroups.com
Exercise for the reader. Change the injection point qualifiers to make only the StandardAtmTransportget injected. Send me your solution on the CDI group mailing list. Don't get discouraged if you get a stack trace or two that is part of the learning process. The first one to send gets put on the CDI wall of fame (everyone else gets an honorable mention).

My solution:
public class StandardAtmTransport implements ATMTransport {
    public void communicateWithBank(byte[] datapacket) {
        System.out.println("communicating with bank via Standard transport");
public class AutomatedTellerMachineImpl implements AutomatedTellerMachine {
private ATMTransport transport;

Reply all
Reply to author
0 new messages