private Connection getConnection()
  {
    try
    {
      Context initial = new InitialContext();
      DataSource dataSource =
        (DataSource) initial.lookup("LocalOracleDS");
      return dataSource.getConnection();
    }
    catch (javax.naming.NamingException ne)
    {
      ne.printStackTrace();
      throw new EJBException(ne);
    }
    catch (java.sql.SQLException sqle)
    {
      sqle.printStackTrace();
      throw new EJBException(sqle);
    }
  }
public Collection ejbFindByOwnerName(String ownerName) throws FinderException {
    Connection con = null;
    try
    {
      con = getConnection();
      PreparedStatement statement =                   // Primary key info
              con.prepareStatement("SELECT SPORT, NICKNAME " +
                                   "FROM SPORTSTEAMS WHERE OWNERNAME = ? ");
      statement.setString(1, ownerName);
      ResultSet resultSet = statement.executeQuery();      LinkedList queryMatches = new LinkedList();
      while (resultSet.next()) {
        SportTeamPK pk = new SportTeamPK(resultSet.getString(1),
                                         resultSet.getString(2));
        queryMatches.add(pk);
      }      resultSet.close();
      statement.close();
      return queryMatches;
    }