Spring

Method and its Description

Method and its Description

TransactionStatus getTransaction(TransactionDefinition definition) 

This strategy returns an at the present dynamic exchange or makes another one, as indicated by the predetermined spread conduct. 

void commit(TransactionStatus status) 

This strategy submits the given exchange as to its status. 

void rollback(TransactionStatus status) 

This strategy plays out a rollback of the given exchange. 

TrasactionDefinition defines as the following:

Method and its Description 

int getPropagationBehavior() 

This strategy returns the spread conduct. Spring offers all of the exchange engendering alternatives natural from EJB CMT. 

int getIsolationLevel() 

This technique returns how much this exchange is separated from crafted by different exchanges. 

String getName() 

This technique returns the name of this exchange. 

int getTimeout() 

This strategy returns the time in seconds where the exchange should finish. 

boolean isReadOnly() 

This technique returns whether the exchange is perused as it were. 

Following are the potential qualities for isolation level − 

Isolation and its Description 

TransactionDefinition.ISOLATION_DEFAULT 

This is the default confinement level. 

TransactionDefinition.ISOLATION_READ_COMMITTED 

This demonstrates that grimy peruses are forestalled; non-repeatable peruses and apparition peruses can happen. 

TransactionDefinition.ISOLATION_READ_UNCOMMITTED 

This demonstrates that grimy peruses, non-repeatable peruses, and apparition peruses can happen. 

TransactionDefinition.ISOLATION_REPEATABLE_READ 

This demonstrates that grimy peruses and non-repeatable peruses are forestalled; apparition peruses can happen. 

TransactionDefinition.ISOLATION_SERIALIZABLE 

This demonstrates that grimy peruses, non-repeatable peruses, and apparition peruses are forestalled. 

Following are the potential qualities for propagation kinds − 

Propagation and its purpose

TransactionDefinition.PROPAGATION_MANDATORY 

Supports a current exchange; tosses a special case if no current exchange exists. 

TransactionDefinition.PROPAGATION_NESTED 

Executes inside a settled exchange if a current exchange exists. 

TransactionDefinition.PROPAGATION_NEVER 

It doesn't uphold a current exchange; it tosses an exemption if a current exchange exists. 

TransactionDefinition.PROPAGATION_NOT_SUPPORTED 

It doesn't uphold a current exchange; rather consistently executes non transactional. 

TransactionDefinition.PROPAGATION_REQUIRED 

Supports a current exchange; makes another one if none exists. 

TransactionDefinition.PROPAGATION_REQUIRES_NEW 

It makes another exchange, suspending the current exchange if one exists. 

TransactionDefinition.PROPAGATION_SUPPORTS 

Supports a current exchange; executes non-conditionally if none exists. 

TransactionDefinition.TIMEOUT_DEFAULT 

Utilizes the default break of the basic exchange framework or none in case breaks are not upheld