org.apache.ode.bpel.engine
Class BpelServerImpl

java.lang.Object
  extended by org.apache.ode.bpel.engine.BpelServerImpl
All Implemented Interfaces:
BpelServer, Scheduler.JobProcessor

public class BpelServerImpl
extends java.lang.Object
implements BpelServer, Scheduler.JobProcessor

The BPEL server implementation.

This implementation is intended to be thread safe. The key concurrency mechanism is a "management" read/write lock that synchronizes all management operations (they require "write" access) and prevents concurrent management operations and processing (processing requires "read" access). Write access to the lock is scoped to the method, while read access is scoped to a transaction.


Constructor Summary
BpelServerImpl()
           
 
Method Summary
 BpelEngine getEngine()
          Get the BpelEngine interface for handling transaction operations.
 void init()
          Initialize the BPEL engine.
 void onScheduledJob(Scheduler.JobInfo jobInfo)
           
 void register(ProcessConf conf)
          Register a process with the server.
 void registerBpelEventListener(BpelEventListener listener)
          Register a global listener to receive BpelEvents froom all processes.
 void registerExternalVariableEngine(ExternalVariableModule eve)
           
 void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
          Register a global message exchange interceptor.
 void setBindingContext(BindingContext bc)
          Configure the with a binding context.
 void setConfigProperties(java.util.Properties configProperties)
           
 void setDaoConnectionFactory(BpelDAOConnectionFactory daoCF)
          Set the DAO connection factory.
 void setDehydrationPolicy(DehydrationPolicy dehydrationPolicy)
           
 void setEndpointReferenceContext(EndpointReferenceContext eprContext)
          Configure the with an endpoint-reference (EPR) context.
 void setInMemDaoConnectionFactory(BpelDAOConnectionFactory daoCF)
           
 void setMessageExchangeContext(MessageExchangeContext mexContext)
          Configure the with a message-exchange context.
 void setScheduler(Scheduler scheduler)
          Configure the with a scheduler.
 void shutdown()
          Called to shutdown the BPEL egnine.
 void start()
          Start the BPEL engine.
 void stop()
          Stop the BPEL engine: results in the cessation of process execution.
 void unregister(javax.xml.namespace.QName pid)
          Unregister a process from the server.
 void unregisterBpelEventListener(BpelEventListener listener)
          Unregister a global listener from receive BpelEvents from all processes.
 void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
          Unregister a global message exchange interceptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BpelServerImpl

public BpelServerImpl()
Method Detail

start

public void start()
Description copied from interface: BpelServer
Start the BPEL engine. The BPEL engine will not execute process instances until it is started.

Specified by:
start in interface BpelServer

registerExternalVariableEngine

public void registerExternalVariableEngine(ExternalVariableModule eve)

registerBpelEventListener

public void registerBpelEventListener(BpelEventListener listener)
Register a global listener to receive BpelEvents froom all processes.

Parameters:
listener -

unregisterBpelEventListener

public void unregisterBpelEventListener(BpelEventListener listener)
Unregister a global listener from receive BpelEvents from all processes.

Parameters:
listener -

stop

public void stop()
Description copied from interface: BpelServer
Stop the BPEL engine: results in the cessation of process execution.

Specified by:
stop in interface BpelServer

init

public void init()
          throws BpelEngineException
Description copied from interface: BpelServer
Initialize the BPEL engine. The various contexts needed by the engine must be configured before this method is called.

Specified by:
init in interface BpelServer
Throws:
BpelEngineException

shutdown

public void shutdown()
              throws BpelEngineException
Description copied from interface: BpelServer
Called to shutdown the BPEL egnine.

Specified by:
shutdown in interface BpelServer
Throws:
BpelEngineException

getEngine

public BpelEngine getEngine()
Description copied from interface: BpelServer
Get the BpelEngine interface for handling transaction operations.

Specified by:
getEngine in interface BpelServer
Returns:
transactional BpelEngine interfacce

register

public void register(ProcessConf conf)
Description copied from interface: BpelServer
Register a process with the server.

Specified by:
register in interface BpelServer

unregister

public void unregister(javax.xml.namespace.QName pid)
                throws BpelEngineException
Description copied from interface: BpelServer
Unregister a process from the server.

Specified by:
unregister in interface BpelServer
Parameters:
pid - process to unregister
Throws:
BpelEngineException

registerMessageExchangeInterceptor

public void registerMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
Register a global message exchange interceptor.

Parameters:
interceptor - message-exchange interceptor

unregisterMessageExchangeInterceptor

public void unregisterMessageExchangeInterceptor(MessageExchangeInterceptor interceptor)
Unregister a global message exchange interceptor.

Parameters:
interceptor - message-exchange interceptor

onScheduledJob

public void onScheduledJob(Scheduler.JobInfo jobInfo)
                    throws Scheduler.JobProcessorException
Specified by:
onScheduledJob in interface Scheduler.JobProcessor
Throws:
Scheduler.JobProcessorException

setDehydrationPolicy

public void setDehydrationPolicy(DehydrationPolicy dehydrationPolicy)

setConfigProperties

public void setConfigProperties(java.util.Properties configProperties)

setMessageExchangeContext

public void setMessageExchangeContext(MessageExchangeContext mexContext)
                               throws BpelEngineException
Description copied from interface: BpelServer
Configure the with a message-exchange context. BPEL engine uses this context to initiate communication with external services.

Specified by:
setMessageExchangeContext in interface BpelServer
Parameters:
mexContext - MessageExchangeContext implementation
Throws:
BpelEngineException
See Also:
MessageExchangeContext

setScheduler

public void setScheduler(Scheduler scheduler)
                  throws BpelEngineException
Description copied from interface: BpelServer
Configure the with a scheduler.

Specified by:
setScheduler in interface BpelServer
Throws:
BpelEngineException

setEndpointReferenceContext

public void setEndpointReferenceContext(EndpointReferenceContext eprContext)
                                 throws BpelEngineException
Description copied from interface: BpelServer
Configure the with an endpoint-reference (EPR) context. BPEL engine uses this context to EPRs.

Specified by:
setEndpointReferenceContext in interface BpelServer
Parameters:
eprContext - EndpointReferenceContext implementation
Throws:
BpelEngineException
See Also:
EndpointReferenceContext

setDaoConnectionFactory

public void setDaoConnectionFactory(BpelDAOConnectionFactory daoCF)
                             throws BpelEngineException
Set the DAO connection factory. The DAO is used by the BPEL engine to persist information about active processes.

Parameters:
daoCF - BpelDAOConnectionFactory implementation.
Throws:
BpelEngineException

setInMemDaoConnectionFactory

public void setInMemDaoConnectionFactory(BpelDAOConnectionFactory daoCF)

setBindingContext

public void setBindingContext(BindingContext bc)
Description copied from interface: BpelServer
Configure the with a binding context. The BPEL engine uses this context to register the services that it exposes and obtain communication links to partner services.

Specified by:
setBindingContext in interface BpelServer
Parameters:
bc - BindingContext implementation
See Also:
BindingContext