2 Replies Latest reply on Mar 24, 2003 8:21 PM by abyss

    How can I get connection from pool with jts?

    abyss

      just in weblogic i can do it like this:
      Class.forName("weblogic.jdbc.jts.Driver");
      Properties properties = new Properties();
      properties.put("user","sys");
      properties.put("password","sss");
      myConnection = DriverManager.getConnection("jdbc:weblogic:jts:ejbPool",properties);

      how can i do in JBoss?
      Thanks!

        • 1. Re: How can I get connection from pool with jts?
          pazu

          Man, you're not getting a connection from the pool using the above statements, not even in WL.

          To use the connection pool you need to configure a datasource and bind it to a JNDI name. There is plenty of example in the jboss distributions: look for the "sample/jca" directory for this.

          Later you need to lookup the connection using JNDI. If you don't know how to do that, I recommend finding and reading a good book on it. "Mastering EJB" talks about this, albeit superficially.

          • 2. Re: How can I get connection from pool with jts?
            abyss

            In weblogic the statements will get connection.
            and jboss support JTS1.0 spec,I think it also can get datasource or non-jts-datasource from its driver.