示例#1
0
  public void unregister(QName pid) throws BpelEngineException {
    if (__log.isTraceEnabled()) __log.trace("unregister: " + pid);

    try {
      _mngmtLock.writeLock().lockInterruptibly();
    } catch (InterruptedException ie) {
      __log.debug("unregister() interrupted.", ie);
      throw new BpelEngineException(__msgs.msgOperationInterrupted());
    }

    try {
      BpelProcess p;
      if (_engine != null) {
        p = _engine.unregisterProcess(pid);
        if (p != null) {
          _registeredProcesses.remove(p);
          XslTransformHandler.getInstance().clearXSLSheets(p.getProcessType());
          __log.info(__msgs.msgProcessUnregistered(pid));
        }
      }
    } catch (Exception ex) {
      __log.error(__msgs.msgProcessUnregisterFailed(pid), ex);
      throw new BpelEngineException(ex);
    } finally {
      _mngmtLock.writeLock().unlock();
    }
  }
示例#2
0
    public Object evaluate(List params) throws XPathFunctionException {
      if (params.size() < 2 || params.size() % 2 != 0) {
        throw new CompilationException(
            __msgs.errInvalidNumberOfArguments(Constants.EXT_FUNCTION_DOXSLTRANSFORM));
      }

      String xslUri = (String) params.get(0);
      OXslSheet xslSheet = _cctx.compileXslt(xslUri);
      try {
        XslTransformHandler.getInstance()
            .parseXSLSheet(
                _cctx.getOProcess().getQName(),
                xslSheet.getUri(),
                xslSheet.getSheetBody(),
                new XslCompileUriResolver(_cctx, _out));
      } catch (Exception e) {
        throw new CompilationException(__msgs.errXslCompilation(xslUri, e.toString()));
      }

      _out.setXslSheet(xslSheet.getUri(), xslSheet);
      return "";
    }
 /**
  * Initialize XSL Transformer
  *
  * @param properties properties
  * @throws ConfigurationException ConfigurationException
  */
 public void initialize(Map properties) throws ConfigurationException {
   TransformerFactory trsf = new net.sf.saxon.TransformerFactoryImpl();
   XslTransformHandler.getInstance().setTransformerFactory(trsf);
 }