multiple databases

SUBSCRIBE EJB-INTEREST anonymous <[email protected]> Wed, 25 Jan 2006 06:10:08 -0700
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <LISTSERV%[email protected]>
Hi,
I have a question.
In my StatelessSessionBean.,I have a bean method set to transaction
attribute ,Required.
Another method set to transaction attribute,RequiredNew as below.
I am not using XA datasource .And, I don=92t need a two phase commit.
I get the error message at runtime in methodB-
=93An illegal attempt to use multiple resources that have only one-phase
capability has occurred within a global transaction=94.
Can anyone let me know why I get this error?

MethodA (int i) //method A set to Required
{
 //Makes call to Data Access Object to perform update in Oracle
database
 //Calls method B
 methodB(i);

}

methodB( int i) // methodB is set to RequiresNew
{

 if(i =3D=3D 100){
 //makes call to Data Access Object to perform insert in Oracle
database
}
else{
//makes call to Data Access Object to perform update in DB2  database
}

}

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".