"david.allen" wrote :
| how to best inject the RealTransactionManager bean into one of our
| beans.
|
| I modified webbeans-ejb-jboss-beans.xml to also have the following bean
| declaration:
|
| | <beanfactory name="JBossTransactionServices"
| | class="org.jboss.webbeans.integration.ejb.JBossTransactionServices">
| | <property name="controller"><inject
| | bean="jboss.kernel:service=KernelController" /></property>
| | <property name="transactionManager"><inject
| | bean="RealTransactionManager" /></property>
| | </beanfactory>
| |
|
| That class/bean just needs the javax.transaction.TransactionManager that
| the AS is using.
|
Add option="callback" attribute to TM's inject.
This will inject your TM once it's available.
"david.allen" wrote :
| However, since this is a deployer perhaps, the TM is not ready or
| loaded? I get the following error:
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "JBossTransactionServices" is missing the following
| dependencies:
| Dependency "RealTransactionManager" (should be in state
| "Configured", but is actually in state "** NOT FOUND Depends on
| 'RealTransactionManager' **")
|
Yes, the TM is not there yet.
But we do call the checkComplete, which causes this error msg.
We do boot, deployers and deploy in separate steps,
invoking MainDeployer::checkComplete after each of them.
Hence the deployers don't yet see the deploy, which is where the TM is deployed.
"david.allen" wrote :
| I also tried adding a jboss-dependency.xml, but I really do not know
| what name to use for the element, or for that matter any of the
| attributes. Is this the correct approach?
|
This wouldn't help either, as what you would actually do is
create a dependency for a whole deployment on a particular bean,
where previously you had a single bean depending on that bean.
The error would be almost the same.
"david.allen" wrote :
| Do you know the exact values
| to put into jboss-dependency.xml elements for this case?
|
Sure, I wrote the jboss-dependency.xml mechanism. :-)
Check its test cases or read more about it here:
-
http://www.jboss.org/community/docs/DOC-13178
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214468#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...