Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x be71be896 -> 0b764e45c


EOL & attributes


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/0b764e45
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/0b764e45
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/0b764e45

Branch: refs/heads/tomee-1.7.x
Commit: 0b764e45c69a3b9a5925e056546763540c5c180f
Parents: be71be8
Author: AndyGee <[email protected]>
Authored: Wed Nov 25 09:48:50 2015 +0100
Committer: AndyGee <[email protected]>
Committed: Wed Nov 25 09:52:11 2015 +0100

----------------------------------------------------------------------
 .gitattributes                                           | 11 +++++++++++
 .../openejb/core/transaction/JtaTransactionPolicy.java   |  8 +++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/0b764e45/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
index 54758c9..dec1aaa 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -21,6 +21,8 @@
 *.tld           text
 *.txt           text
 *.xml           text
+*.xsd           text
+*.groovy        text
 
 # These files are binary and should be left untouched
 # (binary is a macro for -text -diff)
@@ -36,3 +38,12 @@
 *.so            binary
 *.war           binary
 *.zip           binary
+*.exe           binary
+*.gz            binary
+
+#Windows
+*.bat text eol=crlf
+*.cmd text eol=crlf
+
+#Unix/Linux
+*.sh text eol=lf
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/0b764e45/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
----------------------------------------------------------------------
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
index e744852..5b75203 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
@@ -121,7 +121,13 @@ public abstract class JtaTransactionPolicy implements 
TransactionPolicy {
     @Override
     public Object getResource(final Object key) {
         if (isTransactionActive()) {
-            return this.getSynchronizationRegistry().getResource(key);
+            final TransactionSynchronizationRegistry sr = 
this.getSynchronizationRegistry();
+
+            if (null != sr) {
+                return sr.getResource(key);
+            }else{
+                logger.warning("TransactionSynchronizationRegistry has not 
been initialized");
+            }
         }
 
         if (resources == null) {

Reply via email to