ASF Bugzilla – Attachment 35191 Details for
Bug 61366
"Unable to find [comp]" when attempting to use JNDI datasource for JDBCStore session store
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Properly set the TCCL before performing JNDI datasource lookups
JDBCStore.java.patch (text/plain), 1.03 KB, created by
Jonathan Horowitz
on 2017-08-01 00:05:18 UTC
(
hide
)
Description:
Properly set the TCCL before performing JNDI datasource lookups
Filename:
MIME Type:
Creator:
Jonathan Horowitz
Created:
2017-08-01 00:05:18 UTC
Size:
1.03 KB
patch
obsolete
>Index: java/org/apache/catalina/session/JDBCStore.java >=================================================================== >--- java/org/apache/catalina/session/JDBCStore.java (revision 1803599) >+++ java/org/apache/catalina/session/JDBCStore.java (working copy) >@@ -867,6 +867,9 @@ > return dbConnection; > > if (dataSourceName != null && dataSource == null) { >+ org.apache.catalina.Context context = getManager().getContext(); >+ ClassLoader oldThreadContextCL = context.bind(Globals.IS_SECURITY_ENABLED, null); >+ > Context initCtx; > try { > initCtx = new InitialContext(); >@@ -876,7 +879,9 @@ > manager.getContext().getLogger().error( > sm.getString(getStoreName() + ".wrongDataSource", > this.dataSourceName), e); >- } >+ } finally { >+ context.unbind(Globals.IS_SECURITY_ENABLED, oldThreadContextCL); >+ } > } > > if (dataSource != null) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61366
:
35191
|
35192
|
35194