currently hibernate requires the setting of a jndi class and jndi url, when
using a datasource.  i would like to make these optional.  to achieve this,
i have modified (but not commited) DatasourceConnectionProvider.java to look
like:

        // we want to be able to just use the defaults, if jndi environment
properties are not supplied
        if (jndi_class != null) {
            hash.put(Context.INITIAL_CONTEXT_FACTORY, jndi_class);
        }

        if (jndi_url != null) {
            hash.put(Context.PROVIDER_URL, jndi_url);
        }

        try {
          ctx = new InitialContext(hash);
          ....

this works fine in the web container i am currently using and fine in jboss.
however i don't know a great deal about jndi, so comments r welcome.  if i
don't hear anything negative over the next day, i will commit this.

thanx

brad

_______________________________
brad clow
chief technical officer
workingmouse

email: [EMAIL PROTECTED]
web:   http://www.workingmouse.com



_______________________________________________
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to