[jboss-user] [Installation, Configuration & Deployment] - Re: log4j email appender not working with jboss
ALRubinger
do-not-reply at jboss.com
Tue Jul 18 15:35:06 EDT 2006
Part of my application includes a mail service stateless session bean. When this mail service is loaded and the following code is executed, Log4J looks for SMTP on Port 465 as opposed to the settings defined in conf/log4j.xml. Seems Log4J is picking up a shared mail session?
Properties props = System.getProperties();
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_PROTOCOL,MailServiceBean.DEFAULT_VALUE_SMTP_PROTOCOL);
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_AUTH,true);
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_HOST,this.getSmtpHost());
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_USER,this.getSmtpUsername());
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_PASSWORD,this.getSmtpPassword());
| props.put(MailServiceBean.PROPERTY_KEY_SMTP_PORT,new Integer(this.getSmtpPort()).toString());
| props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
| props.put("mail.smtp.socketFactory.fallback", "false");
| props.put("mail.smtp.socketFactory.port",new Integer(this.getSmtpPort()).toString());
| SmtpAuthenticator auth = new SmtpAuthenticator();
| auth.setUsername(this.getSmtpUsername());
| auth.setPassword(this.getSmtpPassword());
| mailSession = Session.getInstance(props,auth);
|
|
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958936#3958936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958936
More information about the jboss-user
mailing list