On Sep 25, 2011, at 5:12 PM, Reza Rahman wrote:
> public class SomeBean {
> @Listens
> @ActivationConfigProperty(propertyName="mailServer", propertyValue="mailHost"),
> @ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"),
> @ActivationConfigProperty(propertyName="storeProtocol", propertyValue="imap"),
> @ActivationConfigProperty(propertyName="userName", propertyValue=""),
> @ActivationConfigProperty(propertyName="password", propertyValue="secret")
> public void someMethod(Message message) {
> ...
> }
> }
Side note it would be a bit uglier than that as well:
@Listens
@ActivationConfigProperties({
@ActivationConfigProperty(propertyName="mailServer", propertyValue="mailHost"),
@ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"),
@ActivationConfigProperty(propertyName="storeProtocol", propertyValue="imap"),
@ActivationConfigProperty(propertyName="userName", propertyValue=""),
@ActivationConfigProperty(propertyName="password", propertyValue="secret")
})
public void someMethod(Message message) {
...
}
That said I hope we as a platform get away from "properties" in annotations.
-David