Maybe a good question Rickard. :-)
This is what TOPLink are doing in their JNDIConnector code when
I pass them a string.
When should Composite and Compound names be used?
What is the difference between the two?
Basic info for a J2EE newbee.
Thanks.
Rickard �berg wrote:
>
> Hi!
>
> Stuart Barlow wrote:
> >
> > The problem with TOPLink and maybe jBoss is because when I pass the
> > string name of the datasource...
> > java:comp/env/stuDB
> >
> > onto TOPLink then they construct a CompositeName from the string.
>
> Why a CompositeName!?!?
>
> > And when they use the InitialContext.lookup(Name) method
> > they get the InvalidNameException: Not a compound name ERROR.
> >
> > When I do the following I get the same error...
> >
> > javax.naming.CompositeName dsName = new
> javax.naming.CompositeName("java:comp/env/stuDB");
> > DataSource ds2 = (DataSource)context.lookup(dsName);
> >
> > Error report from jBoss...
> > [Test] Error loading persistence service.
> javax.naming.InvalidNameException: Not a compound name:
> > comp/en
> > v/stuDB
> >
> > When looking things up in the InitialContext.lookup(Name) method
> > is it okay to pass in a CompositeName object?
>
> Should be, but I don't get it; why a CompositeName and not a
> CompoundName??
>
> /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]