-
1. Re: DeltaSpike configuration
igarashitm Mar 2, 2014 9:58 PM (in response to jdestef)Hi John,
How about using SwitchYard Implementation Properties instead of deltaspike one? https://docs.jboss.org/author/display/SWITCHYARD/Bean
Thanks, Tomo
-
2. Re: DeltaSpike configuration
jdestef Mar 3, 2014 5:35 PM (in response to igarashitm)Hi,
Thanks for the reply. I tried that but it didn't seem to work. Is the @Properties only available in bean classes annotated with @Service? I'm using the netty gateway to receive HL7 messages. I have a serverPipelineFactory parameter on the netty uri with an @Named bean that gets injected fine. Within that bean I'm creating a netty ChannelPipline. One of the classes used in the pipeline (the ssl handler) has a number of parameters (keystore file name, truststore file name, etc...) that I'd like to pull out of a configuration file. I thought the DeltaSpike approach (apache-deltaspike.properties in the META-INF directory) would work since it looks like deltaspike is included with SwitchYard. However, I only see the api jar and not the implementation jar?
Any guidance would be appreciated. Right now I am using a config file and have written some logic into a producer class to pull values from it with a custom annotation. I'd prefer to use the DeltaSpike or Switchyard approach if either would work.
Thanks
-
3. Re: DeltaSpike configuration
kcbabo Mar 4, 2014 9:23 AM (in response to jdestef)SwitchYard property support comes in two flavors:
- Any value in switchyard.xml can be replaced using property substitution syntax, e.g. ${myproperty:defaultvalue}.
- Properties can be injected into a service implementation in a domain-specific way. For example, a CDI bean service can inject a property with @Property or a Camel service implementation has access to properties via Camel properties support.
An important limitation to the above w/r/t your use case is the ability to inject property values inside CDI beans that are not service implementations. I think this would be very useful for a number of reasons. It looks like DeltaSpike introduced this feature in 0.2-incubating. We are using 0.3-incubating, so there must be some additional plumbing we need to hook into to get this working. If this is a feature you'd like to see, please file a JIRA.
thanks,
keith
-
4. Re: DeltaSpike configuration
jdestef Mar 4, 2014 3:27 PM (in response to kcbabo)Thanks Keith,
I'll do that.