Calls EntityBeanA findByPrimaryKey method @Mandatory
Explanation why such transaction demarcation is needed.
SessionBean A is basically for running batches . idea is if batch processes 1000 transactions and after 600 successful
601 faisl then whole batch should not be rollback. So each call on method C runs in a separate transaction.
Finaaly we check the batch success count , error count and compare it with the prcoess count .
I am getting error TransactionRequiredException while accessing EntityBean A .
I am guessing its problem in jboss server the TransactionContext is not propagating properly from NotSupported to Required and then back
to NotSupported .
Please do let me know if anybody face such problem.
I am using JBoss 3.2.4 as application server.
I don't want to question why you are using entity beans for a batch process..-)) suggested - session Bean - direct jdbc....
in case you want to stick to entity bean for batch to avoid data stomping which might happen while batch process is running... i am assuming you are querying entity bean A by primary key.. you don't require transaction attribute on entity bean's method...i am tempted to recommend...[assuming your isolation level is set correctly...]
Correct propagation declaration should be:
methodB & methodC
Alternatively (if you need to call methodB and C atomically in combination),
calls methodB & C that are declared as @Required.
Declaring methods with NotSupported is not applicable in most EJB containers. The functionality is not properly defined.
yeah you are correct by applying these transaction demarcations it works but what surprises me that jboss doesn't support the earlier transaction propagation from NotSupported.
anyway thanks very much for all in replying.