Package org.jboss.test.jca.bank.interfaces

Examples of org.jboss.test.jca.bank.interfaces.AccountLocalHome


         ps.setInt(1, id.intValue());
         ResultSet rs = ps.executeQuery();
         if (rs.next() == false)
            throw new NoSuchEntityException("Customer does not exist " + id.toString());
         this.name = rs.getString(1);
         AccountLocalHome ah = (AccountLocalHome)new InitialContext().lookup("AccountLocal");
         accounts = ah.findByCustomerId(id);

      }
      catch (Exception e)
      {
         throw new EJBException("Problem in ejbLoad: " +  e);
View Full Code Here


    */
   public int getAccountBalance(Integer id)
   {
      try
      {
         AccountLocalHome home = (AccountLocalHome)new InitialContext().lookup("AccountLocal");
         AccountLocal a = home.findByPrimaryKey(id);
         return a.getBalance();
      } catch (Exception e)
      {
         Logger.getLogger(getClass().getName()).info("getAccountBalance failed", e);
         throw new EJBException("Could not get account for id " + id, e);
View Full Code Here

TOP

Related Classes of org.jboss.test.jca.bank.interfaces.AccountLocalHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.