[wildfly-dev] JavaMail provider module and jboss-deployment-structure.xml

Stuart Douglas stuart.w.douglas at gmail.com
Sun Jun 5 18:57:57 EDT 2016


At a guess I would say it is because modules import the META-INF directory
by default, while when using jboss-deployment-structure.xml you need to
explicitly add meta-inf="true".

Stuart

On Sat, May 21, 2016 at 11:47 PM, Carl Harris <ceharris414 at me.com> wrote:

> I have a custom JavaMail provider installed as a module in Wildfly 10.
>
> In the configuration, I specify a mail session using the custom provider
> like this:
>
>             <mail-session name="rcpt" jndi-name="FixedRecipient">
>                 <custom-server name="FixedRecipient">
>                    <!-- configuration properties hee -->
>                 </custom-server>
>             </mail-session>
>
>
> If I make the provider a global module in the configuration, a deployment
> can successfully use the provider.
>
> However, if I specify the provider as module dependency in
> jboss-deployment-structure.xml, when trying to create a javax.mail.Session
> using the provider, a NoSuchProviderException is thrown (as though the base
> Session implementation cannot find a META-INF/javamail.providers mapping
> that identifies the custom provider).
>
> I don't know whether specifying the provider as a deployment structure
> dependency should work or not, but it seems like it should.
>
> Can someone please explain?
>
> carl
>
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160606/405a0f61/attachment.html 


More information about the wildfly-dev mailing list