public class SellerEJB extends Object implements SellerLocal, SellerRemote
Modifier and Type | Field and Description |
---|---|
private AuctionItemDAO |
auctionItemDAO |
private ConnectionFactory |
connFactory |
private SessionContext |
ctx |
private EntityManager |
em |
(package private) org.apache.commons.logging.Log |
log |
private PersonDAO |
sellerDAO |
private Destination |
sellTopic |
private TimerService |
timerService |
Constructor and Description |
---|
SellerEJB() |
Modifier and Type | Method and Description |
---|---|
void |
endAuction(long itemId) |
AuctionItem |
getItem(long id) |
protected Bid |
getWinningDTO(Bid winningBid,
AuctionItem item) |
void |
init() |
protected AuctionItem |
makeDTO(AuctionItem item) |
protected List<Bid> |
makeDTO(List<Bid> bids,
AuctionItem item) |
protected Person |
makeDTO(Person person,
Bid bid) |
protected void |
publishForSale(Session session,
AuctionItem item) |
protected void |
publishSold(Session session,
AuctionItem item) |
long |
sellProduct(String sellerId,
AuctionItem item) |
void |
timeout(Timer timer) |
org.apache.commons.logging.Log log
private ConnectionFactory connFactory
private Destination sellTopic
private TimerService timerService
private SessionContext ctx
private EntityManager em
private PersonDAO sellerDAO
private AuctionItemDAO auctionItemDAO
@PostConstruct public void init()
public long sellProduct(String sellerId, AuctionItem item) throws MarketException
sellProduct
in interface Seller
MarketException
protected void publishForSale(Session session, AuctionItem item) throws JMSException
JMSException
public AuctionItem getItem(long id) throws MarketException
getItem
in interface Seller
MarketException
protected AuctionItem makeDTO(AuctionItem item)
protected List<Bid> makeDTO(List<Bid> bids, AuctionItem item)
protected Bid getWinningDTO(Bid winningBid, AuctionItem item)
public void timeout(Timer timer)
public void endAuction(long itemId) throws MarketException
MarketException
protected void publishSold(Session session, AuctionItem item) throws JMSException
JMSException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.