**/
public void updateBook(Integer bookId, Map attributes, String publisherName)
throws CreateException, FinderException, RemoteException
{
IPublisher publisher = null;
IPublisherHome publisherHome = getPublisherHome();
try
{
publisher = publisherHome.findByName(publisherName);
}
catch (FinderException e)
{
// Ignore, means we need to create the Publisher
}
if (publisher == null)
publisher = publisherHome.create(publisherName);
// Don't duplicate all that other code!
attributes.put("publisherId", publisher.getPrimaryKey());
updateBook(bookId, attributes);
}