Thanks for the help as I seem to have resolved all the jBoss
problems. I think that jBoss was working all along.
As allways. :-)

When I search the java:/comp/env space I can see the following.
context Name: stuDB className: javax.naming.LinkRef
Which I think is good. Apart from the fact that the className is
LinkRef and not DataSource?

The problem arises when I inform TOPLink that either
java:/comp/env/stuDB or /comp/env/stuDB is the JNDI
bound DataSource to use. TOPLink tells me:

EXCEPTION DESCRIPTION: Cannot acquire DataSource: comp/env/stuDB
javax.naming.InvalidNameException: Not a compound name: comp/env/stuDB

I have informed TOPLink of this and am awaiting a response?


Rickard �berg wrote:
> 
> 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]

Reply via email to