Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24250

Custom mail providers are not loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 8.0.0.GA-CR1, 8.0.0.GA
    • 8.0.0.Beta-CR1
    • Mail
    • None
    • False
    • None
    • False
    • Workaround Exists
    • Hide

      The provider can be added to the mail session in code. see following example:
       

      Context initCtx = new InitialContext();
      mailSession = (Session) initCtx.lookup(jndiName);
      
      mailSession.addProvider( new Provider(Provider.Type.TRANSPORT,"CustomTransport", "org.jboss.qa.management.mail.custom.CustomTransport", "JBoss QE", "" ));
      mailSession.addProvider( new Provider(Provider.Type.STORE,"CustomStore", "org.jboss.qa.management.mail.custom.CustomStore", "JBoss QE", "" ));
      
      Provider[] providers = mailSession.getProviders();

       

       

      Show
      The provider can be added to the mail session in code. see following example:   Context initCtx = new InitialContext(); mailSession = (Session) initCtx.lookup(jndiName); mailSession.addProvider( new Provider(Provider.Type.TRANSPORT, "CustomTransport" , "org.jboss.qa.management.mail.custom.CustomTransport" , "JBoss QE" , "" )); mailSession.addProvider( new Provider(Provider.Type.STORE, "CustomStore" , "org.jboss.qa.management.mail.custom.CustomStore" , "JBoss QE" , "" )); Provider[] providers = mailSession.getProviders();    
    • Hide
      • download EAP8 
      • clone test application git@github.com:kstekovi/mail-custom-provider.git
      • start and configure EAP8

        /subsystem=mail/mail-session=CustomServerIT:add(jndi-name=java:jboss/mail/CustomServerIT, debug=false)

      • build and deploy test application.
      • request application to get list available providers 

        curl http://localhost:8080/mail-server/mailProvidersEap8.jsp?jndiName=java:jboss/mail/CustomServerIT

      • The list doesn't contain custom store and transport provider defined in javamail.providers 

        [TRANSPORT,CustomTransport,org.jboss.qa.management.mail.custom.CustomTransport,JBoss QE]
        [STORE,CustomStore,org.jboss.qa.management.mail.custom.CustomStore,JBoss QE]

      note: The test application have servlet also for EAP7 with javax namespace. This servlet with EAP 7.4 work fine and the custom providers are load. 

      Show
      download EAP8  clone test application git@github.com:kstekovi/mail-custom-provider.git start and configure EAP8 /subsystem=mail/mail-session=CustomServerIT:add(jndi-name=java:jboss/mail/CustomServerIT, debug=false) build and deploy test application. request application to get list available providers  curl http://localhost:8080/mail-server/mailProvidersEap8.jsp?jndiName=java:jboss/mail/CustomServerIT The list doesn't contain custom store and transport provider defined in javamail.providers  [TRANSPORT,CustomTransport,org.jboss.qa.management.mail.custom.CustomTransport,JBoss QE] [STORE,CustomStore,org.jboss.qa.management.mail.custom.CustomStore,JBoss QE] note: The test application have servlet also for EAP7 with javax namespace. This servlet with EAP 7.4 work fine and the custom providers are load. 

      Custom mail providers are not loaded as configured in the javamail.providers file in a deployment, see the steps to reproduce. 

      Setting priority to Blocker as it's a regression against EAP 7.4.

              yborgess1@redhat.com Yeray Borges Santana
              rhn-support-kstekovi Krystof Stekovic
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: