/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.com
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.jfox.jdbc.xa.oracle;

import javax.sql.XADataSource;

import org.jfox.jdbc.xa.XADataSourceFactory;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class ORACLEXADataSourceFactory extends XADataSourceFactory {

  public XADataSource newXADataSource(String url) throws Exception {
    XADataSource oracleXads = (XADataSource)Thread.currentThread().getContextClassLoader().loadClass("oracle.jdbc.xa.client.OracleXADataSource").newInstance();
    oracleXads.getClass().getMethod("setURL",new Class[]{String.class})
            .invoke(oracleXads,new Object[]{url});
    return oracleXads;

  }

  public static void main(String[] args) {

  }
}