You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Per Newgro <pe...@gmx.ch> on 2011/01/07 19:57:46 UTC

How can i exchange the javamail provider in unit tests?

Hi all,

i'm facing a fiddly problem. I would like to test a slsb which is 
sending a mail
thru javamails Transport. The session required to setup the mail message 
i get
by using @Resource annotation for mail service. All works fine.

I would like to use mock_javamail api by jvnet to mock the mail 
provider. But i can't
get it to work. The provider is always the geronimo api bundled to 
openejb. And this
is sending me a socket write error :-(.

Because i always could customize my needs with the brilliant openejb 
server i would
like to know if this is possible (providing properties or openejb.xml).

Thanks for helping me
Per