You are exactly right and I know all this. However this did not
work for jBoss instead I had to use.
DataSource ds = (DataSource)ctx.lookup("java:/Falcon");
Any ideas what might cause this wierd behavior?
Thanks.
d.
-----Original Message-----
From: Scott M Stark
To: jBoss
Sent: 1/13/01 12:47 PM
Subject: Re: [jBoss-User] jBoss jndi = no comp/env ?
The convention is java:comp/env/XXX, not java:/comp/env/XXX
For a resource such as a jdbc data source, you would have an ejb-jar
entry like:
<resource-ref>
<res-ref-name>jdbc/Falcon</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and then the bean would access it using:
DataSource ds = (DataSource)
ctx.lookup("java:comp/env/jdbc/Falcon");
Have you tried this? Section 14.4.1.1 of the ejb 1.1 spec talks about
the
recommened use of JNDI:
The EJB specification recommends, but does not require, that all
resource manager connection
factory references be organized in the subcontexts of the bean's
environment, using a different
subcontext for each resource manager type. For example, all JDBCT
DataSource references
might be declared in the java:comp/env/jdbcsubcontext, and all JMS
connection facto-ries
in the java:comp/env/jmssubcontext. Also, all JavaMail connection
factories might
be declared in the java:comp/env/mailsubcontext and all URL connection
factories in
the java:comp/env/url subcontext.
----- Original Message -----
From: "Ferguson, Doug" <[EMAIL PROTECTED]>
To: "'jBoss '" <[EMAIL PROTECTED]>
Sent: Saturday, January 13, 2001 2:04 AM
Subject: [jBoss-User] jBoss jndi = no comp/env ?
> 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?
>
> Thanks.
> d.
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]