Hi!

>I didn't see it in your deployment output, but restart your jBoss server
>and take a close look at the name being bound to your Datasource.  I
>found that  java:/ is prepended to the name I specify.
> If this is the
>case, in your example the JNDI name that is being bound to your
>datasource might be java:/jdbc/UnitStockingDB instead of
>java:comp/env/UnitStockingDB that you have specified in your code.

This is incorrect. The datasources are only bound to java:/yourname. Whether
or not they are bound to java:comp/env is determined by your deployment
descriptors.

>By the way, it seems that other EJB servers, e.g. Suns reference
>implementation, are adhearing to the standard of java:comp/ instead of
>java:/, am I correct?


They are probably like any EJB 1.1 compliant server, so yes. But so does
JBoss.

This is the rule: the datasource is initially bound to a "java:/" name such
as "java:/DefaultDS". Then, for each bean that has a datasource mapping we
also add it to the specified names, e.g. "java:comp/env/jdbc/MyDS". Each
bean has its own namespace for such mappings.

See docs for more info.

I'm not sure where you got the idea that JBoss did *not* support
"java:comp/env"!?

/Rickard




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to