return;
Visit visit = getVisitState();
Integer userId = visit.getUserId();
VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
attributes.put("ownerId", userId);
attributes.put("holderId", userId);
int i = 0;
while (true)
{
try
{
IOperations operations = vengine.getOperations();
if (publisherId != null)
operations.addBook(attributes);
else
{
operations.addBook(attributes, publisherName);
// Clear the app's cache of info; in this case, known publishers.
vengine.clearCache();
}
break;
}
catch (CreateException ex)
{
setError("Error adding book: " + ex.getMessage());
return;
}
catch (RemoteException ex)
{
vengine.rmiFailure("Remote exception adding new book.", ex, i++);
}
}
// Success. First, update the message property of the return page.