Package javax.ejb

Examples of javax.ejb.FinderException


            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            if (!set.next())
                throw new FinderException("Book " + bookId + " does not exist.");

            Object[] columns = new Object[Book.N_COLUMNS];
            result = convertRowToBook(set, columns);

        }
View Full Code Here


        // timer cache for optimization.

        TimerLocal timerBean = findTimer(timerId);
        if( timerBean.isCancelled() ) {
            // The timer has been cancelled within this tx.
            throw new FinderException("timer " + timerId + " does not exist");
        }

        return timerBean.getInfo();
    }
View Full Code Here

    private TimerState getPersistentTimer(TimerPrimaryKey timerId)
            throws FinderException {
        TimerState timer = timerLocal_.findTimer(timerId);
        if( timer == null || timer.isCancelled() ) {
            // The timer has been cancelled within this tx.
            throw new FinderException("timer " + timerId + " does not exist");
        }

        return timer;
    }
View Full Code Here

        TimerState timer = em.find(TimerState.class, timerId);
        // If timer is null need to throw a FinderException so
        // that the caller can handle it.
        if( timer == null) {
            throw new FinderException("timer " + timerId + " does not exist");
        }

        // First set the timer to the cancelled state.  This step is
        // performed whether or not the current server instance owns
        // the timer.
View Full Code Here

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            if (!set.next())
                throw new FinderException("Person #" + personId + " does not exist.");

            Object[] columns = new Object[Person.N_COLUMNS];
            result = convertRowToPerson(set, columns);

        }
View Full Code Here

            statement = assembly.createStatement(connection);

            set = statement.executeQuery();

            if (!set.next())
                throw new FinderException("Book " + bookId + " does not exist.");

            Object[] columns = new Object[Book.N_COLUMNS];
            result = convertRowToBook(set, columns);

        }
View Full Code Here

                }
            } finally {
                con.close();
            }
        } catch (final Exception e) {
            throw new FinderException("FindByPrimaryKey failed");
        }

        if (found) return primaryKey;
        else throw new javax.ejb.ObjectNotFoundException();
    }
View Full Code Here

                }
            } finally {
                con.close();
            }
        } catch (final Exception e) {
            throw new FinderException("FindByPrimaryKey failed");
        }

        if (keys.size() > 0) return keys;
        else throw new javax.ejb.ObjectNotFoundException();
    }
View Full Code Here

            } finally {
                con.close();
            }
        } catch (final Exception e) {
            e.printStackTrace();
            throw new FinderException("FindByPrimaryKey failed");
        }

        if (found)
            return primaryKey;
        else
View Full Code Here

                con.close();
            }
            return keys;
        } catch (final Exception e) {
            e.printStackTrace();
            throw new FinderException("FindAll failed");
        }
    }
View Full Code Here

TOP

Related Classes of javax.ejb.FinderException

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.