Package COM.cloudscape.core

Examples of COM.cloudscape.core.XaDataSource


    public synchronized XADataSource getDataSource (String dbName, boolean create) throws SQLException
    {
  try
  {
      XaDataSource xads = (COM.cloudscape.core.XaDataSource) DataSourceFactory.getXADataSource();
      int index1 = dbName.indexOf(cloudscape_3_6.driverName);

      if (index1 == -1)
    throw new SQLException("cloudscape_3_6.getDataSource - "+jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.invaliddb")+" Cloudscape");
      else
      {
    /*
     * Strip off any spurious parameters.
     */

    int index2 = dbName.indexOf(cloudscape_3_6.semicolon);
    String theDbName = null;

    if (index2 == -1)
    {
        theDbName = dbName.substring(index1+cloudscape_3_6.driverName.length());
    }
    else
    {
        theDbName = dbName.substring(index1+cloudscape_3_6.driverName.length(),index2);
    }

    /*
     * At present cloudscape does not allow remote
     * XA connections. So, we know the thing after the :
     * in the 'url' must be the database name. If this
     * restriction changes, we'll need to determine the
     * server name, port, and database name some other
     * way.
     */

    xads.setDatabaseName(theDbName);

    if (create)
        xads.setCreateDatabase("create");
     
    return (XADataSource) xads;
      }
  }
  catch (SQLException e1)
View Full Code Here


   
    public synchronized void shutdownDataSource (XADataSource ds) throws SQLException
    {
  try
  {
      XaDataSource xads = (COM.cloudscape.core.XaDataSource) ds;

      xads.setShutdownDatabase("shutdown");
  }
  catch (Exception e)
  {
      throw new SQLException("cloudscape_3_6 "+jdbcLogger.logMesg.getString("com.arjuna.ats.internal.jdbc.drivers.exception")+e);
  }
View Full Code Here

TOP

Related Classes of COM.cloudscape.core.XaDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.