Your doing it all wrong. Read my previous comments.
What you need is a repository of XA TxConnectionManagers and MDB
activations (these are setup by the deployments).
When JBossTS asks you to recover, you iterate over this repository and retrieve
all the XAResources.
All you need is a mechanism to get a link to this repository from your JBossTS
plugin. If JBossTS supported proper IOC configuration this would trivial,
instead you going to have to do some work.
Don't make the same mistake and introduce property files for your configuration!
The only configuration required is the security like you said.
We discussed this nearly two years. It is trivially solved by allowing
a connection factory or datasource to have two extra parameters to override
the default user or when it doesn't have a default user.
e.g.
| <local-tx-datasource>
| ...
| <recover-user>x</recovery-user>
| <recover-password>y</recovery-password>
|
| <!-- OR -->
|
| <recovery-security-domain>Recovery</recovery-security-domain>
| </local-tx-datasource>
|
You might also need a flag to say recovery cannot use (share) a
normal pooled connection since I know at least in the past some XAResources had
problems with normal operations after recover() is invoked.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009406#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...