You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2019/11/10 19:01:00 UTC

[jira] [Commented] (DELTASPIKE-1367) JNDI Config Source should support alternate JNDI base names

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

Mark Struberg commented on DELTASPIKE-1367:
-------------------------------------------

Hi!

The problem is that this is really a chicken-egg issue. If we would make this configurable, then which mechanism would you use to configure the base name?

In reality it is much simpler to just copy the source of {{LocalJndiConfigSource}} and tweak it. It's just a few lines of code and the most complex parts are already extracted into a reusable {{JndiUtils}} class.

> JNDI Config Source should support alternate JNDI base names
> -----------------------------------------------------------
>
>                 Key: DELTASPIKE-1367
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1367
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 1.9.0
>            Reporter: John Schneider
>            Assignee: Mark Struberg
>            Priority: Major
>
> JNDI Config is hard-coded to only support "java:comp/env/deltaspike/" as a base name.  This doesn't work for EAR deployments where we must have the DeltaSpike jars deployed in top-level app lib directory with JNDI resource reference in application.xml, for which name prefix is java:app/env
> Furthermore, it's sometimes desirable to have server-level config, such as for ProjectStage.  For example, a JNDI name java:global/env/deltaspike/org.apache.deltaspike/ProjectStage might be defined at the server level configuration.
> I understand a custom config source can be created to overcome this.  However, the standard JNDI config source should be more flexible.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)