I think my last question was either a bit confusing or I was making the
post in the wrong topic.
To make it short, we are running JBoss cache inside our homebuilt
scheduler and would want our scheduler, to be integrated with the
transaction services that our applications run within JBoss 4.0.2.
Which means: Our Stateful EJB usually does a few operations and needs to
start a scheduled task in our homegrown scheduler. The scheduled task
puts an entry in the JBossCache. The scheduler runs OUTSIDE the JBoss
container and not inside it.
In which case, as I understand, the transaction context must be
propagated from the EJB -> JBossCache (which runs within the scheduler)
Also, the instance of or JBCache must be hooked to the Transaction
Manager (I am using the same transaction manager in JBoss 4.0.2).
ALSO I do not plan to use JMS to integrate these 2 seperate systems, as it
has its own performance overheads. Is there anyother way to propagate
the transaction contect across the 2 seperate systems and hook
JBossCache within the same context?
Can someone PLEASE guide me in some direction as to how to do it OR
update the relevent documentation, if possible, so that it can also help
others who are trying the same?
Your help in this regard would be MUCH appriciated.
You can use JBossTransactionManagerLookup (which is default in the sample files, btw).
But whoever calling JBossCache needs to have concept of transaction context as well.
Thanks ben for your response.
JBoss AppServer would call JBossCache running on a different VM. We plan
to use NIO to make our application running on JBoss talk to JBossCache
running on the "other" VM for obvious performance benefits.
Both VM instances could be talking to the same TM or differnet TM, it does not
matter as long as BOTH TM support 2PC.
The problem is how can I make JBossCache operation make aware of the
transaction context on which the calling JBoss AS operation was made? (This
is important for commit / rollback operations.)
- OR -
Would using the SAME TM solve the problem?