I have this ejb that queries one database in one machine, gets the resultset massages the data opens a new connection to another database in a different machine and it is supposed to insert the data. However I get the following error message:
2009-02-13 18:32:50,188 INFO [STDOUT] org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:e001:4995ebf3:117 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:e001:4995ebf3:117 status: ActionStatus.ABORT_ONLY >)
I know it has to do with the different machine connections, because if I import the table and the data to the target database and use the same datasource to run the EJB it runs with no problem.
Thanks for any help
[Edited by Jaikiran: Modified the subject to remove all caps]
This is a very very common error when you're trying to use multiple datasources within Jboss 4.
You'll almost certainly find the answer instantly on a google.
Basically, it sounds like you're trying to use more than one datasource in the same transaction.
There's a simple way of getting around this - extrapolate the procedure that deals with the second datasource and use the @NewTransaction annotation to ensure a new transaction is started for the use of the second datasource.