Hi Rickard,
I have somewhat the same problem : I have configured postgresql as an
XADatasource. I called the connection pool "postgres".
Then, from my stateless bean I try to access it via "java:com/env" and look
for postgres.
I get : "postgres" not bound.
Where can the problem lie ?
Ciao, Jubin
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Im Auftrag von Rickard �berg
> Gesendet: Donnerstag, 17. August 2000 17:43
> An: jBoss
> Betreff: Re: [jBoss-User] xml descriptor and resource bindings
>
>
> Hi!
>
> Stuart Barlow wrote:
> >
> > When I make the following calls in my classes that the EJB call on.
> > I only get one name mentioned...
> > env
> >
> > Context context = new InitialContext();
> > NamingEnumeration ne = context.list("java:comp");
> > if ( ne == null ) {
> > System.out.println("ERROR: cannot get the naming enumeration");
> > }
> >
> > while ( ne.hasMore() ) {
> > NameClassPair np = (NameClassPair)ne.next();
> > System.out.println("context Name: " + np.getName() + "
> className: " + np.getClassName());
> > }
> >
> > Am I looking in the wrong name space?
>
> Sounds perfectly correct. The references are in java:comp/env, so if you
> enumerate java:comp you will only get "env". Try enumerating
> java:comp/env for a different story altogether...
>
> > When I make the following call...
> >
> > DataSource ds = (DataSource)context.lookup("stuDB");
> >
> > I do get the following exception...
> > javax.naming.NameNotFoundException: stuDB not bound
>
> You're not being very stringent here, buddy. Above you look in the
> java:comp namespace, but here you try the default namespace. Which is it
> gonna be? ;-)
>
> The correct name is (as described in the EJB spec): java:comp/env/stuDB
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]