If I have a stateless session bean with the following two methods:
public void createGoal(){
Connection c = datasource.getConnection()
connection.executeUpdate();
addObjectives();
}
public void addObjectives(){
Connection c = datasource.getConnection()
connection.executeUpdate()
}
So essentially, createGoal() calls addObjectives() once it finishes performing its
jdbc work. This calling scheme represents a single transaction, so, if anything in addObjectives() fails, then all work performed in createGoal() must be rolled back. I'm not handling transactions explicitly because I want to use transactional attributes at the method-level to handle them for me. My question is this: If the transactional attribute for both methods is specified as REQUIRED, does addObjectives() become part of the transaction from createGoal() even though both methods are using different connection objects from the same data source?
SAF
[ March 12, 2002: Message edited by: SAFROLE YUTANI ]