Hi!
I have 2 mail resources in tomee.xml:
<Resource id="mail/mail1" type="javax.mail.Session">
mail.host=host1
mail.transport.protocol=smtps
mail.smtps.auth=true
mail.smtps.port=465
mail.smtps.ssl.trust=host1
mail.smtps.from=mail@host1
mail.smtps.user=mail@host1
password=pw
</Resource>
<Resource id="mail/mail2" type="javax.mail.Session">
mail.host=host2
mail.transport.protocol=smtps
mail.smtps.auth=true
mail.smtps.port=465
mail.smtps.ssl.trust=host2
mail.smtps.from=mail@host2
mail.smtps.user=mail@host2
password=pw
</Resource>
i reference them in the application's context.xml:
<Context>
<resource-ref>
<res-ref-name>mail/mail1</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>mail/mail2</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</Context>
But when the application is deployed, the auto-linking just goes to the mail1
resource and the mail2 resource is not used at all:
Feb 17, 2014 1:24:07 PM org.apache.openejb.config.AutoConfig processResourceRef
Information: Auto-linking resource-ref 'java:app/mail/mail2' in bean MyBean to
Resource(id=mail/mail1)
Can anybody tell me what's wrong here?
Thanks!
René