本文整理了Java中javax.ejb.Remove.retainIfException
方法的一些代码示例,展示了Remove.retainIfException
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Remove.retainIfException
方法的具体详情如下:
包路径:javax.ejb.Remove
类名称:Remove
方法名:retainIfException
暂无
代码示例来源:origin: org.graniteds/granite-server-ejb
public EjbServiceMetadata(Class<?> scannedClass, Class<?> invokeeClass) {
stateful = scannedClass.isAnnotationPresent(Stateful.class);
if (stateful) {
for (Method method : scannedClass.getMethods()) {
Remove remove = method.getAnnotation(Remove.class);
if (remove != null) {
try {
method = invokeeClass.getMethod(method.getName(), method.getParameterTypes());
removeMethods.put(method, Boolean.valueOf(remove.retainIfException()));
} catch (Exception e) {
// ignore (invokee interface may not expose this remove method)...
}
}
}
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
private void removeIfNecessary(Method removeMethod, Exception exception) {
if ( exception instanceof RuntimeException || exception instanceof RemoteException )
{
if ( !exception.getClass().isAnnotationPresent(ApplicationException.class) )
{
//it is a "system exception"
remove();
}
}
else if ( removeMethod!=null )
{
if ( !removeMethod.getAnnotation(Remove.class).retainIfException() )
{
remove();
}
}
}
代码示例来源:origin: org.jboss.ejb3/jboss-ejb3-core
public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
{
if (jp instanceof MethodJoinpoint == false)
throw new IllegalArgumentException("Joinpoint is not a method: " + jp);
MethodJoinpoint methodJoinpoint = MethodJoinpoint.class.cast(jp);
Method method = methodJoinpoint.getMethod();
Remove rm = (Remove) advisor.resolveAnnotation(method, Remove.class);
if (rm == null)
{
log.warn("Cannot find @" + Remove.class.getName() + " for " + method + " assuming defaults");
rm = new RemoveImpl();
}
return new StatefulRemoveInterceptor(rm.retainIfException());
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
public RemoveMethodMetaData create(Method method)
{
Remove remove = finder.getAnnotation(method, Remove.class);
if(remove == null)
return null;
RemoveMethodMetaData metaData = new RemoveMethodMetaData();
NamedMethodMetaData beanMethod = new NamedMethodMetaData();
beanMethod.setMethodName(method.getName());
metaData.setBeanMethod(beanMethod);
metaData.setRetainIfException(remove.retainIfException());
MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
beanMethod.setMethodParams(methodParams);
return metaData;
}
代码示例来源:origin: org.jboss/jboss-metadata
public RemoveMethodMetaData create(Method method)
{
Remove remove = finder.getAnnotation(method, Remove.class);
if(remove == null)
return null;
RemoveMethodMetaData metaData = new RemoveMethodMetaData();
NamedMethodMetaData beanMethod = new NamedMethodMetaData();
beanMethod.setMethodName(method.getName());
metaData.setBeanMethod(beanMethod);
metaData.setRetainIfException(remove.retainIfException());
MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
beanMethod.setMethodParams(methodParams);
return metaData;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
public RemoveMethodMetaData create(Method method)
{
Remove remove = finder.getAnnotation(method, Remove.class);
if(remove == null)
return null;
RemoveMethodMetaData metaData = new RemoveMethodMetaData();
NamedMethodMetaData beanMethod = new NamedMethodMetaData();
beanMethod.setMethodName(method.getName());
metaData.setBeanMethod(beanMethod);
metaData.setRetainIfException(remove.retainIfException());
MethodParametersMetaData methodParams = ProcessorUtils.getMethodParameters(method);
beanMethod.setMethodParams(methodParams);
return metaData;
}
代码示例来源:origin: org.glassfish.main.ejb/ejb-container
removalInfo.setRetainIfException(remove.retainIfException());
sessionDescriptor.addRemoveMethod(removalInfo);
} else {
remove.retainIfException());
代码示例来源:origin: org.glassfish.ejb/ejb-container
removalInfo.setRetainIfException(remove.retainIfException());
sessionDescriptor.addRemoveMethod(removalInfo);
} else {
remove.retainIfException());
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
RemoveMethod removeMethod = new RemoveMethod(method, remove.retainIfException());
session.getRemoveMethod().add(removeMethod);
} else if (!declaredRemoveMethod.isExplicitlySet()) {
declaredRemoveMethod.setRetainIfException(remove.retainIfException());
代码示例来源:origin: org.apache.openejb/openejb-core
final RemoveMethod removeMethod = new RemoveMethod(method.get(), remove.retainIfException());
session.getRemoveMethod().add(removeMethod);
} else if (!declaredRemoveMethod.isExplicitlySet()) {
declaredRemoveMethod.setRetainIfException(remove.retainIfException());
代码示例来源:origin: org.apache.tomee/openejb-core
final RemoveMethod removeMethod = new RemoveMethod(method.get(), remove.retainIfException());
session.getRemoveMethod().add(removeMethod);
} else if (!declaredRemoveMethod.isExplicitlySet()) {
declaredRemoveMethod.setRetainIfException(remove.retainIfException());
代码示例来源:origin: com.caucho/resin
boolean isRetainIfException= remove.retainIfException();
内容来源于网络,如有侵权,请联系作者删除!