Ejemplo n.º 1
0
        // JobHandler activation / deactivation ///////////////////////////

//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, javax.resource.spi.ActivationSpec spec) throws javax.resource.ResourceException
        public virtual void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
        {
            if (jobHandlerActivation != null)
            {
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
                throw new ResourceException("The camunda BPM job executor can only service a single MessageEndpoint for job execution. " + "Make sure not to deploy more than one MDB implementing the '" + typeof(JobExecutionHandler).FullName + "' interface.");
            }
            JobExecutionHandlerActivation activation = new JobExecutionHandlerActivation(this, endpointFactory, (JobExecutionHandlerActivationSpec)spec);

            activation.start();
            jobHandlerActivation = activation;
        }
Ejemplo n.º 2
0
 public virtual void endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec spec)
 {
     try
     {
         if (jobHandlerActivation != null)
         {
             jobHandlerActivation.stop();
         }
     }
     finally
     {
         jobHandlerActivation = null;
     }
 }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public JobExecutionHandlerActivation(org.camunda.bpm.container.impl.threading.ra.JcaExecutorServiceConnector ra, javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, JobExecutionHandlerActivationSpec spec) throws javax.resource.ResourceException
        public JobExecutionHandlerActivation(JcaExecutorServiceConnector ra, MessageEndpointFactory endpointFactory, JobExecutionHandlerActivationSpec spec)
        {
            this.ra = ra;
            this.endpointFactory = endpointFactory;
            this.spec            = spec;
        }