1 Reply Latest reply on Mar 4, 2008 6:26 PM by James Kelly

    JDBC connection

    marx3 Apprentice

      how to get JDBC Connection in Seam Component (or in EJB)?
      I don't need transaction, I need to only read some data

        • 1. Re: JDBC connection
          James Kelly Newbie

          Have you run into problems with just using JNDI?

          InitialContext initialContext = new InitialContext();
          javax.sql.DataSource ds = (javax.sql.DataSource) initialContext.lookup(datasourcejndiname);
          Connection c = ds.getConnection();