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>
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
> From: "Burkhard Vogel" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 26 Jun 2001 12:00:21 +0200
> To: <[EMAIL PROTECTED]>
> Subject: Re: [JBoss-user] Problems with JavaMail in JBoss
>
> Yup,
> You need to add a resource-manager in jboss.xml mapping the java:/Mail to
> mail/Mail:
> <resource-managers>
> <resource-manager>
> <res-name>mail/Mail</res-name>
> <res-jndi-name>java:/Mail</res-jndi-name>
> </resource-manager>
> </resource-managers>
> Hope this helps,
> Burkhard
>
> ----- Original Message -----
> From: "Hunter Hillegas" <[EMAIL PROTECTED]>
> To: "JBoss 2" <[EMAIL PROTECTED]>
> Sent: Tuesday, June 26, 2001 3:55 AM
> Subject: [JBoss-user] Problems with JavaMail in JBoss
>
>
>> I'm trying to use the built-in JavaMail and having a few problems.
>>
>> In jboss.jcml, Mail is setup like this:
>>
>> <!-- Mail Connection Factory -->
>> <mbean code="org.jboss.mail.MailService" name=":service=Mail">
>> <attribute name="JNDIName">Mail</attribute>
>> <attribute name="ConfigurationFile">mail.properties</attribute>
>> <attribute
>> name="User">[EMAIL PROTECTED]</attribute>
>> <attribute name="Password">password</attribute>
>> </mbean>
>>
>> I have a MDB that tries to access the service like this:
>>
>> session = (Session)new InitialContext().lookup("java:comp/env/mail/Mail");
>>
>> When I deploy the bean, JBoss says:
>> [Container factory] No resource manager found for mail/Mail
>>
>> Mail seems to be the last thing to start and it says:
>>
>> [Mail Service] Mail Service 'Mail' bound to java:/Mail
>>
>> Any ideas what I'm doing wrong? I derived all of my code from the JavaMail
>> example in the JBoss manual. According to that, it looks correct.
>>
>> Any help is appreciated,
>> Hunter
>>
>>
>>
>> _______________________________________________
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user