RemoteCallback<Book[]> callback = new RemoteCallback()
{
public Book[] doRemote() throws RemoteException
{
IBookQuery query = getBookQuerySource().newQuery();
int count = query.ownerQuery(userPK, null);
return count == 0 ? null : query.get(0, count);
}
};
Book[] books = getRemoteTemplate().execute(callback, readBooksFailure());