----- Original Message -----
From: "Hunter Hillegas" <[EMAIL PROTECTED]>
To: "JBoss 2" <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 5:17 PM
Subject: Re: [JBoss-user] Problems with JavaMail in JBoss


> Hmmmm... This is what I have in my jboss.xml:
>
>   <resource-managers>
>
>     <res-name>Mail</res-name>
>
>     <res-jndi-name>java:/Mail</res-jndi-name>
>
>   </resource-managers>
>
> and this in ejb-jar.xml:
>
>       <resource-ref>
>
>         <res-ref-name>Mail</res-ref-name>
>
>         <res-type>javax.mail.Session</res-type>
>
>         <res-auth>Container</res-auth>
>
>       </resource-ref>
>
Well, thats not the way to do it.
you sould do
    <resource-managers>
        <resource-manager>
            <res-name>mail/Mail</res-name>
            <res-jndi-name>java:/Mail</res-jndi-name>
        </resource-manager>
    </resource-managers>
note that the mail/ prefix is intendent to distinguish from ejb/ prefixed
enterprise beans.
this works even if Mail is not bound. I don't really know why, but if you
are uncertain you can allways move the JavaMail mlet between JDBC stuff and
J2EE-deployer stuff in jboss.jcml (AFAIK).

> When Jboss starts and loads my ejb jar, it says:
>
> [Container factory] No resource manager found for Mail
>
> It deploys the EJB a long time before it starts the mail service. One of
the
> last lines in the startup is Mail starting and getting bound.
>
> Could it be the order the services are starting that is causing this? If
> something tried to get a resource that isn't bound, but is then bound
later,
> should subsequent calls to the resource work?
>
> Thanks,
> Hunter
Welcome.
Burkhard


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to