[ 
https://issues.apache.org/jira/browse/SLING-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325810#comment-14325810
 ] 

Chetan Mehrotra commented on SLING-4429:
----------------------------------------

bq We could store the app server context in a static variable in the 
ServletContextListener and then somehow do some magic

Not sure if keeping the {{InitialContext}} would help. My thinking is that all 
those JEE rules (invoke from managed thread) is invoked on caller thread when 
actual lookup is performed. As then the content implementation can map the 
callers content to the correct JNDI sub tree view. So it would be safer to just 
copy the stuff when you can do that legally and expose it via static map. Kind 
of cheating but then we do not have any other option ;)

> Support JNDI lookup in JDBC DataSource Provider for App Servers
> ---------------------------------------------------------------
>
>                 Key: SLING-4429
>                 URL: https://issues.apache.org/jira/browse/SLING-4429
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions, Launchpad
>            Reporter: Ankit Aggarwal
>            Assignee: Chetan Mehrotra
>         Attachments: SLING-4429.patch
>
>
> JNDI lookup fails in case of WebSphere as mentioned in JIRA SLING-3735.
> (Where we are trying the JNDI access from a thread that is not managed by the 
> J2EE.).
> In this case, We will create a Listener in sling launchpad webapp and then 
> register the JNDI DataSource in DummyContext which would then be available in 
> OSGI environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to