final Method createMethod = homeObject.getClass().getMethod( "create", ProxyUtils.EMPTY_ARGUMENT_TYPES );
return createMethod.invoke( homeObject, ProxyUtils.EMPTY_ARGUMENTS );
}
catch( NoSuchMethodException e )
{
throw new ObjectProviderException(
"Unable to find no-arg create() method on home interface " + homeInterface.getName() + ".", e );
}
catch( IllegalAccessException e )
{
throw new ObjectProviderException(
"No-arg create() method on home interface " + homeInterface.getName() + " is not accessible.",
e ); // Should never happen!
}
catch( NamingException e )
{
throw new ObjectProviderException( "Unable to lookup EJB home object in JNDI.", e );
}
catch( InvocationTargetException e )
{
throw new ObjectProviderException(
"No-arg create() method on home interface " + homeInterface.getName() + " threw an exception.", e );
}
}