7 Replies Latest reply on Nov 20, 2001 11:29 AM by danch1

    ConnectionPool and JNDI name

    kundur

      I am able to configure a Connection pool for oracle. However I have problems in accessing this connection from a program running in a different JVM (different from JBOSS JVM).

      Is there any way to assign the connection pool a JNDI name and then access it using the JNDI name (in a way similar to Weblogic).

      Thanks

      Kundur

        • 1. Re: ConnectionPool and JNDI name
          foglesa

          you must be trying to access it as java:/poolname.

          You can access it under the global namespace. i.e. if you poolname is OracleDS then it is in the global namespace as "OracleDS" and you can do the following. Assuming you have an initial Context (ctx).

          DataSource ds = (DataSource)ctx.lookup("OracleDS");

          Al

          • 2. Re: ConnectionPool and JNDI name
            danch1

            > I am able to configure a Connection pool for oracle.
            > However I have problems in accessing this connection
            > from a program running in a different JVM (different
            > from JBOSS JVM).

            That Won't Work. I know that WebLogic lets you do this; that doesn't make it a good idea.

            • 3. Re: ConnectionPool and JNDI name
              danch1


              >
              > DataSource ds = (DataSource)ctx.lookup("OracleDS");

              OK. Try this in JBoss. This won't even work in the same process.

              • 4. Re: ConnectionPool and JNDI name
                foglesa

                in Weblogic or Jboss? I have used it in Jboss (well in a client calling Jboss). as long as OracleDS is in the global namespace of course. (or whatever the DS is named). It works in the same VM or from external VM.

                Al

                • 5. Re: ConnectionPool and JNDI name
                  danch1

                  If it works from another process with oracle, you're lucky, and not using the JBoss pools. Jboss's pools are neither serializable nor remote. You can't call them from another process.

                  • 6. Re: ConnectionPool and JNDI name
                    kundur

                    I have tried it in JBOSS. It does not work.

                    It works ok in Weblogic.

                    • 7. Re: ConnectionPool and JNDI name
                      danch1

                      It isn't supposed to work in JBoss. It will not be supported in JBoss (until someone builds a client-container, at any rate - and nobody is even talking about doing that).