Can you explain exactly what you mean by isolation level?
I have the setting of isolation in bean level method at the weblogic.Please see the below
Same thing I want to put into the jboss. can you help me how can I achieve the above in the jboss.
You can set the transaction isolation level for a datasource in the XADataSourceLoader config for jboss 2.4.4 and later and as a ManagedConnectionFactoryProperties property in jboss 3 rc2 and later. You can use the strings or the integer values.
I need to set the transaction isolation level each bean method level that means I have one session bean it contains four methods i,e select,update, delete and insert. I need to set the isolaton level like TRANSACTION_READ_COMMITED for the insert method and TRANSACTION_READ_UNCOMMITED for select method.this is possible in the weblogic and websphere also.
Can I know how can I achieve same thing in JBoss. if give some example It could be very helpful.
This is not supported in jboss. Can you explain why this is important? The particular example you give doesn't make any sense to me. All the databases I have worked with will not let 2 transactions try to insert the same row simultaneously no matter what the isolation level.
I have problem with only the select operation.This transaction should read uncommitted data (data changed by different transaction that is still in progress) so that I want to set the transaction isolation level READ_UNCOMMITED for the select operation in bean method level. there is no issue with other operations like insert,update,etc.,
Please let me know clearly is it possible to set the transaction isolaiton level in bean method level.since I know that only we can set transaction isolation level in the datasource level or connection level in the jboss.
Well, I thought I was pretty clear, let me try again.
> This is not supported in jboss.
This means that the feature you are asking about, setting tx isolation level per method, is not supported in the product you are asking about, jboss.
Can you explain why
> this is important? The particular example you give
> doesn't make any sense to me. All the databases I
> have worked with will not let 2 transactions try to
> insert the same row simultaneously no matter what the
> isolation level.
This means that you would IMO get the same results if the tx isolation level was read uncommitted for all methods. I'd still like to know why you want different tx isolation levels for different methods. You made it pretty clear that you did want different isolation levels, and I do know what read uncommitted means. I'm not going spend any time thinking about whether this is a useful feature I should consider implementing unless there is a convincing use case showing a real business scenario that can't be done another way.
I also need this feature; setting the isolation-level at method level.
I am trying to implement optimistic locking. I need to read/compare/update in a serialized transaction. This is the only time that I need a serialized transaction and I don't want to enforce this level elsewhere. The only way that I could think of achieving this was to create two data-sources with different isolation levels pointing to the same database.
Is there a better way?
Thanks in advance.
I also would like to have the capability of setting the transaction isolation level on a per method basis (as in WebLogic or WebSphere). I also do not need (or want) a setting of TRANSACTION_SERIALIZABLE everywhere. This is too much overhead in the database when TRANSACTION_READ_COMMITTED will suffice. Yes, you can setup separate connection pools with each isolation level and create a datasource for each. But that would only give you transaction isolation on a per bean basis and is also more difficult to configure.
I am using Option B commit strategy with an entity bean instance per transaction. In other words, I am deferring concurrency and transaction isolation implementation to the database.