XAM asbtraction

0 views
Skip to first unread message

romano.silva

unread,
Apr 23, 2009, 7:09:26 PM4/23/09
to XAM Developers Group
Hello,

would be correct to say that XAM is the JDBC of content storage?

I read several documents and what I understand is that the application
developers when creating an XSet will provide a sort of URL (XRI)
which should be associated with a VIM implementation, correct?

The same way if I use a JDBC url like jdbc:sqlserver I am saying to
the JDBC API that I want to use a driver that knows how to handle this
URL and the JDBC API will locate the SQL Server driver JAR which I
have on my classpath.

Do you have a list of VIM implementations already available for
download? I mean, we need to download those the same way we download
JDBC drivers, right?

Thanks,
Romano

Eugene Tan

unread,
Apr 24, 2009, 1:31:51 PM4/24/09
to xam-develo...@googlegroups.com

   In order to connect MySQL serve, you just need to invoke MySQL API as the following code:
  
   protected boolean connectMySQL() {
        //Register the JDBC driver for MySQL.
        try {
            Class.forName("com.mysql.jdbc.Driver");
            //Define URL of database server for
            // database named xam the localhost
            // with the default port number 3306.
            String url = "jdbc:mysql://localhost:3306/xam";

            //Get a connection to the database for a
            // user named auser with the password
            // drowssap, which is password spelled
            // backwards.
            Connection con = null;

            con = DriverManager.getConnection(url, "root", "");

            //Display URL and connection information
            System.out.println("URL: " + url);
            System.out.println("Connection: " + con);

            //Get a Statement object
            stmt = con.createStatement();

        } catch (ClassNotFoundException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (SQLException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
        return true;
    }


Reply all
Reply to author
Forward
0 new messages