Hi all. We migrated from Jboss 4 to 5 and get trouble with mail sessions lookup via jndi. Jndi lookup return instances with same parameters for two different mail session. mail-service.xml:
| <?xml version="1.0" encoding="UTF-8"?> | <server> | <mbean code="org.jboss.mail.MailService" | name="jboss:service=jcCrm"> | <attribute name="JNDIName">java:/mail/jcCrm</attribute> | <attribute name="Configuration"> | <configuration> | <property name="mail.transport.protocol" value="smtp"/> | <property name="mail.user" value="[email protected]"/> | <property name="mail.password" value="<password_1>"/> | <property name="mail.smtp.host" value="mail.japancar.ru"/> | <property name="mail.smtp.port" value="25"/> | <property name="mail.smtp.auth" value="true"/> | <property name="mail.from" value="[email protected]"/> | <property name="mail.mime.charset" value="UTF-8"/> | <property name="mail.debug" value="true"/> | </configuration> | </attribute> | <depends>jboss:service=Naming</depends> | </mbean> | | <mbean code="org.jboss.mail.MailService" | name="jboss:service=gp"> | <attribute name="JNDIName">java:/mail/gp</attribute> | <attribute name="Configuration"> | <configuration> | <property name="mail.transport.protocol" value="smtp"/> | <property name="mail.user" value="[email protected]"/> | <property name="mail.password" value="<password_2>"/> | <property name="mail.smtp.host" value="mail.japancar.ru"/> | <property name="mail.smtp.port" value="25"/> | <property name="mail.smtp.auth" value="true"/> | <property name="mail.from" value="[email protected]"/> | <property name="mail.mime.charset" value="UTF-8"/> | <property name="mail.debug" value="true"/> | </configuration> | </attribute> | <depends>jboss:service=Naming</depends> | </mbean> | </server> | code for lookup: | session1 = (Session) context.lookup("java:/mail/gp"); | session2 = (Session) context.lookup("java:/mail/jcCrm"); | On Jboss 4 and Glassfish this code return different mail session with correct parameters but on version 5 we got this issue (lookup with spring org.springframework.jndi.JndiObjectFactoryBean class return same result). Always returned last mail session which was loaded by Jboss 5. Thanks for any help. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222200#4222200 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222200 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
