1 package org.jboss.ejb3.test.servicedependency; 2 3 import javax.ejb.Remote ; 4 import javax.ejb.Stateless ; 5 6 import org.jboss.annotation.ejb.Depends; 7 8 import org.jboss.logging.Logger; 9 10 16 @Stateless 17 @Remote (Account.class) 18 public class AccountBean implements Account { 19 20 private static final Logger log = Logger.getLogger(AccountBean.class); 21 22 @Depends ("acme:service=uniqueid") 23 private UniqueIdMBean uniqueId; 24 25 public void debit(String account, int amount) 26 { 27 log.info("debiting " + amount + " swiss francs from account " + account); 28 log.info("transaction id: " + uniqueId.generate()); 29 } 30 } 31 | Popular Tags |