}
}
protected Method getTimeoutCallback(NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
{
JBossEnterpriseBeanMetaData metaData = xml;
if(metaData != null)
{
if(timeoutMethodMetaData != null)
{
String methodName = timeoutMethodMetaData.getMethodName();
try
{
return beanClass.getMethod(methodName, Timer.class);
}
catch (SecurityException e)
{
throw new RuntimeException(e);
}
catch (NoSuchMethodException e)
{
throw new RuntimeException("No method " + methodName + "(javax.ejb.Timer timer) found on bean " + ejbName, e);
}
}
}
if(TimedObject.class.isAssignableFrom(beanClass))
{
try
{
return TimedObject.class.getMethod("ejbTimeout", Timer.class);
}
catch (SecurityException e)
{
throw new RuntimeException(e);
}
catch (NoSuchMethodException e)
{
throw new RuntimeException(e);
}
}
if(metaData != null)
{
// TODO: cross cutting concern
if(metaData.getEjbJarMetaData().isMetadataComplete())
return null;
}
for (Method method : beanClass.getMethods())
{