Can we still use NOT_SUPPORTED and supported for any request method?

Hi all

Because the database selection didn't need a transaction (Please correct me if that's wrong), define the level of transaction "NOT supported" or "Supported" for all of these methods that question only something database?

Maybe these methods will be called in other in a transaction, so "NEVER" cannot be used.

My question is: is there a reason to get a transaction for methods without any insert/update of database?

Say there are three beans as below:

@Stateless
@TransactionManagement (TransactionManagementType.CONTAINER)
/ public class InsertBean implements {Insert}
@Override
@TransactionAttribute (TransactionAttributeType.REQUIRED)
{} public void createUsers (< user > list of users)
INSERT INTO user WHERE...
}
}

@Stateless
@TransactionManagement (TransactionManagementType.CONTAINER)
/ public class QueryBean implements Query {}
@Override
@TransactionAttribute (TransactionAttributeType.NOT_SUPPORTED)
public int getUserNumber() {}
SELECT COUNT (*) FROM user
}
}

@Stateless
@TransactionManagement (TransactionManagementType.CONTAINER)
/ public class UpdateBean implements {update
@Override
@TransactionAttribute (TransactionAttributeType.REQUIRED)
{} public void updateUsers (list < user > users)
UPDATE user SET logindate = xxx WHERE...
}
}

Insert and update requires a transaction and not the query. If there is a method of bean called as:

InsertBean.createUsers (users);
int n = QueryBean.getUserNumber ();
UpdateBean.updateUsers (users);

In this case, that the level of transactions for getUserNumber() request method must not be 'NEVER', only 'SUPPORTED' or 'NOT_SUPPROTED' is reasonable. But 'NOT_SUPPORTED' is more effective. So can I use level 'NOT_SUPPORTED' for all methods of query?

If sometimes the query method must be in a transaction could you share?

Thanks in advance.

When the query is running for a long time and you who call inside the transaction, the transaction may time out.
In this case you would go non-supported, so that this transaction manager can take the action when the method
is called within a transaction. Otherwise it does not really matter.

Tags: Fusion Middleware

Similar Questions

Maybe you are looking for

  • Reboot after installation of El Capitan

    I have a 27 "Imac, mid-2011. 3.1 Ghz. After you install the free update of El Capitan 2 weeks ago, my computer randomly stops and restarts itself, at least once a day. It just happened 4 times in a row and is very frustrating. Can anyone offer advice

  • WiFi doesen't work on my new Satellite L850-13 q

    I just bought a Satellite L850-13 q and my WiFi doesen't work. Win 7 64 bit and I installed the Atheros driver because this system, but he said, there is no aviable connection, but my old computer is a good number of them. I turn it on with the FN +

  • Agent Extension SNMP event log has not initialized properly in windows 2008 R2

    I enabled the functionality of SNMP Service and found the following error: "Error 2019: Extension SNMP event log Agent has not initialized properly in windows 2008 R2 Enterprise 64-bit. I uninstalled all related SNMP Applications and reinstalled the

  • Button battery mysterious S3 - 391

    Hello. The S3-391 ultrabook has a mysterious pin hole on the bottom, near the battery icon. What does this button mean? Thank you.

  • I can connect to my hotmail account but cannot open, delete or do anything else.

    I can connect to my hotmail account but unable to open, delete or do anything else.  I tried to reset Internet Explorer, nothing works.  Even contacted Microsoft but because it's free hotmail, they sent me an e-mail with a link that I followed to the