[jboss-user] [EJB 3.0] - Re: JBoss 5 deployment error
jhsingle
do-not-reply at jboss.com
Fri Jan 2 10:21:17 EST 2009
Here is my application.xml (which is auto-generated by our maven build)
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE application PUBLIC
| "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
| "http://java.sun.com/dtd/application_1_3.dtd">
| <application>
| <display-name>workflow-ear</display-name>
| <description>Contract for Consumers of Blackbook Components, defining and
| centralizing the dependency management contract</description>
| <module>
| <ejb>workflow-ejb-2.7.0.jar</ejb>
| </module>
| <module>
| <ejb>usermgmt-ejb-2.7.0.jar</ejb>
| </module>
| <module>
| <web>
| <web-uri>usermgmt-war-2.7.0.war</web-uri>
| <context-root>usermgmt</context-root>
| </web>
| </module>
| <module>
| <web>
| <web-uri>workflow-war-2.7.0.war</web-uri>
| <context-root>workflow</context-root>
| </web>
| </module>
| </application>
|
And here is the jboss-app.xml
| <jboss-app>
|
| <loader-repository >
| dot.com:loader=workflow.ear
| <loader-repository-config>
| java2ParentDelegaton=true
| </loader-repository-config>
| </loader-repository>
|
| </jboss-app>
|
Here is the WorkflowEngine bean class
| package workflow.ejb.server;
|
| import java.io.Serializable;
| import java.lang.reflect.Method;
| import java.util.ArrayList;
| import java.util.Date;
| import java.util.HashMap;
| import java.util.List;
| import java.util.Map;
|
| import javax.annotation.security.RolesAllowed;
| import javax.ejb.Stateless;
| import javax.ejb.TransactionAttribute;
| import javax.ejb.TransactionAttributeType;
| import javax.ejb.TransactionManagement;
| import javax.ejb.TransactionManagementType;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| import javax.persistence.Query;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jboss.ejb3.annotation.LocalBinding;
|
| import security.ejb.client.User;
| import workflow.ejb.client.ExecutionDetail;
| import workflow.ejb.client.ExecutionSummary;
| import workflow.ejb.client.ResultingParams;
| import workflow.ejb.client.StateDefinition;
| import workflow.ejb.client.StepDefinition;
| import workflow.ejb.client.TransitionDefinition;
| import workflow.ejb.client.TransitionReference;
| import workflow.ejb.client.WorkflowEngineLocal;
| import workflow.ejb.util.ParamUtil;
| import workflow.ejb.util.XPDLUtil;
|
| /**
| * Processes workflow. Uses Declaritive Transaction Mgmt for individual methods.
| */
| @Stateless
| @RolesAllowed( { "UNCLASSIFIED" })
| @LocalBinding(jndiBinding = "workflow/WorkflowEngine/local")
| @TransactionManagement(value = TransactionManagementType.CONTAINER)
| public class WorkflowEngine implements Serializable, WorkflowEngineLocal {
|
| /**
| * The class logger
| */
| private static Log logger = LogFactory.getLog(WorkflowEngine.class);
|
| /** workflow engine */
| @javax.annotation.Resource(mappedName = "workflow/WorkflowEngine/local")
| private WorkflowEngineLocal workflowEngineLocal;
|
| /**
| * The entity manager
| */
| protected @PersistenceContext(unitName = "workflow")
| EntityManager em;
|
| /**
| * Sets the execution summary id of the execution detail.
| *
| * @param executionSummaryId
| * @param executionDetailCopy
| */
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void addExecutionDetailToExecutionSummary(long executionSummaryId,
| ExecutionDetail executionDetailCopy) {
|
| Query updateComplete = em
| .createNativeQuery("update EXECUTION_DETAIL set EX_SUMMARY_ID = :first where ID = :second");
|
| updateComplete.setParameter("first", executionSummaryId);
| updateComplete.setParameter("second", executionDetailCopy.getId());
| updateComplete.executeUpdate();
| }
|
| /**
| * Make sure that all transition definitions for a join have an associated
| * execution detail meaning that the join can proceed.
| *
| * @param tdList
| * @param esId
| * @return boolean
| */
| @SuppressWarnings("unchecked")
| public boolean areAllJoinTransitionsFinished(
| List<TransitionDefinition> tdList, long esId) {
|
| if (tdList == null) {
| logger.error("No transitions found for fork in execution summary: "
| + esId);
| return false;
| }
|
| for (TransitionDefinition td : tdList) {
|
| Query query = em
| .createQuery("from ExecutionDetail e "
| + " WHERE e.associatedStepId =:first AND e.executionSummaryId =:second AND e.completed =:third");
|
| query.setParameter("first", td.getId());
| query.setParameter("second", esId);
| query.setParameter("third", Long.parseLong("1"));
|
| List<ExecutionDetail> edList = query.getResultList();
| long edSize = edList.size();
|
| if (edSize < 1) {
| return false;
| }
| }
| return true;
| }
|
| /**
| * Checks if an execution detail exists for an execution summary and step
| * definition id.
| *
| * @param executionSummaryId
| * @param stepDefinitionId
| * @return int
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public int checkIfExecutionDetailExists(long executionSummaryId,
| long stepDefinitionId) {
| Query lockQuery = em
| .createNativeQuery("SELECT ID FROM EXECUTION_DETAIL WHERE EX_SUMMARY_ID = :first AND STEP_ID= :second ");
|
| lockQuery.setParameter("first", executionSummaryId);
| lockQuery.setParameter("second", stepDefinitionId);
|
| List results = lockQuery.getResultList();
| int noUpdate = 0;
| if (results != null && results.size() != 0) {
| noUpdate = 1;
| }
|
| return noUpdate;
| }
|
| /**
| * Creates a result params entry for an execution detail and execution
| * summary. This method does not insert the LOB, PARAMS_AS_XML.
| *
| * @param executionSummaryId
| * @param executionDetailId
| * @return int - number inserted
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public int createResultParams(long executionSummaryId,
| long executionDetailId) {
|
| // adding execution ids to entry and result param tables.
| Query insertRPQuery = em
| .createNativeQuery("INSERT INTO RESULTING_PARAMS(EX_DETAIL_ID,EX_SUMMARY_ID) "
| + " VALUES (:first,:second)");
| insertRPQuery.setParameter("first", executionDetailId);
| insertRPQuery.setParameter("second", executionSummaryId);
| int noInsert = insertRPQuery.executeUpdate();
|
| return noInsert;
| }
|
| /**
| * Get previous steps' execution params add the definition params.
| *
| * @param eSummaryId
| * @param edId
| * @param stateDef
| * @return params
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public Map<String, Object> getDefinitionParams(long eSummaryId, long edId,
| StateDefinition stateDef) {
|
| // get previous steps' execution params
| Map<String, Object> params = new HashMap<String, Object>();
|
| // add the definition params.
| params.putAll(stateDef.getParams());
|
| return params;
| }
|
| /**
| * Get Execution Detail based on execution summary and step definition. This
| * method is highly nested.
| *
| * @param executionSummaryId
| * The id of an ExecutionSummary
| * @param stepDefinitionId
| * The id of a StepDefinition
| * @return ExecutionDetail the execution detail for the associated
| * ExecutionSummary and StepDefinition.
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public ExecutionDetail getExecutionDetail(long executionSummaryId,
| long stepDefinitionId) {
|
| int noUpdate = workflowEngineLocal.checkIfExecutionDetailExists(
| executionSummaryId, stepDefinitionId);
|
| if (noUpdate == 0) {
| workflowEngineLocal.insertExecutionDetail(executionSummaryId,
| stepDefinitionId);
| }
|
| Query query = em
| .createQuery("from ExecutionDetail e WHERE e.executionSummaryId =:first AND e.associatedStepId =:second");
|
| // get execution detail of previous step.
| query.setParameter("first", executionSummaryId);
| query.setParameter("second", stepDefinitionId);
|
| // long edqtime = System.currentTimeMillis();
| List<ExecutionDetail> edList = query.getResultList();
|
| ExecutionDetail eDetail = null;
| // Add in the results in order.
| for (ExecutionDetail executionDetailFromQuery : edList) {
| eDetail = executionDetailFromQuery;
| }
|
| // adding execution ids to entry and result param tables.
| if (noUpdate == 0) {
| workflowEngineLocal.createResultParams(executionSummaryId, eDetail
| .getId());
| }
|
| return eDetail;
| }
|
| /**
| * Get the next TransitionDefinition for a fromState.
| *
| * @param stateDefId
| * @return TransitionDefinition
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public TransitionDefinition getNextTransitionDefinition(long stateDefId) {
| Query query = em
| .createQuery("from TransitionDefinition t WHERE t.fromState.id =:first ");
| query.setParameter("first", stateDefId);
|
| List<TransitionDefinition> edList = query.getResultList();
|
| TransitionDefinition td = null;
| if (edList != null && edList.size() > 0) {
| td = edList.get(0);
| }
|
| return td;
| }
|
| /**
| * Gets the resulting params for an execution detail.
| *
| * @param edId
| *
| * @param stepDefinition
| * a step definition
| * @param esId
| * Execution summary id
| * @return Map containing parameters
| */
|
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public Map<String, Object> getPersistedParams(long edId, long esId) {
|
| Query query = em
| .createQuery(
| "from ResultingParams rp WHERE rp.exSummaryId =:first AND rp.exDetailId =:second")
| .setHint("org.hibernate.readOnly", Boolean.TRUE);
|
| // get execution detail of previous step.
| query.setParameter("first", esId);
|
| query.setParameter("second", edId);
|
| List<ResultingParams> resultParamList = query.getResultList();
| Map<String, Object> params = new HashMap<String, Object>();
|
| if (resultParamList != null) {
| // Add in the results in order.
| for (ResultingParams resultParam : resultParamList) {
| params.putAll(ParamUtil.paramsAsXML(resultParam
| .getResultingParamsAsXML(), true));
| }
| }
|
| return params;
| }
|
| /**
| * Gets the params from the previous transition definition.
| *
| * @param eSummaryId
| * @param stateDef
| * @return runtimeParams
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public Map<String, Object> getRuntimeParams(long eSummaryId,
| StateDefinition stateDef) {
| Map<String, Object> runtimeParams = new HashMap<String, Object>();
|
| List<TransitionDefinition> transitionDefinitionList = workflowEngineLocal
| .getTransitionDefinitionsWithToId(stateDef.getId());
| for (TransitionDefinition td : transitionDefinitionList) {
|
| ExecutionDetail prevED = workflowEngineLocal.getExecutionDetail(
| eSummaryId, td.getFromState().getId());
| runtimeParams.putAll(workflowEngineLocal.getPersistedParams(prevED
| .getId(), eSummaryId));
| }
|
| return runtimeParams;
| }
|
| /**
| * Get TransitionDefinitions for a transitionReference id.
| *
| * @param transitionReferenceId
| * @return List of TransitionDefinitionS
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public List<TransitionDefinition> getTransitionDefinitions(
| long transitionReferenceId) {
|
| Query fetchTQuery = em
| .createQuery(
| "from TransitionDefinition td WHERE td.transitionReference.id =:first")
| .setHint("org.hibernate.readOnly", Boolean.TRUE);
| fetchTQuery.setParameter("first", transitionReferenceId);
| List<TransitionDefinition> transitionDefinitionList = fetchTQuery
| .getResultList();
| if (transitionDefinitionList != null) {
|
| }
| return transitionDefinitionList;
| }
|
| /**
| * Get TransitionDefinitions for a toState id.
| *
| * @param toStateDefId
| * @return List of TransitionDefinitionS
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public List<TransitionDefinition> getTransitionDefinitionsWithToId(
| long toStateDefId) {
|
| Query fetchTQuery = em.createQuery(
| "from TransitionDefinition td WHERE td.toState.id =:first")
| .setHint("org.hibernate.readOnly", Boolean.TRUE);
| fetchTQuery.setParameter("first", toStateDefId);
|
| List<TransitionDefinition> tdList = new ArrayList<TransitionDefinition>();
| try {
|
| List<TransitionDefinition> tempTdList = fetchTQuery.getResultList();
| if (tempTdList != null && tempTdList.size() > 0) {
| tdList = getTransitionDefinitions(tempTdList.get(0)
| .getTransitionReference().getId());
| }
| } catch (javax.persistence.NoResultException e) {
| logger.error("No transition defs found with " + toStateDefId
| + " as a 'To' state.", e);
| }
|
| return tdList;
| }
|
| /**
| * Handle action for a state definition.
| *
| * @param stateDefinition
| * a state Definition
| * @param definitionParams
| * @param runtimeParams
| * @param params
| * The state parameters
| * @param user
| * a User
| * @return a Map<String, Object> the results of a action class method
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public Map<String, Object> handleAction(StateDefinition stateDefinition,
| Map<String, Object> definitionParams,
| Map<String, Object> runtimeParams, User user) {
| Map<String, Object> retmap = null;
| try {
|
| definitionParams.put("user", user);
|
| Class c = Class.forName(stateDefinition.getActionClass());
| Class[] argClasses = new Class[3];
| argClasses[0] = StateDefinition.class;
| argClasses[1] = Map.class;
| argClasses[2] = Map.class;
| Method mymethod = c.getMethod(stateDefinition.getActionMethod(),
| argClasses);
| Object[] args = new Object[3];
| args[0] = stateDefinition;
| args[1] = definitionParams;
| args[2] = runtimeParams;
| Object obj = c.newInstance();
| retmap = (Map<String, Object>) mymethod.invoke(obj, args);
| } catch (Exception e) {
| logger.error("An error occured while running an algorithm", e);
| throw new RuntimeException(
| "An error occured while running an algorithm");
| }
| return retmap;
| }
|
| /**
| * Create execution detail.
| *
| * @param executionSummaryId
| * @param stepDefinitionId
| * @return number inserted
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public int insertExecutionDetail(long executionSummaryId,
| long stepDefinitionId) {
|
| Query insertQuery = em
| .createNativeQuery("INSERT INTO EXECUTION_DETAIL(EX_SUMMARY_ID, STEP_ID) "
| + " VALUES (:first, :second)");
|
| insertQuery.setParameter("first", executionSummaryId);
| insertQuery.setParameter("second", stepDefinitionId);
| int noInsert = insertQuery.executeUpdate();
| return noInsert;
| }
|
| /**
| * Send message to queue.
| *
| * @param eSummaryId
| * @param tdId
| * @param user
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void postMessageForNextStep(long eSummaryId, long tdId, User user) {
| WorkflowUtil.sendMessage(WorkflowManager.queueName, tdId, user,
| eSummaryId);
| }
|
| /**
| * Get the ExecutionDetail,StepDefinition,ExecutionSummary and process the
| * next step.
| *
| * @param eSummaryId
| * @param stepDefId
| * @param user
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void process(long eSummaryId, long stepDefId, User user) {
|
| // get objects by their id.
| ExecutionDetail executionDetail = workflowEngineLocal
| .getExecutionDetail(eSummaryId, stepDefId);
| StepDefinition stepDefinition = em
| .find(StepDefinition.class, stepDefId);
| ExecutionSummary executionSummary = em.find(ExecutionSummary.class,
| eSummaryId);
|
| // if all needed objects were found, process this step
| if (executionSummary != null
| && executionSummary.getWhenCompleted() == null
| && stepDefinition != null) {
| workflowEngineLocal.processStep(executionSummary, stepDefinition,
| executionDetail, user);
| }
| }
|
| /**
| * Process a FORK step.
| *
| * @param eDetail
| * @param tDef
| * @param tRef
| * @param eSummaryId
| * @param user
| */
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void processFork(ExecutionDetail eDetail, TransitionDefinition tDef,
| TransitionReference tRef, long eSummaryId, User user) {
|
| // place all transitions into queue. Since each will get called
| // do the same thing as a
| // series. We just don't have a condition.
| eDetail.setActionClassCalled("FORK");
|
| List<TransitionDefinition> transitionDefinitionList = workflowEngineLocal
| .getTransitionDefinitions(tRef.getId());
|
| for (TransitionDefinition td : transitionDefinitionList) {
|
| workflowEngineLocal.setExecutionDetailCompleted(eDetail);
|
| workflowEngineLocal.postMessageForNextStep(eSummaryId, td
| .getToState().getId(), user);
|
| }
|
| }
|
| /**
| * Process a JOIN step.
| *
| * @param eDetail
| * @param tDef
| * @param tRef
| * @param eSummaryId
| * @param user
| */
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void processJoin(ExecutionDetail eDetail, TransitionDefinition tDef,
| TransitionReference tRef, long eSummaryId, User user) {
|
| List<TransitionDefinition> transitionDefinitionList = workflowEngineLocal
| .getTransitionDefinitions(tRef.getId());
|
| workflowEngineLocal.setExecutionDetailCompleted(eDetail);
|
| if (workflowEngineLocal.areAllJoinTransitionsFinished(
| transitionDefinitionList, eSummaryId)) {
| workflowEngineLocal.postMessageForNextStep(eSummaryId, tDef
| .getToState().getId(), user);
| }
|
| }
|
| /**
| *
| * @see workflow.ejb.client.WorkflowEngineLocal#processLoop(long,
| * workflow.ejb.client.ExecutionDetail,
| * workflow.ejb.client.StateDefinition, security.ejb.client.User)
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void processLoop(long eSummaryId, ExecutionDetail eDetail,
| StateDefinition stateDef, User user) {
| String interval = Long.toString(stateDef.getLoopInterval());
| if (!interval.contains(".")) {
| interval = interval + ".0";
| }
|
| try {
| if (stateDef.getWhenToTest().equalsIgnoreCase("before")) {
|
| for (; stateDef.getLoopCounter() < stateDef.getLoopMaximum(); stateDef
| .setLoopCounter(stateDef.getLoopCounter() + 1)) {
| processStateAlgorithm(eSummaryId, eDetail.getId(),
| stateDef, user);
| Thread.sleep(stateDef.getLoopInterval());
| }
| }
| // whenToTest is assumed to be "after"
| else {
|
| do {
| processStateAlgorithm(eSummaryId, eDetail.getId(),
| stateDef, user);
| stateDef.setLoopCounter(stateDef.getLoopCounter() + 1);
| Thread.sleep(stateDef.getLoopInterval());
| } while (stateDef.getLoopCounter() < stateDef.getLoopMaximum());
| }
| } catch (InterruptedException e) {
| logger.error("Interruption exception received. ", e);
| }
|
| }
|
| /**
| * Process a SERIES.
| *
| * @param eSummaryId
| * @param tDef
| * @param eDetail
| * @param user
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void processSeries(long eSummaryId, TransitionDefinition tDef,
| ExecutionDetail eDetail, User user) {
|
| ExecutionDetail prevED = workflowEngineLocal.getExecutionDetail(
| eSummaryId, tDef.getFromState().getId());
| Map<String, Object> params = workflowEngineLocal.getPersistedParams(
| prevED.getId(), eSummaryId);
|
| // evaluate condition to move to next state.
| boolean res = tDef.getConditionForEval() == null ? true : XPDLUtil
| .evaluateCondition(tDef.getConditionForEval(), params);
| if (res) {
| // move to the next state.
| eDetail = workflowEngineLocal.getExecutionDetail(eSummaryId, tDef
| .getId());
|
| workflowEngineLocal.setExecutionDetailCompleted(eDetail);
|
| workflowEngineLocal.postMessageForNextStep(eSummaryId, tDef
| .getToState().getId(), user);
| }
| }
|
| /**
| * Runs the algorithm.
| *
| * @param eSummary
| * @param stateDef
| * @param eDetail
| * @param user
| * @param em
| */
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void processStateDefinition(ExecutionSummary eSummary,
| StateDefinition stateDef, ExecutionDetail eDetail, User user) {
|
| try {
| boolean hasLoop = (stateDef.getLoopMaximum() > 0);
|
| if (hasLoop) {
| processLoop(eSummary.getId(), eDetail, stateDef, user);
| } else {
| processStateAlgorithm(eSummary.getId(), eDetail.getId(),
| stateDef, user);
| }
|
| TransitionDefinition td = workflowEngineLocal
| .getNextTransitionDefinition(stateDef.getId());
|
| // finished state processing
| workflowEngineLocal.setExecutionDetailCompleted(eDetail);
|
| if (td != null) {
| // follow next transition
| workflowEngineLocal.postMessageForNextStep(eSummary.getId(), td
| .getId(), user);
| return;
| } else {
| workflowEngineLocal.endWorkflow(eSummary);
| }
| } catch (Exception e) {
| workflowEngineLocal.endWorkflowInError(eSummary, eDetail);
| logger.debug(e.toString());
| }
| }
|
| /**
| *
| * @see workflow.ejb.client.WorkflowEngineLocal#endWorkflow(workflow.ejb.client.ExecutionSummary)
| */
| public void endWorkflow(ExecutionSummary eSummary) {
| // end workflow
| Date completed = new Date();
|
| eSummary.setWhenCompleted(completed);
|
| Query updateComplete = em
| .createNativeQuery("update EXECUTION_SUMMARY set WHEN_COMPLETED = :first where ID = :second");
|
| updateComplete.setParameter("first", completed);
| updateComplete.setParameter("second", eSummary.getId());
| updateComplete.executeUpdate();
| }
|
| /**
| *
| * @see workflow.ejb.client.WorkflowEngineLocal#endWorkflowInError(workflow.ejb.client.ExecutionSummary,
| * workflow.ejb.client.ExecutionDetail)
| */
| public void endWorkflowInError(ExecutionSummary eSummary,
| ExecutionDetail eDetail) {
| workflowEngineLocal.setExecutionDetailCompleted(eDetail);
| workflowEngineLocal.endWorkflow(eSummary);
| }
|
| /**
| * Process the state algorithm
| *
| * @param eSummaryId
| * Summary ID
| * @param eDetailId
| * Detail ID
| * @param stateDef
| * State definition
| * @param user
| * User
| */
| private void processStateAlgorithm(long eSummaryId, long eDetailId,
| StateDefinition stateDef, User user) {
| // get params needed to process step
| Map<String, Object> defParams = workflowEngineLocal
| .getDefinitionParams(eSummaryId, eDetailId, stateDef);
|
| Map<String, Object> runtimeParams = new HashMap<String, Object>();
|
| List<TransitionDefinition> transitionDefinitionList = workflowEngineLocal
| .getTransitionDefinitionsWithToId(stateDef.getId());
| for (TransitionDefinition td : transitionDefinitionList) {
|
| ExecutionDetail prevED = workflowEngineLocal.getExecutionDetail(
| eSummaryId, td.getFromState().getId());
| runtimeParams.putAll(workflowEngineLocal.getPersistedParams(prevED
| .getId(), eSummaryId));
| }
|
| // run the algorithm
| if (stateDef.getActionClass() != null
| && stateDef.getActionClass().length() > 0) {
| Map<String, Object> resultMap = workflowEngineLocal.handleAction(
| stateDef, defParams, runtimeParams, user);
|
| workflowEngineLocal.updatePersistedResultParams(eDetailId,
| eSummaryId, resultMap);
| } else // must be a fork or join state
| {
| workflowEngineLocal.updatePersistedResultParams(eDetailId,
| eSummaryId, runtimeParams);
| }
| }
|
| /**
| * Process step.
| *
| * @param executionSummary
| * an ExecutionSummary
| * @param stepDefinition
| * a StateDefinition
| * @param executionDetail
| * an executionDetail
| * @param user
| * a User
| * @param params
| */
|
| @SuppressWarnings("unchecked")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void processStep(ExecutionSummary executionSummary,
| StepDefinition stepDefinition, ExecutionDetail executionDetail,
| User user) {
|
| if (stepDefinition instanceof StateDefinition) {
| StateDefinition stateDef = (StateDefinition) stepDefinition;
| workflowEngineLocal.processStateDefinition(executionSummary,
| stateDef, executionDetail, user);
| } else if (stepDefinition instanceof TransitionDefinition) {
| workflowEngineLocal.processTransitionDefinition(executionSummary,
| (TransitionDefinition) stepDefinition, executionDetail,
| user);
| } else {
| logger.error("Cannot understand what to process for step with id="
| + stepDefinition.getId());
| throw new RuntimeException(
| "Cannot understand what to process for step with id="
| + stepDefinition.getId());
| }
| workflowEngineLocal.addExecutionDetailToExecutionSummary(
| executionSummary.getId(), executionDetail);
| }
|
| /**
| * Process a TransitionDefinition.
| *
| * @param eSummary
| * @param tDef
| * @param eDetail
| * @param user
| */
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void processTransitionDefinition(ExecutionSummary eSummary,
| TransitionDefinition tDef, ExecutionDetail eDetail, User user) {
|
| TransitionReference tRef = tDef.getTransitionReference();
|
| if (tRef.getTransitionType() == TransitionReference.FORK) {
| workflowEngineLocal.processFork(eDetail, tDef, tRef, eSummary
| .getId(), user);
| } else if (tRef.getTransitionType() == TransitionReference.JOIN) {
| workflowEngineLocal.processJoin(eDetail, tDef, tRef, eSummary
| .getId(), user);
| } else if (tRef.getTransitionType() == TransitionReference.SERIES) {
| workflowEngineLocal.processSeries(eSummary.getId(), tDef, eDetail,
| user);
|
| } else {
| logger.error("Transition type " + tRef.getTransitionType()
| + "is not understood.");
| throw new RuntimeException("Transition type "
| + tRef.getTransitionType() + "is not understood.");
| }
| }
|
| /**
| * Sets an ExecutionDetail as completed.
| *
| * @param eDetail
| * @return number updated
| */
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public int setExecutionDetailCompleted(ExecutionDetail eDetail) {
|
| Query completed = em
| .createNativeQuery("UPDATE EXECUTION_DETAIL SET COMPLETED = '1' WHERE ID = :first");
| completed.setParameter("first", eDetail.getId());
| int numUpdated = completed.executeUpdate();
| eDetail.setCompleted(1);
|
| return numUpdated;
| }
|
| /**
| * Updates the LOB, PARAMS_AS_XML.
| *
| * @param edId
| * @param esId
| * @param params
| */
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void updatePersistedResultParams(long edId, long esId,
| Map<String, Object> params) {
|
| Query updateResultParamsQuery = em
| .createNativeQuery("UPDATE RESULTING_PARAMS SET RESULTING_PARAMS_AS_XML = :first WHERE EX_DETAIL_ID = :second");
|
| updateResultParamsQuery.setParameter("first", ParamUtil.paramsFromMap(
| params, true));
| updateResultParamsQuery.setParameter("second", edId);
| updateResultParamsQuery.executeUpdate();
| }
| }
|
And here is the WorkflowEngineLocal interface
| package workflow.ejb.client;
|
| import java.util.List;
| import java.util.Map;
|
| import javax.ejb.Local;
| import security.ejb.client.User;
|
| /**
| * The local interface to the Workflow Engine
| */
| @Local
| public interface WorkflowEngineLocal {
|
| /**
| * Sets the execution summary id of the execution detail.
| *
| * @param executionSummaryId
| * @param executionDetailCopy
| */
| public void addExecutionDetailToExecutionSummary(long executionSummaryId,
| ExecutionDetail executionDetailCopy);
|
| /**
| * Make sure that all transition definitions for a join have an associated
| * execution detail meaning that the join can proceed.
| *
| * @param tdList
| * @param esId
| * @return boolean
| */
| public boolean areAllJoinTransitionsFinished(
| List<TransitionDefinition> tdList, long esId);
|
| /**
| * Checks if an execution detail exists for an execution summary and step
| * definition id.
| *
| * @param executionSummaryId
| * @param stepDefinitionId
| * @return int
| */
| public int checkIfExecutionDetailExists(long executionSummaryId,
| long stepDefinitionId);
|
| /**
| * Creates a result params entry for an execution detail and execution
| * summary. This method does not insert the LOB, PARAMS_AS_XML.
| *
| * @param executionSummaryId
| * @param executionDetailId
| * @return int - number inserted
| */
| public int createResultParams(long executionSummaryId,
| long executionDetailId);
|
| /**
| * Get previous steps' execution params add the definition params.
| *
| * @param eSummaryId
| * @param edId
| * @param stateDef
| * @return params
| */
| public Map<String, Object> getDefinitionParams(long eSummaryId, long edId,
| StateDefinition stateDef);
|
| /**
| * Get Execution Detail based on execution summary and step definition. This
| * method is highly nested.
| *
| * @param executionSummaryId
| * The id of an ExecutionSummary
| * @param stepDefinitionId
| * The id of a StepDefinition
| * @return ExecutionDetail the execution detail for the associated
| * ExecutionSummary and StepDefinition.
| */
| public ExecutionDetail getExecutionDetail(long executionSummaryId,
| long stepDefinitionId);
|
| /**
| * Get the next TransitionDefinition for a fromState.
| *
| * @param stateDefId
| * @return TransitionDefinition
| */
| public TransitionDefinition getNextTransitionDefinition(long stateDefId);
|
| /**
| * Gets the resulting params for an execution detail.
| *
| * @param edId
| *
| * @param stepDefinition
| * a step definition
| * @param esId
| * Execution summary id
| * @return Map containing parameters
| */
| public Map<String, Object> getPersistedParams(long edId, long esId);
|
| /**
| * Gets the params from the previous transition definition.
| *
| * @param eSummaryId
| * @param stateDef
| * @return runtimeParams
| */
| public Map<String, Object> getRuntimeParams(long eSummaryId,
| StateDefinition stateDef);
|
| /**
| * Get TransitionDefinitions for a transitionReference id.
| *
| * @param transitionReferenceId
| * @return List of TransitionDefinitionS
| */
| public List<TransitionDefinition> getTransitionDefinitions(
| long transitionReferenceId);
|
| /**
| * Get TransitionDefinitions for a toState id.
| *
| * @param toStateDefId
| * @return List of TransitionDefinitionS
| */
| public List<TransitionDefinition> getTransitionDefinitionsWithToId(
| long toStateDefId);
|
| /**
| * Handle action for a state definition.
| *
| * @param stateDefinition
| * a state Definition
| * @param definitionParams
| * @param runtimeParams
| * @param params
| * The state parameters
| * @param user
| * a User
| * @return a Map<String, Object> the results of a action class method
| */
| public Map<String, Object> handleAction(StateDefinition stateDefinition,
| Map<String, Object> definitionParams,
| Map<String, Object> runtimeParams, User user);
|
| /**
| * Create execution detail.
| *
| * @param executionSummaryId
| * @param stepDefinitionId
| * @return number inserted
| */
| public int insertExecutionDetail(long executionSummaryId,
| long stepDefinitionId);
|
| /**
| * Send message to queue.
| *
| * @param eSummaryId
| * @param tdId
| * @param user
| */
| public void postMessageForNextStep(long eSummaryId, long tdId, User user);
|
| /**
| * Get the ExecutionDetail,StepDefinition,ExecutionSummary and process the
| * next step.
| *
| * @param eSummaryId
| * @param stepDefId
| * @param user
| */
| public void process(long eSummaryId, long stepDefId, User user);
|
| /**
| * Process a FORK step.
| *
| * @param eDetail
| * @param tDef
| * @param tRef
| * @param eSummaryId
| * @param user
| */
| public void processFork(ExecutionDetail eDetail, TransitionDefinition tDef,
| TransitionReference tRef, long eSummaryId, User user);
|
| /**
| * Process a JOIN step.
| *
| * @param eDetail
| * @param tDef
| * @param tRef
| * @param eSummaryId
| * @param user
| */
| public void processJoin(ExecutionDetail eDetail, TransitionDefinition tDef,
| TransitionReference tRef, long eSummaryId, User user);
|
| /**
| * Process a LOOP.
| *
| */
| public void processLoop(long eSummaryId, ExecutionDetail eDetail,
| StateDefinition stateDef, User user);
|
| /**
| * Process a SERIES.
| *
| * @param eSummaryId
| * @param tDef
| * @param eDetail
| * @param user
| */
| public void processSeries(long eSummaryId, TransitionDefinition tDef,
| ExecutionDetail eDetail, User user);
|
| /**
| * Runs the algorithm.
| *
| * @param eSummary
| * @param stateDef
| * @param eDetail
| * @param user
| * @param em
| */
| public void processStateDefinition(ExecutionSummary eSummary,
| StateDefinition stateDef, ExecutionDetail eDetail, User user);
|
| /**
| * Process step.
| *
| * @param executionSummary
| * an ExecutionSummary
| * @param stepDefinition
| * a StateDefinition
| * @param executionDetail
| * an executionDetail
| * @param user
| * a User
| * @param params
| */
|
| @SuppressWarnings("unchecked")
| public void processStep(ExecutionSummary executionSummary,
| StepDefinition stepDefinition, ExecutionDetail executionDetail,
| User user);
|
| /**
| * Process a TransitionDefinition.
| *
| * @param eSummary
| * @param tDef
| * @param eDetail
| * @param user
| */
| public void processTransitionDefinition(ExecutionSummary eSummary,
| TransitionDefinition tDef, ExecutionDetail eDetail, User user);
|
| /**
| * Sets an ExecutionDetail as completed.
| *
| * @param eDetail
| * @return number updated
| */
| public int setExecutionDetailCompleted(ExecutionDetail eDetail);
|
| /**
| * Updates the LOB, PARAMS_AS_XML.
| *
| * @param edId
| * @param esId
| * @param params
| */
| public void updatePersistedResultParams(long edId, long esId,
| Map<String, Object> params);
|
|
| public void endWorkflow(ExecutionSummary eSummary);
|
|
| public void endWorkflowInError(ExecutionSummary eSummary, ExecutionDetail eDetail);
|
| }
|
And finally, here is the complete stack trace, with a couple of additional lines for context.
| 2008-12-26 16:46:01,811 DEBUG [org.jboss.ejb3.Ejb3Deployment] EJB3 deployment time took: 2065
| 2008-12-26 16:46:01,815 DEBUG [org.jboss.ejb3.Ejb3Deployment] error trying to stop ejb container
| javax.management.InstanceNotFoundException: jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowEngine,service=EJB3 is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:554)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:538)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:613)
| 2008-12-26 16:46:01,815 DEBUG [org.jboss.ejb3.Ejb3Deployment] error trying to stop ejb container
| javax.management.InstanceNotFoundException: jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowMDB,service=EJB3 is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:554)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:538)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:613)
| 2008-12-26 16:46:01,816 DEBUG [org.jboss.ejb3.Ejb3Deployment] error trying to stop ejb container
| javax.management.InstanceNotFoundException: jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowManager,service=EJB3 is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:554)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:538)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:613)
| 2008-12-26 16:46:01,816 DEBUG [org.jboss.ejb3.Ejb3Deployment] error trying to stop ejb container
| javax.management.InstanceNotFoundException: jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=CountManager,service=EJB3 is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:554)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:538)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:613)
| 2008-12-26 16:46:01,816 DEBUG [org.jboss.ejb3.Ejb3Deployment] error trying to stop ejb container
| javax.management.InstanceNotFoundException: jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=ModelManager,service=EJB3 is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:554)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:538)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:613)
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.Ejb3Registry] Unregistered container jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowEngine,service=EJB3,VMID=871ba2ae9678192d:-3cd08c6d:11e75424f45:-7ffa
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.Ejb3Registry] Unregistered container jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowMDB,service=EJB3,VMID=871ba2ae9678192d:-3cd08c6d:11e75424f45:-7ffa
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.Ejb3Registry] Unregistered container jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=WorkflowManager,service=EJB3,VMID=871ba2ae9678192d:-3cd08c6d:11e75424f45:-7ffa
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.Ejb3Registry] Unregistered container jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=CountManager,service=EJB3,VMID=871ba2ae9678192d:-3cd08c6d:11e75424f45:-7ffa
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.Ejb3Registry] Unregistered container jboss.j2ee:ear=workflow.ear,jar=workflow-ejb-2.7.0.jar,name=ModelManager,service=EJB3,VMID=871ba2ae9678192d:-3cd08c6d:11e75424f45:-7ffa
| 2008-12-26 16:46:01,817 DEBUG [org.jboss.ejb3.deployers.Ejb3Deployer] Error during deploy: vfszip:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/deploy/workflow.ear/workflow-ejb-2.7.0.jar
| org.jboss.deployers.spi.DeploymentException: Error deploying workflow-ejb-2.7.0.jar: java.lang.ClassNotFoundException: workflow.ejb.client.WorkflowEngineLocal from BaseClassLoader at 7d8dfe{VFSClassLoaderPolicy at f55e8c{name=vfsfile:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/conf/jboss-service.xml domain=ClassLoaderDomain at 8de742{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.system.NoAnnotationURLClassLoader at 72ffb} roots=[MemoryContextHandler at 1197338[path= context=vfsmemory://5c4o13-qr0cl1-fp7dh6nm-1-fp7dharu-6 real=vfsmemory://5c4o13-qr0cl1-fp7dh6nm-1-fp7dharu-6], DelegatingHandler at 7787114[path=authorization-plugins-2.7.0.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/authorization-plugins-2.7.0.jar], DelegatingHandler at 15740258[path=jboss-jaas-2.7.0.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jboss-jaas-2.7.0.jar], DelegatingHandler at 3390197[path=jbossws-common.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-common.jar], DelegatingHandler at 3628074[path=jbossws-framework.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-framework.jar], DelegatingHandler at 8649932[path=jbossws-native-jaxrpc.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-native-jaxrpc.jar], DelegatingHandler at 4844995[path=jbossws-native-jaxws-ext.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-native-jaxws-ext.jar], DelegatingHandler at 10005300[path=jbossws-native-jaxws.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-native-jaxws.jar], DelegatingHandler at 1043573[path=jbossws-native-saaj.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-native-saaj.jar], DelegatingHandler at 7153960[path=jbossws-spi.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/jbossws-spi.jar], DelegatingHandler at 11091676[path=mysql-connector-java-5.0.5.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/server/default/lib/mysql-connector-java-5.0.5.jar], DelegatingHandler at 6160834[path=antlr.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/antlr.jar], DelegatingHandler at 12939382[path=autonumber-plugin.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/autonumber-plugin.jar], DelegatingHandler at 5926148[path=bcel.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/bcel.jar], DelegatingHandler at 11223709[path=bsf.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/bsf.jar], DelegatingHandler at 10652468[path=bsh.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/bsh.jar], DelegatingHandler at 6373973[path=commons-collections.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/commons-collections.jar], DelegatingHandler at 4854281[path=commons-httpclient.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/commons-httpclient.jar], DelegatingHandler at 15089874[path=commons-logging.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/commons-logging.jar], DelegatingHandler at 11128116[path=dtdparser121.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/dtdparser121.jar], DelegatingHandler at 14629845[path=ejb3-persistence.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ejb3-persistence.jar], DelegatingHandler at 13710852[path=el-api.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/el-api.jar], DelegatingHandler at 3229880[path=hibernate-annotations.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-annotations.jar], DelegatingHandler at 10314131[path=hibernate-commons-annotations.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-commons-annotations.jar], DelegatingHandler at 7410782[path=hibernate-core.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-core.jar], DelegatingHandler at 15743097[path=hibernate-entitymanager.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-entitymanager.jar], DelegatingHandler at 758654[path=hibernate-jmx.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-jmx.jar], DelegatingHandler at 14280[path=hibernate-validator.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hibernate-validator.jar], DelegatingHandler at 5130683[path=hsqldb-plugin.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hsqldb-plugin.jar], DelegatingHandler at 13277641[path=hsqldb.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/hsqldb.jar], DelegatingHandler at 3570778[path=jaxen.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jaxen.jar], DelegatingHandler at 1971201[path=jboss-bindingservice.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-bindingservice.jar], DelegatingHandler at 11752414[path=jboss-common-jdbc-wrapper.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-common-jdbc-wrapper.jar], DelegatingHandler at 4659535[path=jboss-current-invocation-aspects.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-current-invocation-aspects.jar], DelegatingHandler at 13538103[path=jboss-ejb3-cache.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-cache.jar], DelegatingHandler at 2300137[path=jboss-ejb3-common.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-common.jar], DelegatingHandler at 3706629[path=jboss-ejb3-core.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-core.jar], DelegatingHandler at 3519815[path=jboss-ejb3-deployers.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-deployers.jar], DelegatingHandler at 1072762[path=jboss-ejb3-ext-api-impl.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-ext-api-impl.jar], DelegatingHandler at 11191856[path=jboss-ejb3-ext-api.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-ext-api.jar], DelegatingHandler at 12166727[path=jboss-ejb3-interceptors.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-interceptors.jar], DelegatingHandler at 5473751[path=jboss-ejb3-metadata.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-metadata.jar], DelegatingHandler at 7872477[path=jboss-ejb3-proxy-clustered.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-proxy-clustered.jar], DelegatingHandler at 7611775[path=jboss-ejb3-proxy.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-proxy.jar], DelegatingHandler at 4831928[path=jboss-ejb3-security.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/jboss-ejb3-security.jar], DelegatingHandler at 8503987[path=jboss-ejb3-transactions.jar context=file:/Users/johnsingleton/Programming/pkg/jboss-5.0.0.GA/common/lib/ real=file:/Users/john
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199238#4199238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199238
More information about the jboss-user
mailing list