You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Charles Moulliard (JIRA)" <ji...@apache.org> on 2012/07/02 12:46:23 UTC

[jira] [Created] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Charles Moulliard created DELTASPIKE-215:
--------------------------------------------

             Summary: Add a new annotation to override the location of the apache-deltaspike.properties file
                 Key: DELTASPIKE-215
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
             Project: DeltaSpike
          Issue Type: New Feature
            Reporter: Charles Moulliard


I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405781#comment-13405781 ] 

Mark Struberg commented on DELTASPIKE-215:
------------------------------------------

currently doing exactly that :) just fiddling around with the details. Do we like to pickup JNDI automatically as well, etc?

I'm also thinking about unifying META-INF/apache-deltaspike.properties vs java:/comp/env/deltaspike/[key]. either 'apache-deltaspike' or 'deltaspike'.
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406889#comment-13406889 ] 

Charles Moulliard commented on DELTASPIKE-215:
----------------------------------------------

Mark,

Have you added a unit test ?
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch, DELTASPIKE-215.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Lucas Ventura Carro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405704#comment-13405704 ] 

Lucas Ventura Carro edited comment on DELTASPIKE-215 at 7/3/12 10:23 AM:
-------------------------------------------------------------------------

Useful example. But: PropertyFileConfigSource is not a public ConfigSource implementation? Is more useful than using the BaseConfigSource, and moreover: then can be done a ConfigSourceProvider, which add all properties file in classpath.
                
      was (Author: lucasvc):
    Useful example. But: why [{{org.apache.deltaspike.core.impl.config.PropertyFileConfigSource}}|https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/PropertyFileConfigSource.java;hb=6e8d7e2d] is not a public {{ConfigSource}} implementation? Is more useful than using the {{BaseConfigSource}}, and moreover: then can be done a ConfigSourceProvider, which add all properties file in classpath.
                  
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405076#comment-13405076 ] 

Charles Moulliard commented on DELTASPIKE-215:
----------------------------------------------

@ConfigProperty only allows to provide the name of the property. Is there a @ConfigSources to specify the location of the property file (I don't see that in the code) ?


                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405901#comment-13405901 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

hmm, properties should be enough no?

i was thinking of something like ObjectRecipe

potentially:

<qualifiedname>.servers
<qualifiedname>.ports
etc...
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405090#comment-13405090 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

here a sample: http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/deltaspike-configproperty
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Lucas Ventura Carro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405704#comment-13405704 ] 

Lucas Ventura Carro commented on DELTASPIKE-215:
------------------------------------------------

Useful example. But: why [{{org.apache.deltaspike.core.impl.config.PropertyFileConfigSource}}|https://git-wip-us.apache.org/repos/asf?p=incubator-deltaspike.git;a=blob;f=deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/PropertyFileConfigSource.java;hb=6e8d7e2d] is not a public {{ConfigSource}} implementation? Is more useful than using the {{BaseConfigSource}}, and moreover: then can be done a ConfigSourceProvider, which add all properties file in classpath.
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405709#comment-13405709 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

probably because that's in impl but a big +1 to expose it
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407567#comment-13407567 ] 

Mark Struberg commented on DELTASPIKE-215:
------------------------------------------

Yes, the solution now is to simply implement an Interface returning the property file name. This class will get picked up automatically.
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>             Fix For: 0.3-incubating
>
>         Attachments: DELTASPIKE-215-interface.patch, DELTASPIKE-215.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Gerhard Petracek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406361#comment-13406361 ] 

Gerhard Petracek commented on DELTASPIKE-215:
---------------------------------------------

please move the discussion to the mailing-list
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405893#comment-13405893 ] 

Charles Moulliard commented on DELTASPIKE-215:
----------------------------------------------

I like this idea if the classes implementing ConfigSources are part of DeltaSpike Core or Impl. So we could have LdapConfigSources, PropertyFileConfigSource, JdbcConfigSource, OSGIConfigSource.

But a property as you suggest in deltaspike.properties file will not be enough for LDAP, JDBC, ... as we need info to communicate with the server + authentication

                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Lucas Ventura Carro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405704#comment-13405704 ] 

Lucas Ventura Carro edited comment on DELTASPIKE-215 at 7/3/12 10:24 AM:
-------------------------------------------------------------------------

Useful example. But: why PropertyFileConfigSource is not a public ConfigSource implementation? Is more useful than using the BaseConfigSource, and moreover: then can be done a ConfigSourceProvider, which add all properties file in classpath.
                
      was (Author: lucasvc):
    Useful example. But: PropertyFileConfigSource is not a public ConfigSource implementation? Is more useful than using the BaseConfigSource, and moreover: then can be done a ConfigSourceProvider, which add all properties file in classpath.
                  
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405077#comment-13405077 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

No but IMO to keep the great CDI loose coupling that's the integration of ConfigSources which should achieve it and not the injection point itself which shouldnt be aware of such an environment configuration
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407215#comment-13407215 ] 

Charles Moulliard commented on DELTASPIKE-215:
----------------------------------------------

Test external to deltaspike project succeeded. I propose that we close this ticket.
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch, DELTASPIKE-215.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned DELTASPIKE-215:
----------------------------------------

    Assignee: Mark Struberg
    
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated DELTASPIKE-215:
-------------------------------------

    Attachment: DELTASPIKE-215-interface.patch
    
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405051#comment-13405051 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

that's already supported with ConfigProperty annotation and ConfigSources
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405034#comment-13405034 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

couldn't it be done simply simplifying the way a config provider is registered?

Another simple way could be to use system properties
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated DELTASPIKE-215:
-------------------------------------

    Attachment: DELTASPIKE-215.patch

Proposal for the automatic ConfigSource pickup.

Will write unit tests and commit it in the evening
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch, DELTASPIKE-215.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved DELTASPIKE-215.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.3-incubating
    
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>             Fix For: 0.3-incubating
>
>         Attachments: DELTASPIKE-215-interface.patch, DELTASPIKE-215.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404998#comment-13404998 ] 

Mark Struberg commented on DELTASPIKE-215:
------------------------------------------

Yes, I thought about that myself yesterday. Any idea is welcome.
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405801#comment-13405801 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

-1 for JNDI

However a standard config way could be nice

what i think of:

XXX implements ConfigSources {
   ...SomeSimpleType attr;
}

should be configurable with:


org.apahe.deltaspike...XXX.attr = value

wdyt?
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405045#comment-13405045 ] 

Charles Moulliard commented on DELTASPIKE-215:
----------------------------------------------

I think that we could propose what is possible with PropertyPlaceHolder of Spring/Blueprint

@PropertyPlaceHolder(location="value") where value could be file:, classpath:, ...

or 

@PropertyPlaceHolder(locations = {value1, value2, ..., valueN})
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406359#comment-13406359 ] 

Mark Struberg commented on DELTASPIKE-215:
------------------------------------------

Folks, we have 2 ways to do the trick:

In both cases we need to extract the property files pickup logic from the DefaultConfigSourceProvider to an own EnvironmentPropertyConfigSourceProvider class which takes the name of the properties files as ct param.
Please see the attached file.

The options we have beyond this is to 

A.) move all the needed classes to core-api spi package:
EnvironmentPropertyConfigSourceProvider + BaseConfigSource + EnvironmentPropertyConfigSource

A user could then simply write something like 

{code}
MyPropertyConfig extends EnvironmentPropertyConfigSourceProvider {
  MyPropertyConfig() {
    super("META-INF/myproject.properties");
  }
}
{code}

and register it via META-INF/services.

con: 
 * that would be quite some impl details in the public spi.
 * the user would still need to write the service provider file in META-INF/services

pro: 
 * that would also work for configuring Extensions!
 * BaseConfigSource is nice to have in the spi anyway, as this shows pretty well how the ordinal stuff could be done.


B.) The second option is easier for users. We would introduce a new interface:

{code}
public interface PropertyConfigSource
{
    String getPropertyFileName();
}
{code}

which a user can implement. We would @Observes ProcessAnnotatedType<PropertyConfigSource> and call the EnvironmentPropertyConfigSourceProvider for each of them. 

con: 
 * only works for runtime stuff, not usable in CDI extensions
 * in the AfterBeanValidation phase we would need to add those additional ConfigSources and clean the config. This means that after the boot the config might change. This is misconfiguration and we might be able to detect it, but this means that we need to code more to make it fools-safe.

pro:
 * easier for users
 * much less stuff in the spi
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>         Attachments: DELTASPIKE-215-interface.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-215) Add a new annotation to override the location of the apache-deltaspike.properties file

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406372#comment-13406372 ] 

Romain Manni-Bucau commented on DELTASPIKE-215:
-----------------------------------------------

What about scanning? DS seems to become a container light and the deltaspike.properties could get a scanning = some packages and this way the conf could simply be scanned (i know that's not CDi compliant but since we can't use CDI to get such information for extension that's maybe a good compromise answering both cases).
                
> Add a new annotation to override the location of the apache-deltaspike.properties file
> --------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-215
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-215
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Mark Struberg
>         Attachments: DELTASPIKE-215-interface.patch
>
>
> I don't see a property (or annotation) that we can use to override the name to be used to load the properties file (META-INF/apache-deltaspike.properties) and its location like we can do with Spring (@ContextConfiguration(locations = { "classpath:mycontext.xml" })).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira