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

John D. Ament edited comment on DELTASPIKE-399 at 12/27/13 5:34 PM:
--------------------------------------------------------------------

[~struberg] This is the key feature, not configuration:

{quote}
The @Resource/ResourceProvider support in Solder was more generic and I think 
would still be useful. It easily allows for the loading of .xml files, images, 
etc.
{quote}

To me, configuration is an aside, and is not meant to replace the existing 
ConfigSource mechanisms.

RE merging with ExternalResourceProvider, I don't see how.  Add a method 
indicating whether or not it can provide it?  Why not use standard CDI 
mechanisms to find the right class.

RE compilation, I'm really confused.  FileSystemStorage, ClasspathStorage are 
both in the api JAR.  StorageType is also in the API JAR, it's SPI for creating 
your own storage mechanisms.

[~gpetracek] I'll add a log at the fine level for errors while closing streams. 
 Even though you may compile at JDK 6, if someone's using you at 7 they'll get 
JDK 7 behavior (e.g. automatic closing).


was (Author: johndament):
[~struberg] This is the key feature, not configuration:

{quote}
The @Resource/ResourceProvider support in Solder was more generic and I think 
would still be useful. It easily allows for the loading of .xml files, images, 
etc.
{quote}

To me, configuration is an aside, and is not meant to replace the existing 
ConfigSource mechanisms.

RE merging with ExternalResourceProvider, I don't see how.  Add a method 
indicating whether or not it can provide it?  Why not use standard CDI 
mechanisms to find the right class.

[~gpetracek] I'll add a log at the fine level for errors while closing streams. 
 Even though you may compile at JDK 6, if someone's using you at 7 they'll get 
JDK 7 behavior (e.g. automatic closing).

> Incorporate Solder's ResourceLoader features into DeltaSpike
> ------------------------------------------------------------
>
>                 Key: DELTASPIKE-399
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-399
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.4
>            Reporter: Aaron Siri
>            Assignee: John D. Ament
>            Priority: Minor
>             Fix For: 0.6
>
>
> Seam 3's Solder module had some nice resource loading functionality within 
> the org.jboss.solder.resourceLoader packages.  With it you could do the 
> following:
> // Load a properties file
> @Inject @Resource("app.properties")
> private Properties appProperties;
> or:
> @Inject
> private ResourceProvider resourceProvider
> public Properties getHostProperties() {
>    String hostname = java.net.InetAddress.getLocalHost().getHostName();
>    return resourceProvider.loadPropertiesBundle(hostname + ".properties");
> }



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to