/** * Places an order */ @Asynchronous @Remove @Override public void placeOrder() { Order order = new Order(); order.setBidder(bidder); order.setItem(item); order.setShipping(shipping); order.setBilling(billing); try { bill(order); notifyBillingSuccess(order); order.setStatus(OrderStatus.COMPLETE); } catch (BillingException be) { notifyBillingFailure(be, order); order.setStatus(OrderStatus.BILLING_FAILED); } finally { saveOrder(order); } }
/** * Creates the account */ @Remove public void createAccount() { try { Statement statement = connection.createStatement(); String sql = "INSERT INTO BIDDERS(" + "username, " + "first_name, " + "credit_card_type" + ") VALUES (" + "'" + loginInfo.getUsername() + "', " + "'" + biographicalInfo.getFirstName() + "', " + "'" + billingInfo.getCreditCardType() + "'" + ")"; statement.execute(sql); statement.close(); } catch (SQLException sqle) { sqle.printStackTrace(); } }
@Remove public void save(@NotNull Long newsId, @NotNull String author, @NotNull String draft){ News news = em.find(News.class, newsId); if(news == null){ return; } Comment comment = new Comment(null, draft, author); em.persist(comment); news.getComments().add(comment); em.merge(news); }
/** * Cancels the account creation info */ @Remove public void cancelAccountCreation() { loginInfo = null; biographicalInfo = null; billingInfo = null; }
@RolesAllowed("Manager") @Remove public void deleteAccount() { this.account = null; this.name = null; balance = 0; }
@PreDestroy @Remove @PrePassivate public void remove() { this.account = null; this.em = null; this.queue = null; this.queueFactory = null; this.ctx = null; }
@Override @Remove public void stop() { try { onTerminate(); } catch (Exception ex) { LOG.warn("Error in onTerminate.", ex); } }
/** * @inheritDoc */ @Remove public Collection<Ticketbestellung> bezahleTickets(String email) throws KapazitaetErschoepftException { // suche nach einen Kunden anhand der �bergebenen email Adresse Kunde kunde = kundenverwaltung.getKundeByEmail(email); if (kunde == null) { // kunde gibt es nicht --> persistiere neuen Kunden kunde = new Kunde(); kunde.setEmail(email); em.persist(kunde); } else { // persistiere vorhandenen Kunden em.merge(kunde); } if ((ticketBestellungen != null) && (!ticketBestellungen.isEmpty())) { for (Ticketbestellung bestellung : ticketBestellungen) { Konzert konzert = bestellung.getKonzert(); konzert = em.find(Konzert.class, konzert.getId()); konzert.bestelleTickets(bestellung.getAnzahl()); em.merge(konzert); bestellung.setKonzert(konzert); bestellung.setKunde(kunde); em.persist(bestellung); } } benachrichtigungsService.installiereKonzerterinnerungen(email, ticketBestellungen); return ticketBestellungen; }
@Remove public void remove() { logger.info("the bean is removing"); }
@Remove public void remove() { registered = false; }
@Override @Remove /* termina la sessione */ public void close() { /* effettivamente, il contenitore termina la sessione */ }
@Remove @Override public void close() { }
@Remove public void end(){ }
@Remove public void clean() { logger.info("Remove Things"); numberOfAccess = 0l; }
@Remove @Override public void removeBean() { // TODO Auto-generated method stub }
@Remove @Override public void removeBean() { }
@Remove public void sayText(){ statelessTalker.saySomething(someText); }
@Remove public void destroy() { }
@Remove @Destroy public void destroy() {}
@Remove public void destroy() {}
@Remove public void remove() { items = null; }
@Remove public void checkout(int paymentId) { }
@Remove public void cancel() { }
@Remove public void remove() { System.out.println("ejbRemove"); }
@PreDestroy @Remove @PrePassivate public void remove() { this.agency = null; this.em = null; this.ctx = null; }
@Remove public void remove() { System.out.println("[CountBean] remove()"); }
@Remove public void remove() { System.out.println("[CountBean] @Remove"); }
@Remove() @Override @RolesAllowed("TutorialUser") public void remove() { contents = null; }
@Remove() @Override public void remove() { contents = null; }
/** * @inheritDoc */ @Remove public void verwerfeTicketbestellungen() { // TODO Auto-generated method stub }
@Remove public void removeBean() { }