[JBoss Seam] - Re: Accessing <variable> in ActionHandlers the SEAM Way
by hazlorealidad
I am just starting with seam but as I understood you can inject something from a business scope into a conversation scope.
>From the docs:
@BeginTask(taskIdParameter="taskId")
Resumes work on an incomplete jBPM task. Specifies that a long-running conversation begins when this method returns a non-null outcome without exception. This conversation is associated with the jBPM task specified in the named request parameter. Within the context of this conversation, a business process context is also defined, for the business process instance of the task instance.
The jBPM TaskInstance will be available in a request context variable named taskInstance. The jPBM ProcessInstance will be available in a request context variable named processInstance
taskIdParameter ? the name of a request parameter which holds the id of the task. Default to "taskId", which is also the default used by the Seam taskList JSF component.
After doing the above
I would have thought that
@In
CustomerBean cust;
would do exactly the same as the code you have?
Is that not the case?
I would be interested to know how you get on.
Andy Bailey
www.hazlorealidad.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971645#3971645
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971645
19 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: TransactionException: could not register synchronization
by holmes.j
I'm going crazy trying to figure this out.
So I was reading the Hibernate docs again and came across this ...
anonymous wrote :
| With CMT, transaction demarcation is done in session bean deployment descriptors, not programatically, hence, the code is reduced to:
|
| // CMT idiom
| Session sess = factory.getCurrentSession();
|
| // do some work
| ...
|
| In a CMT/EJB even rollback happens automatically, since an unhandled RuntimeException thrown by a session bean method tells the container to set the global transaction to rollback. This means you do not need to use the Hibernate Transaction API at all with BMT or CMT, and you get automatic propagation of the "current" Session bound to the transaction.
|
So I was write, it is supposed to automagically create the Transaction. I was stepping through my session bean, and it looks like it did create a transaction, it's just that it hasn't started the transaction. This then throws the HibernateException because the transaction is not in a valid state.
Anybody know how to use EJB Session Beans w/ Hibernate, JTA and all this wonderful stuff?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971643#3971643
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971643
19 years, 7 months