[
https://issues.apache.org/jira/browse/DELTASPIKE-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857996#comment-13857996
]
Christian Kaltepoth commented on DELTASPIKE-399:
------------------------------------------------
@ [~struberg]: I agree with John that injecting a Properties object is _not_
the main usecase of this feature. The idea is to be able to inject all kind of
stuff like XML documents, images, other binary data, etc. But I agree that
injecting an InputStream may be problematic. Either we tell users to inject
Instance<InputStream> instead or we create some class that allows to open the
InputStream several times.
> 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
>
> Attachments: DELTASPIKE-399_ambiguous_file_check.patch,
> DELTASPIKE-399_merged_interface.patch
>
>
> 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)