You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2022/10/11 16:19:50 UTC

[tomee] 01/03: Continue if we cannot create a resource for the MDB destination

This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch tomee-8.x
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 0ceeae206f23b9b0d58d4cc68105f3a427b44964
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Tue Oct 11 16:31:42 2022 +0100

    Continue if we cannot create a resource for the MDB destination
---
 .../src/main/java/org/apache/openejb/config/AutoConfig.java           | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java b/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java
index e64c566246..cec361397e 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java
@@ -64,6 +64,7 @@ import org.apache.openejb.util.PropertyPlaceHolderHelper;
 import org.apache.openejb.util.SuperProperties;
 import org.apache.openejb.util.URISupport;
 import org.apache.openejb.util.URLs;
+import org.apache.xbean.recipe.ConstructionException;
 
 import javax.annotation.ManagedBean;
 import javax.ejb.TimerService;
@@ -932,6 +933,9 @@ public class AutoConfig implements DynamicDeployer, JndiConstants {
                     } catch (final OpenEJBException e) {
                         // The MDB doesn't need the auto configured "openejb/destination" env entry
                         ejbDeployment.removeResourceLink("openejb/destination");
+                    } catch (ConstructionException e) {
+                        logger.warning("Unable to create destination {0} for {1}. The MDB may not require this, so attempting to continue without it.", resourceLink.getResId(), mdb.getEjbName());
+                        ejbDeployment.removeResourceLink("openejb/destination");
                     }
                 }
             }