[Installation, Configuration & Deployment] - Re: Prevent EJB deployment with sar
by jaikiran
"Falcor1" wrote :
|
| I do realize that I could produce 2 separate jars, one with interfaces only and one with implementation.
|
| That seems like a bit of a maintenance hassle though and complicates the build process.
|
|
It's not about a maintenance hassle, it's actually the right way to do it. The .sar is a client of the EJB and hence should only have the bean interfaces and not the implementation class. Including the implementation class is equivalent to deploying a new bean.
"Falcor1" wrote :
| Another downside is that @Stateless defaults the mapped name attribute to the implementation class, so the clients of my stateless session beans look them up by using
|
| Implementation.class.getSimpleName() + "/remote"
|
| I guess I could explicitly set the mapped name to the interface, but again thats more work and more maintenance.
Yes, that's the default.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266562#4266562
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266562
14 years, 11 months
[jBPM Users] - End tasks in a Fork
by matrixpooh
My process is a fork with two task nodes and a join.
I trigger the process to start both tasks and then end each of them.
During the execution of end() on task 1, the task is being submitted and then immediately re-instantiated. So when the token is at the join, I still have a freshly created task 1 pending in the actor's queue.
Also, it seems like though 'task-end' is called on the child token, the root token proceeds with 'node-enter' on the same task.
Here's the process definition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="parallel.two.sequential.one">
|
| <swimlane name="...">
| ....
| </swimlane>
|
| <start-state name="start">
| <transition to="fork1"></transition>
| </start-state>
|
| <fork name="fork1">
| <transition to="task-node1" name="to-task-1"></transition>
| <transition to="task-node2" name="to-task-2"></transition>
| </fork>
|
| <join name="join1">
| <transition to="task-node3"></transition>
| </join>
| <task-node name="task-node1" >
| <task swimlane="..." name="Task 1" notify="true">
| <controller class="..."/>
| </task>
| <transition to="join1" name="to-the-end"></transition>
| </task-node>
|
| <task-node name="task-node2">
| <task swimlane="..." name="Task 2" notify="true">
| <controller class="..."/>
| </task>
| <transition to="join1" name="to-the-end"></transition>
| </task-node>
|
| <end-state name="end"></end-state>
| </process-definition>
Here's the snippet of the execution:
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
|
| Token token = processInstance.getRootToken();
| assertEquals("start", token.getNode().getName());
|
| token.signal();
|
| Map<String, Token> childTokens = token.getActiveChildren();
| assertTrue(childTokens.size() > 0);
|
| final Iterator<Token> iterator = childTokens.values().iterator();
| Token oneBranchToken = iterator.next();
| TaskMgmtInstance taskManagementInstance = oneBranchToken .getProcessInstance().getTaskMgmtInstance();
| Collection<TaskInstance> taskInstances =
| taskManagementInstance.getUnfinishedTasks(oneBranchToken );
| TaskInstance taskInstance = taskInstances.iterator().next();
| taskInstance.end();
|
| jbpmContext.save(processInstance);
|
Here's the debug log snippet that shows task 1 being submitted and then immediately initialized again:
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'after-signal' on StartState(start) for Token(/)
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-end' on Task(Task 1) for Token(/to-task-1)
08:48:11,091 DEBUG|main|: [Controller:submitTaskVariables:23] -------------current node::Task 1
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'before-signal' on Fork(fork1) for Token(/)
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'node-leave' on Fork(fork1) for Token(/)
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'transition' on Transition(to-task-1) for Token(/)
08:48:11,091 DEBUG|main|: [GraphElement:fireEvent:179] event 'node-enter' on TaskNode(task-node1) for Token(/)
08:48:11,107 DEBUG|main|: [Controller:initializeTaskVariables:17] -------------current node::Task 1
08:48:11,107 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-create' on Task(Task 1) for Token(/)
08:48:11,107 DEBUG|main|: [TaskInstance:setActorId:258] assigning task 'Task 1' to 'analyst'
08:48:11,107 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-assign' on Task(Task 1) for Token(/)
08:48:11,107 DEBUG|main|: [GraphElement:executeAction:271] executing Action(Task 1)
08:48:11,107 DEBUG|main|: [Token:lock:748] token[2489] is locked by token[2489]
08:48:11,107 DEBUG|main|: [Mail:send:189] skipping mail because there are no recipients
08:48:11,122 DEBUG|main|: [Token:unlock:765] token[2489] is unlocked by token[2489]
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266552#4266552
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266552
14 years, 11 months