[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: JBOSS and MSSQL

Sherst do-not-reply at jboss.com
Tue Nov 18 09:28:41 EST 2008


anonymous wrote : Quote:
  | Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket
  | 
  | 
  | Are you sure the database server ipcc-dawsl.opc.aval on port 1433 is accessible from the system where JBoss is running? What does
  | 
  | Code:
  | 
  | telnet ipcc-dawsl.opc.aval 1433	
  | 
  | 
  | 
  | return from the JBoss system?


Hmm when I use direct connection to database (not data source pool) all workes fine:

  | 	public Connection getConnection() throws SQLException, ClassNotFoundException, javax.naming.NamingException {
  | 		Connection con = null;
  | 		Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
  | 		String url_base = "jdbc:microsoft:sqlserver://ipcc-daws1.opc.aval:1433;DatabaseName=aval_hds;";
  | 		con = DriverManager.getConnection(url_base, "user", "pass");
  | 		con.setAutoCommit(false);
  | 		/*if (ic == null) {
  | 			ic = new javax.naming.InitialContext();
  | 		}
  | 		pool = (DataSource)ic.lookup("java:jdbc/avalHDS-ds");
  | 		con = pool.getConnection();
  | 		con.setAutoCommit(false);*/
  | 
  | 		return con;
  | 	}

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190141#4190141

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190141



More information about the jboss-user mailing list