Examples of XQDataSource


Examples of javax.xml.xquery.XQDataSource

    if (connectionPath == null)
    {
      throw new IllegalArgumentException("The JNDI path cannot be null");
    }

    XQDataSource ds = null;
    try
    {
      final Context ctx = getInitialContext();
      final Object lookup = ctx.lookup(connectionPath);
      if (lookup instanceof XQDataSource)
      {
        ds = (XQDataSource) lookup;
      }
      else
      {
        logger.warn(connectionPath + " is not a valid XQDataSource JNDI access");
      }
    }
    catch (Exception e)
    {
      JndiXQConnectionProvider.logger.error("Failed to access the JDNI-System", e);
    }

    if (ds != null)
    {
      if (username == null)
      {
        return ds.getConnection();
      }
      return ds.getConnection(username, password);
    }
    return null;
  }
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

      throw new IllegalArgumentException("The jdbc connection is not yet supported");
    }

    if (xqdatasource != null)
    {
      final XQDataSource datasource = (XQDataSource) ObjectUtilities.loadAndInstantiate(xqdatasource, DriverXQConnectionProvider.class, XQDataSource.class);
      if (datasource == null)
      {
        throw new IllegalArgumentException("Unable to load XQJ datasource driver: " + xqdatasource);
      }
      else
      {
        datasource.setProperties(properties);
        final XQConnection xqConnection = datasource.getConnection();
        return xqConnection;
        /*try
        {
          final Connection sqlConnection = DriverManager.getConnection(url, properties);
          datasource.setProperties(properties);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

        if (xqueryStr.length() == 0) {
            throw new CompilationException(__msgs.warnXPath20Syntax(DOMUtils.domToString(node), "empty string"));
        }

        try {
          XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();
           
            __log.debug("Compiling expression " + xqueryStr);
            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
        throws FaultException {
        try {
            OXQuery10ExpressionBPEL20 oxquery10 = ((OXQuery10ExpressionBPEL20) cexp);

            XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();

            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

            if (configuration == null)
            {
                configuration = new Configuration();
            }

            XQDataSource ds = new SaxonXQDataSource(configuration);
            connection = ds.getConnection();

            transformerPool.addObject();

        }
        catch (Throwable te)
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
        throws FaultException, EvaluationException {
        try {
            OXQuery10ExpressionBPEL20 oxquery10 = ((OXQuery10ExpressionBPEL20) cexp);

            XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();

            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

        if (xqueryStr.length() == 0) {
            throw new CompilationException(__msgs.warnXPath20Syntax(DOMUtils.domToString(node), "empty string"));
        }

        try {
            XQDataSource xqds = new SaxonXQDataSource(new Configuration());
            XQConnection xqconn = xqds.getConnection();

            __log.debug("Compiling expression " + xqueryStr);
            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type)
        throws FaultException, EvaluationException {
        try {
            OXQuery10ExpressionBPEL20 oxquery10 = ((OXQuery10ExpressionBPEL20) cexp);

            XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();

            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

        if (xqueryStr.length() == 0) {
            throw new CompilationException(__msgs.warnXPath20Syntax(DOMUtils.domToString(node), "empty string"));
        }

        try {
          XQDataSource xqds = new SaxonXQDataSource();
            XQConnection xqconn = xqds.getConnection();
           
            __log.debug("Compiling expression " + xqueryStr);
            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here

Examples of javax.xml.xquery.XQDataSource

        if (xqueryStr.length() == 0) {
            throw new CompilationException(__msgs.warnXPath20Syntax(DOMUtils.domToString(node), "empty string"));
        }

        try {
          XQDataSource xqds = new SaxonXQDataSource(new Configuration());
            XQConnection xqconn = xqds.getConnection();
           
            __log.debug("Compiling expression " + xqueryStr);
            Configuration configuration = ((SaxonXQConnection) xqconn).getConfiguration();
            configuration.setAllNodesUntyped(true);
            configuration.setHostLanguage(Configuration.XQUERY);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.