So, here's my problem:
I have a message driven bean X and would like to make use of Logger in X's onMessage() method. Lets presume that I have a single instance of the bean running in my app server, hence, I would initialize log4j in ejbCreate(). This would mean I would have to do something like this:
public void ejbCreate() {
PropertyConfigurator.configure(Classloader.getResourceAsStream("xyz_log4j.properties"));
}
However, this doesn't help. No matter what I do I always get my stream as null, I tried other versions : this.getClass().getStream() and ResourceBundle.
I jar'ed my properties file in to test.jar and added it under EAR libraries (I am using RAD7) and it got reflected in my manifest.mf.
Did anyone face this issue before? If yes, how did you solve it? Appreciate your help...