public AccountDataBean login(String userID, String password) throws Exception { EntityManager entityManager = emf.createEntityManager(); AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new RuntimeException("No such user: " + userID); } /* * Managed Transaction */ entityManager.getTransaction().begin(); entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeJPADirect:login", userID, password); account.login(password); entityManager.getTransaction().commit(); if (Log.doTrace()) Log.trace("TradeJPADirect:login(" + userID + "," + password + ") success" + account); entityManager.close(); return account; }
public AccountDataBean login(String userID, String password) throws Exception { EntityManager entityManager = emf.createEntityManager(); AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new RuntimeException("No such user: " + userID); } /* * Managed Transaction */ entityManager.getTransaction().begin(); entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeJPADirect:login", userID, password); account.login(password); entityManager.getTransaction().commit(); if (Log.doTrace()) Log.trace("TradeJPADirect:login(" + userID + "," + password + ") success" + account); entityManager.close(); return account; }
public AccountDataBean login(String userID, String password) throws Exception { AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new RuntimeException("No such user: " + userID); } /* * Managed Transaction */ entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeJPADirect:login", userID, password); account.login(password); if (Log.doTrace()) Log.trace("TradeJPADirect:login(" + userID + "," + password + ") success" + account); return account; }
public AccountDataBean login(String userID, String password) throws Exception { AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new RuntimeException("No such user: " + userID); } /* * Managed Transaction */ entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeJPADirect:login", userID, password); account.login(password); if (Log.doTrace()) Log.trace("TradeJPADirect:login(" + userID + "," + password + ") success" + account); return account; }
public AccountDataBean login(String userID, String password) throws RollbackException { AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new EJBException("No such user: " + userID); } entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeSLSBBean:login", userID, password); account.login(password); if (Log.doTrace()) Log.trace("TradeSLSBBean:login(" + userID + "," + password + ") success" + account); return account; }
public AccountDataBean login(String userID, String password) throws RollbackException { AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class, userID); if (profile == null) { throw new EJBException("No such user: " + userID); } entityManager.merge(profile); AccountDataBean account = profile.getAccount(); if (Log.doTrace()) Log.trace("TradeSLSBBean:login", userID, password); account.login(password); if (Log.doTrace()) Log.trace("TradeSLSBBean:login(" + userID + "," + password + ") success" + account); return account; }