Hi all, I have a J2EE application running in JBoss. In my application I need some configuration. For instance, we have to email certain recepients when a action occurs. (For instance, when a certain entity bean is removed we have to send an email to a person). In this email we need to have a configurable messagebody, subject, recipients, reply-address etc... etc... I cannot use the bean environment entries because these only get read at deploy time. I need to be able to change the configuration during run-time. What would be a good way to make this as configurable as possible? Thanks for any suggestions!
I don't know if this is the correct answer, but once I did something like this: in my jboss.xml I added this:
I had a class that was in charge only of sending emails. So whenever i needed to send an email (or many emails) I'd invoke this class, and my code did something like this:
there was another configuration file in which you added your SMTP sever, so you wouldn't need to hardcode it, but I cant remember which was I don't know if this is the correct way, it's only a suggestion
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury