Transactions Section Index
Where can I learn (more) about JCA (Java Connector Architecture)?
Check out the Sun's Java
Connector Architecture homepage.
Where can I learn (more) about Java's support asynchronous and publish/subscribe messaging using JMS (Java Message Service)?
Check out the jGuru JMS FAQ.
What is the default time for transaction manager? And how to set maximum time(timeout) for transaction?.
The default time depends on your app server. It is usually around 30 seconds. If you are using bean-managed transactions, you can set it like this:
// One of the methods from the SessionBean inte...more
Are nested transactions supported?
No. Because of the limited resources of current smart cards, Java Card 2.1.1 only supports one transaction level.
If you call JCSystem.beginTransaction() when a transaction is already is progress...more
What is the scope of a transaction?
Only a successful call to JCSystem.commitTransaction() will commit a transaction.
If a transaction is not explicitly committed, it will abort at the end of the process() method.
This means that ...more
Are transient writes transactioned?
No. Transient data is lost whenever the card is powered-up, so it wouldn't make sense to include it in transactions.
How large can a transaction be?
This is platform dependent. You may use JCSystem.getMaxCommitCapacity() to find out what this amount is. Because of overhead, the size of the transaction buffer is not fully available to applets, ...more
When do I need to use transactions?
You need to use transactions anytime you're modifying a set of data, which could end up in a weird state if the
modifications don't run to completion.
For example, changing the value of a PIN ne...more
'What is a transaction? - 08.08.2001
What is a transaction?
Where can I learn (more) about Java's support for developing multi-threaded programs?
Check out the jGuru Threads
FAQ.
I am initiating a JTA transaction within a servlet. Subsequently, this servlet calls the method of a stateful session EJB. In this method some SQL statements are executed and an entity bean is looked up and updated. After the return of that method, the servlet commits the JTA transaction. The stateful session EJB as well as the entity EJB are declared as with TRANSACTION REQUIRED and are placed in two different EJB servers. However, after commit, only the changes due to the SQL statements are done in the database. It looks like the entity bean EJB server does not consider the JTA transaction. Any idea?
You say that your business requirements are to start a transaction at the beginning of the session bean method and then to terminate it at the end of the session bean method. Why don't you forget...more
Where can I find the API documentation for the Java Transaction API (JTA)?
You can find the JTA documentation from Sun's
J2EE API documentation page.
How can I manage long duration transactions?
By saying "how do I manage" it seems like you are doing bean-managed transaction using the javax.transaction.UserTransaction interface to explicitly demarcate the transaction boundaries....more
How does a bean access multiple databases in the same transaction?
In EJB 1.1, the way your EJB accesses multiple databases is the same as for accessing a single database: the datasource is defined in the deployment descriptor and looked up by the EJB using the ...more
Is it possible to write a stand-alone application (a client or a non-J2EE environment) that can take advantage of distributed transactions using JTA? How? Is it vendor dependent, or are there any standards for writing such applications?
You can use an implementation of JTA that uses JTS. JTS is the Java Mapping of the CORBA OTS (Object Transaction Service) that supports distributed transactions. The JTA/JTS service would have to...more