01: /*
02: * Created by IntelliJ IDEA.
03: * User: mrettig
04: * Date: Aug 10, 2002
05: * Time: 1:03:51 AM
06: */
07: package net.sourceforge.jaxor.example.db;
08:
09: import net.sourceforge.jaxor.api.ConnectionFactory;
10: import net.sourceforge.jaxor.db.ConnectionRegistry;
11:
12: import java.sql.Connection;
13:
14: public class SqlServerConnection implements ConnectionFactory {
15:
16: public static SqlServerConnection INSTANCE = new SqlServerConnection();
17:
18: private final ConnectionRegistry reg = ConnectionRegistry
19: .getConnection(com.microsoft.jdbc.sqlserver.SQLServerDriver.class);
20:
21: private SqlServerConnection() {
22: }
23:
24: public Connection getConnection() {
25: //server=(local)\\NetSDK;Trusted_Connection=yes;database=Nexor
26: return reg
27: .create(
28: "jdbc:microsoft:sqlserver://192.168.1.100:1433;Trusted_Connection=yes;DatabaseName=jaxor",
29: "jaxor_test", "jaxor_test");
30: }
31: }
|