[jboss-user] [JBoss Seam] - Transaction Demarcation

toni do-not-reply at jboss.com
Fri Apr 27 02:41:42 EDT 2007


Hi,

I have a webapplication, which imports data about customers from a text file. Each row contains a record out of which several entity bean are being created and assembled.

The function, which reads in a line an creates those entity beans and sets up the relationships between them is called "createCustomer(String line)". This method gets called several times from another function called "createCustomers()".

I have noticed that the whole process is treated as a unit of work. Either all customers and relating entity beans are created or none. They seem to span one single transaction.

Assuming that the client call to "createCustomers()" is triggered through a seam web request by the user, how would I assure that for each call to "createCustomer(String line)" a new transaction is spanned?

I want to narrow the transaction scope down to a single customer instead of all the customers.

How would I use the @Transactional attribute to achieve that? From reading the oreilly book I figured I would have to use the transaction attribute "Requires New", which however does not seem to exist as an attribute in seam.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041274#4041274

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041274



More information about the jboss-user mailing list