You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by GitBox <gi...@apache.org> on 2022/07/06 23:59:57 UTC

[GitHub] [tomee] bdemers commented on a diff in pull request #900: Update exception message for MDB without an interface

bdemers commented on code in PR #900:
URL: https://github.com/apache/tomee/pull/900#discussion_r915340377


##########
container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiEjbBean.java:
##########
@@ -250,7 +250,7 @@ protected T createEjb(final CreationalContext<T> creationalContext) {
             } else if (remote != null) {
                 instance = (T) remote.create();
             } else { // shouldn't be called for an MDB
-                throw new IllegalStateException("no interface to proxy for ejb " + beanContext.getEjbName() + ", is this is a MDB maybe you shouldn't use a scope?");
+                throw new IllegalStateException("no interface to proxy for ejb " + beanContext.getEjbName() + ", is this is a @MessageDriven bean, maybe you shouldn't use a scope?");

Review Comment:
   In my case, it's not a message-driven bean, but I like the suggestion, maybe the wording should be something like:
   
   ```suggestion
                   throw new IllegalStateException("No interface to proxy for ejb " + beanContext.getEjbName() + ", if this is a @MessageDriven bean, try not using a scope?");
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org