/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package beans.lieferant; import beans.*; import beans.lager.LagerRemote; import beans.artikelManager.ArtikelManagerRemote; import beans.adressen.AdressenRemote; import exceptions.IllegalerWertException; import exceptions.UnbekanntesEntityException; import javax.ejb.EJB; import javax.ejb.Stateless; /** * * @author jmueller */ @Stateless(mappedName="LieferantBean") public class LieferantBean implements LieferantRemote { @EJB private ArtikelManagerRemote artikelManagerBean; @EJB private LagerRemote lagerBean; @EJB private AdressenRemote adressenBean; /** * bestellt eine bestimmte Anzahl von Artikeln nach * @param id die Id des Artikels * @param anzahl die Anzahl */ // TODO: Session Bean erstellen die die Adresse des Lieferanten für bestimmte // Artikel heraussucht public void bestelleNach(long id, long anzahl) throws UnbekanntesEntityException, IllegalerWertException{ System.out.println("Lieferant: bestelleNach("+id+","+anzahl+")"); lagerBean.bucheArtikelEin(id, anzahl); System.out.println("Bestellung erfolgt bei: " + adressenBean.getLieferantenAdresseFuerArtikel(id) ); } }