Skip to content

Commit

Permalink
Fix <Resources> declared via context.xml not imported (https://issues…
Browse files Browse the repository at this point in the history
  • Loading branch information
oglimmer committed May 26, 2019
1 parent 87a9e56 commit 8792113
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import javax.enterprise.inject.spi.BeanManager;
import javax.jms.Queue;
import javax.jms.Topic;
import javax.naming.Reference;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
Expand Down Expand Up @@ -1430,7 +1431,9 @@ private void deploy(final AppModule app, final PersistenceModule persistenceModu
final ResourceInfo jtaInfo = configFactory.getResourceInfo(potentialName);
if (jtaInfo != null) {
if (!"false".equalsIgnoreCase(jtaInfo.properties.getProperty("JtaManaged")) // don't test true since it can be missing
&& (jtaInfo.types.contains("DataSource") || jtaInfo.types.contains(DataSource.class.getName()))) {
&& (jtaInfo.types.contains("DataSource") || jtaInfo.types.contains(DataSource.class.getName())
|| (jtaInfo.properties.get("reference") instanceof Reference // defined in <Context>
&& DataSource.class.getName().equals(((Reference) jtaInfo.properties.get("reference")).getClassName())))) {
jtaDataSourceId = jtaInfo.id;
break;
} else {
Expand Down

0 comments on commit 8792113

Please sign in to comment.