invoke ejb ,JTA in tomcat server will get the error.
i use the tomcat server and a ejb server envirmoment.
some logic code is like these:
class ship
{
UserTransaction ut=null;
public void begin()
{
ut=new UserTransaction
ut.begin();
}
public void add(String nn) throws Exception
{
invoke some ejb
save some data into database
}
public void commit()
{
ut.commit();
}
public void rollback()
{
ut.rollback();
}
}
and this class will be save and invoke in tomcat jsp file.
a complete transaction is like these
step 1 )file1.jsp to start the transaction
2 )file2.jsp to add the data or detail ,like buy
information, product ....
3)file3.jsp to commit transaction or rollback transaction
eg)
tomcat ship in session
client1 --- connect-- Thread1 --- ship.begin() file1.jsp
cleint2---------------- Thread2 --- ship.begin() file1.jsp
client1 ---------------Thread3 ----- ship.add("aa") file2.jsp
client2--------------- thread2------ship.add("aa") file2.jsp
client2-----------------Thread2-----ship.commit() file3.jsp
i had did the test ,and confirm the client cant confirm get the some thread in tomcat server.
if like the client2 will not get any error and can execute sucessful.
but the tomcat Thread pool cant control by jboss .
so how does it solve this problem??
thanks you very much.
because i try to implement a software like ejb server ,and self yo provider the distrubtion transaction function. and i got this problem, hope you can help me to solve it.thank you