Trying to control the threading within your JBoss server will end up causing you more problems and quickly become a nightmare. JBoss already manages the database connections and transactions very well; so, unless your database is located somewhere outside your local network, it is unlikely your transaction will fail because of network outages. Also, adding in 'retry' logic to your business methods (ala session beans) is not really a good idea either as this would introduce long running transactions which would lead to transaction timeouts and entity locking issue - which puts you in the same boat as the less likely network outage.
Typically, you would catch any rollback errors on the client side and handle retries there. But, if you really need to introduce 'retry' behavior on the server side, I would recommend leveraging MessageDrivenBeans to perform those operations asynchronously. When a client calls a method on your session bean, instead of running the business logic, constructs and deliver a JMS Message to a local queue. This message would contain the name of the called method and a map of the parameters passed by the client. Listening on that queue would be a MDB that deconstructs the message to either perform the business logic directly, or make a call to a session bean to perform the logic. If there is a transaction rollback, then the message is pushed back onto the queue and redelivered to the MDB at a later time.
For JBoss 4.2.3 messaging, you can add the following properties to your JMS message to control the delivery time and how long JBoss should wait to redeliver a message after a failure:
JMS_JBOSS_SCHEDULED_DELIVERY
- takes the delivery time in millis
JMS_JBOSS_REDELIVERY_DELAY
- number of millis to wait before redelivery
You would add these values to the message before pushing them onto the queue - manipulating the delivered message from the MDB doesn't work. Also, be aware that if a message is delivered too many times (defaults to 10 times), then the message will be moved to the deal letter queue (DLQ).