[jboss-as7-dev] datasources that begin with java:jdbc/ do not work in CR1...

David M. Lloyd david.lloyd at redhat.com
Sat Jul 2 12:33:59 EDT 2011


On 07/01/2011 12:46 PM, Jaikiran Pai wrote:
> On Friday 01 July 2011 07:49 PM, Jason Greene wrote:
>> java:/jdbc will work. Anything without the first slash is a special namespace
> I am not too sure we should start adding that meaning to the jndi names.
> For example, java:DefaultDS (just an example) shouldn't mean that it's a
> namespace.

The name "java:DefaultDS" should be invalid.  The reason we should treat 
these names specially is that we can not be sure that future EE 
specifications will or will not introduce additional namespaces than the 
four we know today.

Like I said before, we should be following these rules:

1) Unqualified relative names like "DefaultDS" or "jdbc/DefaultDS" 
should be qualified relative to "java:comp/env", "java:module/env", or 
"java:jboss/env", depending on the context.

2) Unqualified "absolute" names like "/jdbc/DefaultDS" should be 
qualified relative to a "java:jboss/root" name.

3) Qualified "absolute" names like "java:/jdbc/DefaultDS" should be 
qualified the same way as #2.

4) The special "java:jboss" namespace is shared across the entire AS 
server instance.

5) Any "relative" name with a "java:" lead-in must be in one of the five 
namespaces: "comp", "module", "app", "global", or our proprietary 
"jboss".  Any name starting with "java:xxx" where "xxx" is a name which 
is not equal to one of the above five would result in an invalid name error.

This allows us to have predictable and consistent rules for every name 
bound in the AS.  It also lets us define additional namespaces as specs 
evolve without running into compatibility problems.
-- 
- DML


More information about the jboss-as7-dev mailing list