[EJB 3.0] - application-defined resources for MDBs
by ekrisjo
Hi all,
I have a problem understanding how (assembled and tested) ejb-archives containing MDBs can be deployed in multiple applications without avoiding resource conflicts. To my knowledge, queues are bound (either by xml or annotations) when assembling the module (EJB) and not when assembling the application (EAR)...?
Servlet context can be bound on application level, global JNDI names for SLSBs can be generated on application level (referencing them with ENC). persitence.xml file can be application-defined which isolate datasources from eachother and overcome conflicts for reused entity beans.
But, for MDBs i have not found any similar way of lately bind a MDB to application-defined queues?
Cheers,
-Kristoffer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958906#3958906
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958906
19 years, 9 months
[JBoss jBPM] - Re: JBPM TaskCreation at RunTime
by abbasshah
Here is the code in detial
anonymous wrote : < process-definition xmlns='' name='TestProcess'>
| < start-state name='start'>
| < transition name='' to='setup'>< /transition>
| < /start-state>
| < node name='setup'>
| < action class='com.sample.SetupProcessActionHandler'/>
| < transition name='' to='Test_Node'>< /transition>
| < /node>
| < task-node name='A' signal='never' create-tasks='false'>
| < event type='node-enter'>
| < action class='com.sample.testTask.OnNodeEnter'/>
| < /event>
| < task name='TASK_A1'>
| < event type='task-create'>
| < action class='com.sample.testTask.OnTaskCreation'/>
| < /event>
| < event type='task-end'>
| < action class='com.sample.testTask.OnComplete'/>
| < /event>
| < /task>
| < task name='TASK_A2'>
| < event type='task-create'>
| < action class='com.sample.testTask.OnTaskCreation'/>
| < /event>
| < event type='task-end'>
| < action class='com.sample.testTask.OnComplete'/>
| < /event>
| < /task>
| < transition name='on_update_msg' to='Test_Node2'>< /transition>
| < /task-node>
|
| < task-node name='B' signal='never' create-tasks='false'>
| < event type='node-enter'>
| < action class='com.sample.testTask.OnNodeEnter2'/>
| < /event>
|
| < task name='TASK_B1'>
| < event type='task-create'>
| < action class='com.sample.testTask.OnTaskCreation'/>
| < /event>
| < event type='task-end'>
| < action class='com.sample.testTask.OnComplete'/>
| < /event>
| < /task>
| < transition name='' to='end'>< /transition>
| < /task-node>
|
| < node name='loopback'>
| < transition name='' to='Test_Node'>< /transition>
| < /node>
|
| < end-state name='end'>< /end-state>
|
| < /process-definition>
| < code>
anonymous wrote : TASKNODE A Task creation handler
| public class OnNodeEnter implements ActionHandler {
|
| private final static Log log = LogFactory.getLog( OnNodeEnter.class );
|
| public void execute(ExecutionContext executionContext) throws Exception {
|
| System.out.println("OnCreation-->- Start");
|
| Token token = executionContext.getToken();
| TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
| TaskNode taskNode = (TaskNode) executionContext.getNode();
|
|
| Task doRecalc = taskNode.getTask("TASK_A1");
| tmi.createTaskInstance(doRecalc, token);
|
| Task doRecalc3 = taskNode.getTask("TASK_A2");
| tmi.createTaskInstance(doRecalc3, token);
|
| System.out.println("OnCreation-->- END");
|
| }
|
| }
anonymous wrote : anonymous wrote : TASKNODE B Task creation handler
| |
| | public class OnNodeEnter2 implements ActionHandler {
| |
| | private final static Log log = LogFactory.getLog( OnNodeEnter2.class );
| |
| | public void execute(ExecutionContext executionContext) throws Exception {
| |
| | System.out.println("OnCreation-->- Start");
| |
| | Token token = executionContext.getToken();
| | TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
| | TaskNode taskNode = (TaskNode) executionContext.getNode();
| |
| |
| | Task doRecalc = taskNode.getTask("TASK_B1");
| | tmi.createTaskInstance(doRecalc, token);
| |
| | System.out.println("OnCreation-->- END");
| |
| | }
| |
| | }
|
|
| anonymous wrote : ActionHandler on task-create event on all tasks
| | public class OnTaskCreation implements ActionHandler {
| |
| |
| | public void execute(ExecutionContext executionContext) throws Exception {
| | System.out.println("--> TaskInstacne Id ="+executionContext.getTaskInstance().getName());
| | System.out.println("--> TaskInstacne Id ="+executionContext.getTaskInstance().getId());
| | }
| | }
|
| In case of TASK_A1 and TASK_A, OnTaskCreation prints proper Ids
|
| But In case of TASK_B1, OnTaskCreation prints 0
|
|
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958902#3958902
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958902
19 years, 9 months
[JBoss Portal] - Re: sharing data between render() and processAction() method
by hubertg
thanks for your answer.
The order is:
1. processAction() portlet A
2. render() portlet A
3. render() portlet B
4. render() other portlests C,D, ...
I'm porting a MVC web framework (WebWork 1) into a portlet. The classical MVC approach is based on one atomic request-response cycle. The action class needs the input parameters, creates a ValueStack (the action's result) which is passed to the jsp pages via request attributes. In the portlet I have to split this process into two phases, namely the processAction and the render phase. Therefore I need a way to pass the ValueStack from the processAction phase to the render phase.
I think render params are no solution for my problem because first I don't want to make results directly visible for the user and second it's practically impossible to set java objects as render objects.
br, hubert
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958898#3958898
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958898
19 years, 9 months