Skip to content
Permalink
Browse files

WELD-1871 Revised misleading BeanLogger.ejbNotFound()

  • Loading branch information...
mkouba authored and jharting committed Jun 12, 2015
1 parent 42ff8f8 commit 58fe1bb1307808fcf343817259c5e176dd59ace3
@@ -55,7 +55,7 @@ public SessionBeanProxyInstantiator(EnhancedAnnotatedType<T> type, SessionBean<T
public T newInstance(CreationalContext<T> ctx, BeanManagerImpl manager) {
try {
T instance = AccessController.doPrivileged(NewInstanceAction.of(proxyClass));
if(!bean.getScope().equals(Dependent.class)) {
if (!bean.getScope().equals(Dependent.class)) {
ctx.push(instance);
}
ProxyFactory.setBeanInstance(bean.getBeanManager().getContextId(), instance, createEnterpriseTargetBeanInstance(), bean);
@@ -69,7 +69,7 @@ public T newInstance(CreationalContext<T> ctx, BeanManagerImpl manager) {
throw new WeldException(e.getCause());
}
} catch (Exception e) {
throw BeanLogger.LOG.ejbNotFound(proxyClass, e);
throw BeanLogger.LOG.sessionBeanProxyInstantiationFailed(bean, proxyClass, e);
}
}

@@ -235,8 +235,8 @@
@Message(id = 78, value = "Specialized producer method does not override a method on the direct superclass: {0}", format = Format.MESSAGE_FORMAT)
DefinitionException producerMethodNotSpecializing(Object param1);

@Message(id = 79, value = "Could not find the EJB in JNDI: {0}", format = Format.MESSAGE_FORMAT)
CreationException ejbNotFound(Object param1, @Cause Throwable cause);
@Message(id = 79, value = "Could not instantiate a proxy for a session bean: {0}\n Proxy: {1}", format = Format.MESSAGE_FORMAT)
CreationException sessionBeanProxyInstantiationFailed(Object sessionBean, Object proxyClass, @Cause Throwable cause);

@Message(id = 80, value = "Enterprise beans cannot be interceptors: {0}", format = Format.MESSAGE_FORMAT)
DefinitionException ejbCannotBeInterceptor(Object param1);

0 comments on commit 58fe1bb

Please sign in to comment.
You can’t perform that action at this time.