Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Fetch configuration values

I wrote an event handler that sends emails to certain people upon certain events. I can successfully send emails using the IMailerService. I'd like to use the values for sender (From email, from name, reply-to) from the teamserver.properties configuration.

I try to do it this way (inspired by another mailing class from SDK):


public class ChangeEventHandler extends AbstractService implements
IChangeEventHandler {

private static final String TASK_ID_PROP_PREFIX = "notification.mail."; //$NON-NLS-1$
public static final String PROP_REPLY = TASK_ID_PROP_PREFIX + "reply"; //$NON-NLS-1$
public static final String PROP_FROM_NAME = TASK_ID_PROP_PREFIX
+ "from_name"; //$NON-NLS-1$
public static final String PROP_FROM = TASK_ID_PROP_PREFIX + "from"; //$NON-NLS-1$

......

String reply = getStringConfigProperty(PROP_REPLY);
String fromName = getStringConfigProperty(PROP_FROM_NAME);
String from = getStringConfigProperty(PROP_FROM);


In this piece of code, all the 3 variables will be null.

The situation is same when running RTC on Jetty and Tomcat.

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: Mar 16 '10, 6:24 a.m.

Question was seen: 3,630 times

Last updated: Mar 16 '10, 6:24 a.m.

Confirmation Cancel Confirm