[jira] [Resolved] (DELTASPIKE-1296) PropertyFileConfig doesn't work with internal extensions

2017-12-30 Thread Mark Struberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg resolved DELTASPIKE-1296.
---
   Resolution: Fixed
Fix Version/s: 1.8.1

> PropertyFileConfig doesn't work with internal extensions
> 
>
> Key: DELTASPIKE-1296
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1296
> Project: DeltaSpike
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Romain Manni-Bucau
>Assignee: Mark Struberg
> Fix For: 1.8.1
>
>
> We register PropertyFileConfig in AfterDeploymentValidation hook but 
> extensions potentially already read the config entries. Technically there is 
> probably no blocker to do it earlier and we should probably ensure all our 
> extensions read keys in AfterDeploymentValidation.
> My use case was a configured cron expression in the scheduler usage.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (DELTASPIKE-1296) PropertyFileConfig doesn't work with internal extensions

2017-11-27 Thread Mark Struberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg resolved DELTASPIKE-1296.
---
Resolution: Not A Problem

No Romain, the behaviour is really intentionally. 

We do NOT immediately register any PropertyFileConfig we find in 
ProcessAnnotatedType because that way we would probably introduce random 
behaviour. If any other Extension would require this information in PAT as well 
then you would get different results depending on whether the class with the 
PropertyFileConfig gets scanned first or last.

If one has an Extension which needs the information in this ConfigSource then 
he should use 
META-INF/services/org.apache.deltaspike.core.api.config.PropertyFileConfig to 
register the ConfigSource. See DELTASPIKE-837 for more info

> PropertyFileConfig doesn't work with internal extensions
> 
>
> Key: DELTASPIKE-1296
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1296
> Project: DeltaSpike
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Romain Manni-Bucau
>Assignee: Mark Struberg
>
> We register PropertyFileConfig in AfterDeploymentValidation hook but 
> extensions potentially already read the config entries. Technically there is 
> probably no blocker to do it earlier and we should probably ensure all our 
> extensions read keys in AfterDeploymentValidation.
> My use case was a configured cron expression in the scheduler usage.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (DELTASPIKE-1296) PropertyFileConfig doesn't work with internal extensions

2017-11-27 Thread Mark Struberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg resolved DELTASPIKE-1296.
---
Resolution: Not A Problem

Hi!

One can register a PropertyFileConfig in 2 ways:
# Automatically let them pick up via ProcessAnnotatedType. In this case it has 
the restriction as you described
# via java.util.ServiceLoader. Just create a 
META-INF/services/org.apache.deltaspike.core.api.config.PropertyFileConfig with 
your fully qualified classname. Don't forget to annotate the class with 
@Exclude to prevent it go get picked up twice ;)

The code where this is done is in DefaultConfigSourceProvider#106

> PropertyFileConfig doesn't work with internal extensions
> 
>
> Key: DELTASPIKE-1296
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1296
> Project: DeltaSpike
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Romain Manni-Bucau
>Assignee: Mark Struberg
>
> We register PropertyFileConfig in AfterDeploymentValidation hook but 
> extensions potentially already read the config entries. Technically there is 
> probably no blocker to do it earlier and we should probably ensure all our 
> extensions read keys in AfterDeploymentValidation.
> My use case was a configured cron expression in the scheduler usage.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)