1 Reply Latest reply on Jun 17, 2010 8:53 PM by rebody

    how to override mail configuration ?

    newbeewan

      Hi,

       

      It is a stupid configuration question in jbpm 4 !

       

      I have in my classpath a jbpm.mail.properties and it works !

       

      For test purpose, I have an other properties file to switch to an other mail server which is not in the default package.

      I configure my jbpm.cfg.xml to override the default configuration :

         <import resource="jbpm.default.cfg.xml" />
         <import resource="jbpm.tx.spring.cfg.xml" />
         <import resource="jbpm.jpdl.cfg.xml" />
         <import resource="jbpm.identity.cfg.xml" />
         <import resource="jbpm.businesscalendar.cfg.xml" />
         <import resource="jbpm.jobexecutor.cfg.xml" />
      ...
      <transaction-context>
            <mail-session>
               <mail-server>
                  <session-properties resource="my/path/config/jbpm.mail.properties" />
               </mail-server>
            </mail-session>
      
         </transaction-context>
      ...
      

       

      And it doesn't have any effect on jbpm

        • 1. Re: how to override mail configuration ?
          rebody

          Hi Jaber,

           

          I am afraid jbpm4 IoC container didn't allow override a component.  It allow we define multiply components which have same type.  And when jbpm4 try to find a component from IoC container, it will use class type as the query parameter,  if there are multiple components having save type, then it will return the first.

           

          So I suggest you should remove the default mail-session configuration when you do test.