Ferguson, Doug wrote:
> I will try to make this a little more clear.
>
> I have the following code in my bean and it doesn't work
> ** DataSource ds = (DataSource)ctx.lookup("java:comp/env/Falcon");
>
> When I changed the code to the code below, it works
> ** DataSource ds = (DataSource)ctx.lookup("java:/Falcon");
>
> I got the idea to try to change the jndi lookup when I saw jBoss
> messages on start-up saying - loading datasource /Falcon
> Any ideas what misconfiguration might casuse this behaviour?
Well, it sounds like you have your datasource bound to "java:/Falcon".
This is perfectly normal and how it should be. What you want in addition
is for the datasource that is at "java:/Falcon" to be available at
"java:comp/env/Falcon" in your bean.
To do this you need two things:
1) in your ejb-jar.xml, specify a resource reference to be bound to
"Falcon", i.e. <res-ref-name>Falcon</res-ref-name>
2) in your jboss.xml, specify that this is to point at "java:/Falcon" in
the global namespace. I don't know the exact syntax for this off the top
of my head, but I believe that it's documented on the web site.
Toby.
> Also, not sure what you didn't undestand about the 2nd sentence but was I
> was trying to say was that my jboss.xml maps the res-ref xa.Falcon to the
> jndi-name Falcon
>
> Thanks
> d.
>
> -----Original Message-----
> From: Toby Allsopp
> To: jBoss
> Sent: 1/13/01 6:48 AM
> Subject: Re: [jBoss-User] jBoss jndi = no comp/env ?
>
> Ferguson, Doug wrote:
>
>
>> I justed finished jumping through all the hurdles required to get
>> a bean in jBoss talking to oracle. One my problems was that I as
>> doing a lookup on the name java:/comp/env/Falcon where Falcon is my
>> jndi-name which is mapped to the ds. xa.Falcon I had to remove
>> the comp/env and use java:/Falcon. Is the com/env not an ejb standard?
>
> If
>
>> so, hava I misconfigured something?
>
>
> I'm having trouble parsing your second sentence, but I think you're
> saying that your bean is referring to "java:/comp/env/Falcon" and you
> have that mapped to "xa.Falcon" in jboss.xml. You then seem to say that
> you need to change your bean to look up "java:/Falcon" to make it work.
> This suggests that you want to map to the JNDI name "java:/Falcon" in
> jboss.xml.
>
> In answer to your questions: yes, it is and yes, you have.
>
> Toby.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]