You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/02/18 12:53:12 UTC

[jira] [Comment Edited] (SLING-4429) Support JNDI lookup in JDBC DataSource Provider for App Servers

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

Chetan Mehrotra edited comment on SLING-4429 at 2/18/15 11:52 AM:
------------------------------------------------------------------

[~aagarwa] Thanks for the patch. It would be better if {{SlingJNDIListener}} is generic can bind instance of any type. It should not be concerned with the type of object it is binding (can be anything from DataSource, TransactionManager etc)

[~cziegeler] [~fmeschbe] Attached patch is based on the approach you suggested sometime back to copy the JNDI instances from within a {{ServletContextListener}} which is executed on a server managed thread and hence can access the JNDI content to a static map in a dummy InitialContext implementation. Sling DataSource bundle can then lookup via the dummy content and bind the instance to OSGi.

So can you have a look so that it can be added to launchpad

[~reschke] This should enable looup of JNDI bound DataSource in any app server environment


was (Author: chetanm):
[~aagarwa] Thanks for the patch. It would be better if {{SlingJNDIListener}} is generic can bind instance of any type. It should not be concerned with the type of object it is binding (can be anything from DataSource, TransactionManager etc)

[~cziegeler] [~fmeschbe] Attached based is based on the approach you suggested sometime back to copy the JNDI instances from within a {{ServletContextListener}} which is executed on a server managed thread and hence can access the JNDI content to a static map in a dummy InitialContext implementation. Sling DataSource bundle can then lookup via the dummy content and bind the instance to OSGi.

So can you have a look so that it can be added to launchpad

[~reschke] This should enable looup of JNDI bound DataSource in any app server environment

> 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)