public LifecycleCallback(final NamedMethod method) { this.lifecycleCallbackClass = method.getClassName(); this.lifecycleCallbackMethod = method.getMethodName(); }
public LifecycleCallback(final NamedMethod method) { this.lifecycleCallbackClass = method.getClassName(); this.lifecycleCallbackMethod = method.getMethodName(); }
private void checkTimeOut(Class ejbClass, NamedMethod timeout, EnterpriseBean bean) { if (timeout == null) return; try { Method method = getMethod(ejbClass, timeout.getMethodName(), javax.ejb.Timer.class); Class<?> returnType = method.getReturnType(); if (!returnType.equals(Void.TYPE)) { fail(bean, "timeout.badReturnType", timeout.getMethodName(), returnType.getName()); } } catch (NoSuchMethodException e) { List<Method> possibleMethods = getMethods(ejbClass, timeout.getMethodName()); if (possibleMethods.size() == 0) { fail(bean, "timeout.missing", timeout.getMethodName()); } else if (possibleMethods.size() == 1) { fail(bean, "timeout.invalidArguments", timeout.getMethodName(), getParameters(possibleMethods.get(0))); } else { fail(bean, "timeout.missing.possibleTypo", timeout.getMethodName(), possibleMethods.size()); } } }
public MethodAttribute(final A attribute, final String ejbName, final NamedMethod method) { this.attribute = attribute; this.ejbName = ejbName; this.methodName = method.getMethodName(); this.methodParams = method.getMethodParams(); this.className = method.getClassName(); }
public MethodAttribute(final A attribute, final String ejbName, final NamedMethod method) { this.attribute = attribute; this.ejbName = ejbName; this.methodName = method.getMethodName(); this.methodParams = method.getMethodParams(); this.className = method.getClassName(); }
public MethodAttribute(A attribute, String ejbName, NamedMethod method) { this.attribute = attribute; this.ejbName = ejbName; this.methodName = method.getMethodName(); this.methodParams = method.getMethodParams(); this.className = method.getClassName(); }
public Map<String, List<MethodAttribute>> getExistingDeclarations() { final Map<String, List<MethodAttribute>> declarations = new HashMap<String, List<MethodAttribute>>(); final List<ConcurrentMethod> methods = bean.getConcurrentMethod(); for (final ConcurrentMethod method : methods) { List<MethodAttribute> list = declarations.get(method.getMethod().getMethodName()); if (list == null) { list = new ArrayList<MethodAttribute>(); declarations.put(method.getMethod().getMethodName(), list); } list.add(new MethodAttribute(null, bean.getEjbName(), method.getMethod())); } return declarations; }
public Map<String, List<MethodAttribute>> getExistingDeclarations() { final Map<String, List<MethodAttribute>> declarations = new HashMap<String, List<MethodAttribute>>(); final List<ConcurrentMethod> methods = bean.getConcurrentMethod(); for (final ConcurrentMethod method : methods) { List<MethodAttribute> list = declarations.get(method.getMethod().getMethodName()); if (list == null) { list = new ArrayList<MethodAttribute>(); declarations.put(method.getMethod().getMethodName(), list); } list.add(new MethodAttribute(null, bean.getEjbName(), method.getMethod())); } return declarations; }
public Map<String,List<MethodAttribute>> getMethodScheduleMap(String ejbName) { Map<String,List<MethodAttribute>> methods = new LinkedHashMap<String,List<MethodAttribute>>(); for (MethodSchedule methodSchedule : getMethodSchedule()) { if (!methodSchedule.getEjbName().equals(ejbName)) continue; NamedMethod method = methodSchedule.getMethod(); String methodName = method.getMethodName(); List<MethodAttribute> list = methods.get(methodName); if (list == null){ list = new ArrayList<MethodAttribute>(); methods.put(methodName, list); } list.add(new MethodAttribute(methodSchedule.getAttribute(), ejbName, method)); } return methods; }
private NamedMethodInfo toInfo(final NamedMethod method) { if (method == null) { return null; } final NamedMethodInfo info = new NamedMethodInfo(); info.methodName = method.getMethodName(); if (method.getMethodParams() != null) { info.methodParams = method.getMethodParams().getMethodParam(); } return info; }
public void addEjbTimeout(EnterpriseBean remoteBean, EjbModule ejbModule, Collection<Permission> permissions) throws DeploymentException { NamedMethod timeout = null; if (remoteBean instanceof SessionBean) { timeout = ((SessionBean) remoteBean).getTimeoutMethod(); } else if (remoteBean instanceof MessageDrivenBean) { timeout = ((MessageDrivenBean) remoteBean).getTimeoutMethod(); } if (timeout != null) { permissions.add(new EJBMethodPermission(remoteBean.getEjbName(), timeout.getMethodName(), null, new String[]{Timer.class.getName()})); } else { try { Class ejbClass = ejbModule.getClassLoader().loadClass(remoteBean.getEjbClass()); if (TimedObject.class.isAssignableFrom(ejbClass)) { permissions.add(new EJBMethodPermission(remoteBean.getEjbName(), "ejbTimeout", null, new String[]{Timer.class.getName()})); } } catch (ClassNotFoundException e) { throw new DeploymentException("Could not figure out timer method", e); } } }
private NamedMethodInfo toInfo(final NamedMethod method) { if (method == null) { return null; } final NamedMethodInfo info = new NamedMethodInfo(); info.methodName = method.getMethodName(); if (method.getMethodParams() != null) { info.methodParams = method.getMethodParams().getMethodParam(); } return info; }
private NamedMethodInfo toInfo(NamedMethod method) { if (method == null) return null; NamedMethodInfo info = new NamedMethodInfo(); info.methodName = method.getMethodName(); if (method.getMethodParams() != null) { info.methodParams = method.getMethodParams().getMethodParam(); } return info; }
private void copyConcurrentMethods(final SessionBean bean, final EjbJarInfo ejbJarInfo, final Map ejbds) { for (final ConcurrentMethod method : bean.getConcurrentMethod()) { final MethodConcurrencyInfo info = new MethodConcurrencyInfo(); if (method.getLock() != null) { info.concurrencyAttribute = method.getLock().toString(); } info.accessTimeout = toInfo(method.getAccessTimeout()); final Method m = new Method(bean.getEjbName(), null, method.getMethod().getMethodName()); m.setMethodParams(method.getMethod().getMethodParams()); info.methods.add(getMethodInfo(m, ejbds)); ejbJarInfo.methodConcurrency.add(info); } }
private void copyConcurrentMethods(final SessionBean bean, final EjbJarInfo ejbJarInfo, final Map ejbds) { for (final ConcurrentMethod method : bean.getConcurrentMethod()) { final MethodConcurrencyInfo info = new MethodConcurrencyInfo(); if (method.getLock() != null) { info.concurrencyAttribute = method.getLock().toString(); } info.accessTimeout = toInfo(method.getAccessTimeout()); final Method m = new Method(bean.getEjbName(), null, method.getMethod().getMethodName()); m.setMethodParams(method.getMethod().getMethodParams()); info.methods.add(getMethodInfo(m, ejbds)); ejbJarInfo.methodConcurrency.add(info); } }
for (final Timer timer : timers) { final NamedMethod namedMethod = timer.getTimeoutMethod(); methodsConfiguredInDeploymentXml.add(namedMethod.getMethodName() + (namedMethod.getMethodParams() == null ? "" : Join.join("", namedMethod.getMethodParams().getMethodParam())));
for (final Timer timer : timers) { final NamedMethod namedMethod = timer.getTimeoutMethod(); methodsConfiguredInDeploymentXml.add(namedMethod.getMethodName() + (namedMethod.getMethodParams() == null ? "" : Join.join("", namedMethod.getMethodParams().getMethodParam())));
fail("InterceptorBinding", "interceptorBinding.ejbNameRequiredWithMethod", binding.getMethod().getMethodName(), join(",", interceptorClasses));
fail("InterceptorBinding", "interceptorBinding.ejbNameRequiredWithMethod", binding.getMethod().getMethodName(), join(",", interceptorClasses));
fail("InterceptorBinding", "interceptorBinding.ejbNameRequiredWithMethod", binding.getMethod().getMethodName(), join(",", interceptorClasses));