/** * Default constructor receiving an extension point * @param extensionPoints */ public BPELImplementationProviderFactory(ExtensionPointRegistry extensionPoints) { GeronimoTxFactory txFactory = new GeronimoTxFactory(); txMgr = txFactory.getTransactionManager(); this.odeServer = new EmbeddedODEServer(txMgr); }
/** * Undeploy the BPEL process implementation from the ODE Engine * @param d - ODEDeployment structure */ public void undeploy(ODEDeployment d) { TuscanyProcessConfImpl processConf = d.getProcessConf(); if( processConf != null ) { processConf.stop(); } // end if } // end method undeploy
/** * @param implementation */ public DeploymentWorkspace(BPELImplementation implementation) { super(); this.implementation = implementation; this.workingDir = createWorkingDirectory(); }
private void initTxMgr() { if(_txMgr == null) { try { GeronimoTxFactory txFactory = new GeronimoTxFactory(); _txMgr = txFactory.getTransactionManager(); } catch (Exception e) { __log.fatal("Couldn't initialize a transaction manager using Geronimo's transaction factory.", e); throw new ODEInitializationException("Couldn't initialize a transaction manager using " + "Geronimo's transaction factory.", e); } } }
public EndpointReference activateMyRoleEndpoint(QName pid, Endpoint endpoint) { // This will be needed when we support callBacks if (__log.isDebugEnabled()) { __log.debug("Activating MyRole Endpoint : " + pid + " - " + endpoint.serviceName); } QName processName = getProcessName(pid); return new TuscanyEPR(processName, endpoint); }
/** * Return the BPEL Process ID - which is the Process QName appended "-versionnumber" */ public QName getProcessId() { //System.out.println("getProcessId called"); QName processType = getType(); QName processID = new QName( processType.getNamespaceURI(), processType.getLocalPart() + "-" + getVersion() ); return processID; } // end getProcessID
public PartnerRoleChannel createPartnerRoleChannel(QName pid, PortType portType, Endpoint endpoint) { if (__log.isDebugEnabled()) { __log.debug("Create PartnerRole channel : " + pid + " - " + portType.getQName() + " - "+ endpoint.serviceName); } QName processName = getProcessName(pid); return new TuscanyPRC(processName, pid, portType, endpoint); }
/** * Resolve an end-point reference from its XML representation. The * nature of the representation is determined by the integration * layer. The BPEL engine uses this method to reconstruct * {@link EndpointReference} objects that have been persisted in the * database via {@link EndpointReference#toXML(javax.xml.transform.Result)} * method. * * @param XML representation of the EPR * @return reconstituted EPR object {@link EndpointReference} */ public EndpointReference resolveEndpointReference(Element epr) { return new ODEEndpointReference( epr ); } // end method resolveEndpointReference
/** * Returns the URI for the directory containing the BPEL process */ public URI getBaseURI() { //System.out.println("getBaseURI called"); File theDir = getDirectory(); return theDir.toURI(); }
/** * Method which receives events from the ODE Engine as processing proceeds */ public void onEvent(BpelEvent bpelEvent) { if( bpelEvent instanceof ProcessMessageExchangeEvent || bpelEvent instanceof NewProcessInstanceEvent || bpelEvent instanceof CorrelationMatchEvent ) { handleProcMexEvent( (ProcessMessageExchangeEvent) bpelEvent ); return; } // end if } // end method onEvent
public ODEExternalService(EmbeddedODEServer server) { this._server = server; this._sched = _server.getScheduler(); }
public boolean delete() { return deleteFiles(workingDir); }
/** * Gets the directory containing the BPEL process * @return */ static File getDirectory(String location) { File file = getContainer(location); if (file == null) { return null; } File theDir = file.getParentFile(); return theDir; } // end getDirectory
/** * Gets the directory containing the BPEL process * @return */ private File getDirectory() { File theDir = getBPELFile().getParentFile(); return theDir; } // end getDirectory
/** * Get the size in bytes of the CBP file * @return - this size in bytes of the CBP file, 0 if the file cannot be found */ public long getCBPFileSize() { File cbpFile = getCBPFile(); if( cbpFile == null ) return 0; return cbpFile.length(); } // end getCBPFileSize
/** * Gets the directory containing the BPEL process * @return */ private File getDirectory() { File theDir = getBPELFile().getParentFile(); return theDir; } // end getDirectory
/** * Converts an endpoint reference from its XML representation to another * type of endpoint reference. * * @param targetType * @param sourceEndpoint * @return converted EndpointReference, being of targetType */ public EndpointReference convertEndpoint( QName targetType, Element sourceEndpoint) { // For the present, Tuscany only has one type of EndpointReference, so that the // targetType parameter is of no significance. return new ODEEndpointReference( sourceEndpoint ); } // end method convertEndpoint
/** * @param implementation */ public DeploymentWorkspace(BPELImplementation implementation, File workingDir) { super(); this.implementation = implementation; this.workingDir = workingDir; if (this.workingDir == null) { this.workingDir = createWorkingDirectory(); } }
/** * Returns the name of the directory containing the BPEL files */ public String getPackage() { //System.out.println("getPackage called"); File theDir = getDirectory(); return theDir.getName(); } // end getPackage
public EndpointReference getInitialEndpointReference() { return new ODEEndpointReference( this.endpoint ); } // end method getInitialEndpointReference